Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Rennie2013-07-17 12:30:00 -0400
committerMike Rennie2013-07-17 12:30:00 -0400
commit4fcde1ffaf34791bd406d47ce72d17e2801432a3 (patch)
treece0379a93933dc7680dde8cbca7e28c96e1ea55b /org.eclipse.debug.examples.ui
parent44c60018da2e1e14ec6b2d0b0f2b01a71df104fc (diff)
downloadeclipse.platform.debug-4fcde1ffaf34791bd406d47ce72d17e2801432a3.tar.gz
eclipse.platform.debug-4fcde1ffaf34791bd406d47ce72d17e2801432a3.tar.xz
eclipse.platform.debug-4fcde1ffaf34791bd406d47ce72d17e2801432a3.zip
Bug 409456 - Get rid of discouraged access warningsI20130730-0800I20130724-1600I20130723-0800I20130717-1600
Diffstat (limited to 'org.eclipse.debug.examples.ui')
-rw-r--r--org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.ui.prefs6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java26
2 files changed, 24 insertions, 8 deletions
diff --git a/org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.ui.prefs
index 13d5dca2c..8e18452e3 100644
--- a/org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -76,7 +76,7 @@ sp_cleanup.make_local_variable_final=false
sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.make_variable_declarations_final=false
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
@@ -87,7 +87,7 @@ sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
@@ -95,7 +95,7 @@ sp_cleanup.remove_unnecessary_nls_tags=true
sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=true
+sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java
index 523952c40..6bdfbf4fa 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java
@@ -19,6 +19,9 @@ import java.util.Map.Entry;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Color;
@@ -26,8 +29,8 @@ import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.internal.util.BundleUtility;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
/**
@@ -45,8 +48,14 @@ public class DebugUIPlugin extends AbstractUIPlugin {
private final static String PATH_DLOCALTOOL = ICONS_PATH + "dlcl16/"; //Disabled local toolbar icons //$NON-NLS-1$
/**
- * Toolbar action to pop data stack
- */
+ * The id of the plugin
+ *
+ * @since 1.4.200
+ */
+ public static final String PLUGIN_ID = "org.eclipse.debug.examples.ui"; //$NON-NLS-1$
+ /**
+ * Toolbar action to pop data stack
+ */
public final static String IMG_ELCL_POP = "IMG_ELCL_POP"; //$NON-NLS-1$
public final static String IMG_DLCL_POP = "IMG_DLCL_POP"; //$NON-NLS-1$
@@ -169,8 +178,15 @@ public class DebugUIPlugin extends AbstractUIPlugin {
* <code>false</code> if this is not a shared image
*/
private void declareImage(String key, String path) {
- URL url = BundleUtility.find("org.eclipse.debug.examples.ui", path); //$NON-NLS-1$
- ImageDescriptor desc = ImageDescriptor.createFromURL(url);
+ ImageDescriptor desc = ImageDescriptor.getMissingImageDescriptor();
+ Bundle bundle = Platform.getBundle(PLUGIN_ID);
+ URL url = null;
+ if (bundle != null) {
+ url = FileLocator.find(bundle, new Path(path), null);
+ if (url != null) {
+ desc = ImageDescriptor.createFromURL(url);
+ }
+ }
getImageRegistry().put(key, desc);
}

Back to the top