From 483f5165735571b4722d0a6d5ad485b19bb48c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Tue, 14 Jan 2025 16:44:10 +0100 Subject: [PATCH] fix Unnecessary @SuppressWarnings("deprecation") --- .../eclipse/pde/internal/core/iproduct/IArgumentsInfo.java | 1 + .../eclipse/pde/internal/core/product/ArgumentsInfo.java | 6 ++---- .../pde/internal/ui/editor/product/ArgumentsSection.java | 3 +-- .../pde/internal/ui/editor/product/PropertiesSection.java | 5 +++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/iproduct/IArgumentsInfo.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/iproduct/IArgumentsInfo.java index c81f8674c7..4ad3bb98c6 100644 --- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/iproduct/IArgumentsInfo.java +++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/iproduct/IArgumentsInfo.java @@ -36,6 +36,7 @@ public interface IArgumentsInfo extends IProductObject { public static final int L_ARGS_ARCH_ALL = 0; public static final int L_ARGS_ARCH_X86 = 1; + public static final String ARCH_X86 = "x86";//$NON-NLS-1$ public static final int L_ARGS_ARCH_X86_64 = 2; void setProgramArguments(String args, int platform); diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/product/ArgumentsInfo.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/product/ArgumentsInfo.java index 483654b4ce..d9d76a9bb3 100644 --- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/product/ArgumentsInfo.java +++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/product/ArgumentsInfo.java @@ -123,12 +123,11 @@ public String getCompleteProgramArguments(String os) { return getCompleteProgramArguments(os, ""); //$NON-NLS-1$ } - @SuppressWarnings("deprecation") @Override public String getCompleteProgramArguments(String os, String arch) { int archIndex = L_ARGS_ARCH_ALL; if (arch != null && arch.length() > 0) { - if (Platform.ARCH_X86.equals(arch)) { + if (ARCH_X86.equals(arch)) { archIndex = L_ARGS_ARCH_X86; } else if (Platform.ARCH_X86_64.equals(arch)) { archIndex = L_ARGS_ARCH_X86_64; @@ -218,12 +217,11 @@ public String getCompleteVMArguments(String os) { return getCompleteVMArguments(os, ""); //$NON-NLS-1$ } - @SuppressWarnings("deprecation") @Override public String getCompleteVMArguments(String os, String arch) { int archIndex = L_ARGS_ARCH_ALL; if (arch != null && arch.length() > 0) { - if (Platform.ARCH_X86.equals(arch)) { + if (ARCH_X86.equals(arch)) { archIndex = L_ARGS_ARCH_X86; } else if (Platform.ARCH_X86_64.equals(arch)) { archIndex = L_ARGS_ARCH_X86_64; diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ArgumentsSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ArgumentsSection.java index c6e47d9d9b..57fb52ffcd 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ArgumentsSection.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ArgumentsSection.java @@ -50,7 +50,6 @@ import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.Section; -@SuppressWarnings("deprecation") public class ArgumentsSection extends PDESection { private static final String[] TAB_LABELS = new String[4]; @@ -64,7 +63,7 @@ public class ArgumentsSection extends PDESection { private static final String[] TAB_ARCHLABELS = new String[8]; static { TAB_ARCHLABELS[IArgumentsInfo.L_ARGS_ALL] = PDEUIMessages.ArgumentsSection_allArch; - TAB_ARCHLABELS[IArgumentsInfo.L_ARGS_ARCH_X86] = Platform.ARCH_X86; + TAB_ARCHLABELS[IArgumentsInfo.L_ARGS_ARCH_X86] = IArgumentsInfo.ARCH_X86; TAB_ARCHLABELS[IArgumentsInfo.L_ARGS_ARCH_X86_64] = Platform.ARCH_X86_64; } diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PropertiesSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PropertiesSection.java index b5992afacb..ec35a2b3c1 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PropertiesSection.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PropertiesSection.java @@ -34,6 +34,7 @@ import org.eclipse.jface.window.Window; import org.eclipse.osgi.util.NLS; import org.eclipse.pde.core.IModelChangedEvent; +import org.eclipse.pde.internal.core.iproduct.IArgumentsInfo; import org.eclipse.pde.internal.core.iproduct.IConfigurationProperty; import org.eclipse.pde.internal.core.iproduct.IProduct; import org.eclipse.pde.internal.core.iproduct.IProductModel; @@ -130,8 +131,8 @@ private class PropertyDialog extends StatusDialog { private final String[] COMBO_OSLABELS = new String[] { PDEUIMessages.PropertiesSection_All, Platform.OS_LINUX, Platform.OS_MACOSX, Platform.OS_WIN32 }; - @SuppressWarnings("deprecation") - private final String[] COMBO_ARCHLABELS = new String[] { PDEUIMessages.PropertiesSection_All, Platform.ARCH_X86, + private final String[] COMBO_ARCHLABELS = new String[] { PDEUIMessages.PropertiesSection_All, + IArgumentsInfo.ARCH_X86, Platform.ARCH_X86_64 }; public PropertyDialog(Shell shell, IConfigurationProperty property,