From 96842affa08803a7336a2db97e4ab87079db200a Mon Sep 17 00:00:00 2001 From: David Dykstal Date: Mon, 7 Aug 2006 15:45:56 +0000 Subject: [PATCH] bug 150904 - getIconPath was changed back to providing the trailing "/". All code using getIconPath (including samples and tutorials) was checked to ensure this was taken into account. --- .../guide/api/plugin/uiPluginAPI.html | 2 +- .../tutorial/InitializeImageRegistry.html | 5 ++-- .../tutorial/InitializeImageRegistry2.html | 9 +++--- .../guide/tutorial/RSESamplesPlugin2.html | 9 +++--- .../rse/examples/daytime/Activator.java | 2 +- .../src/samples/RSESamplesPlugin.java | 9 +++--- .../eclipse/rse/ui/ISystemIconConstants.java | 13 ++++----- .../eclipse/rse/core/SystemBasePlugin.java | 28 ++----------------- 8 files changed, 23 insertions(+), 54 deletions(-) diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/api/plugin/uiPluginAPI.html b/rse/doc/org.eclipse.rse.doc.isv/guide/api/plugin/uiPluginAPI.html index e79d1cb0d8c..7c9bba5a63f 100755 --- a/rse/doc/org.eclipse.rse.doc.isv/guide/api/plugin/uiPluginAPI.html +++ b/rse/doc/org.eclipse.rse.doc.isv/guide/api/plugin/uiPluginAPI.html @@ -56,7 +56,7 @@ to load each of your images.
  • getWorkspaceRoot(). Return the root of the workspace.
  • getWorkspace(). Return the workspace root.
  • getInstallLocation(). Return the install directory for this plugin. -
  • getIconPath(). Return the typical path for icons, relative to the plugin's folder: "icons" +
  • getIconPath(). Return the typical path for icons, relative to the plugin's folder: "icons/"
  • putImageInRegistry(String id, String fileName). Load an image in the image registry, given the ID to retrieve it with, and its filename and path relative to this plugin's folder
  • getImage(String id). Return an Image given the ID with which it was registered in putImageInRegistry.
  • getImageDescriptor(String id). Return an ImageDescriptor given the ID with which it was registered in putImageInRegistry. diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry.html index d8b5b27bd40..2d618b753d6 100755 --- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry.html +++ b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry.html @@ -18,9 +18,8 @@ protected void initializeImageRegistry() { String path = getIconPath(); - putImageInRegistry("ICON_ID_TEAM", path+"team.gif"); - putImageInRegistry("ICON_ID_DEVELOPER", path+"developer.gif"); - // TO RETRIEVE AN ICON, CALL GETIMAGE OR GETIMAGEDESCRIPTOR WITH ITS XXX_ID ID + putImageInRegistry("ICON_ID_TEAM", path + "team.gif"); + putImageInRegistry("ICON_ID_DEVELOPER", path + "developer.gif"); } diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry2.html index 09130347cd5..b62de4e67a2 100755 --- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry2.html +++ b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/InitializeImageRegistry2.html @@ -18,11 +18,10 @@ protected void initializeImageRegistry() { String path = getIconPath(); - putImageInRegistry("ICON_ID_TEAM", path+"team.gif"); - putImageInRegistry("ICON_ID_DEVELOPER", path+"developer.gif"); - putImageInRegistry("ICON_ID_TEAMFILTER", path+"teamFilter.gif"); - putImageInRegistry("ICON_ID_DEVELOPERFILTER", path+"developerFilter.gif"); - // TO RETRIEVE AN ICON, CALL GETIMAGE OR GETIMAGEDESCRIPTOR WITH ITS XXX_ID ID + putImageInRegistry("ICON_ID_TEAM", path + "team.gif"); + putImageInRegistry("ICON_ID_DEVELOPER", path + "developer.gif"); + putImageInRegistry("ICON_ID_TEAMFILTER", path + "teamFilter.gif"); + putImageInRegistry("ICON_ID_DEVELOPERFILTER", path + "developerFilter.gif"); } diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin2.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin2.html index 1cd33dc4980..f1b2ee08ab6 100755 --- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin2.html +++ b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/RSESamplesPlugin2.html @@ -129,11 +129,10 @@ public class RSESamplesPlugin extends SystemBasePlugin { protected void initializeImageRegistry() { String path = getIconPath(); - putImageInRegistry("ICON_ID_TEAM", path+"/team.gif"); - putImageInRegistry("ICON_ID_DEVELOPER", path+"/developer.gif"); - putImageInRegistry("ICON_ID_TEAMFILTER", path+"/teamFilter.gif"); - putImageInRegistry("ICON_ID_DEVELOPERFILTER", path+"/developerFilter.gif"); - // TO RETRIEVE AN ICON, CALL GETIMAGE OR GETIMAGEDESCRIPTOR WITH ITS XXX_ID ID + putImageInRegistry("ICON_ID_TEAM", path + "team.gif"); + putImageInRegistry("ICON_ID_DEVELOPER", path + "developer.gif"); + putImageInRegistry("ICON_ID_TEAMFILTER", path + "teamFilter.gif"); + putImageInRegistry("ICON_ID_DEVELOPERFILTER", path + "developerFilter.gif"); } /** diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/Activator.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/Activator.java index 0945bed9964..9d614479fd9 100644 --- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/Activator.java +++ b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/Activator.java @@ -70,7 +70,7 @@ public class Activator extends SystemBasePlugin { protected void initializeImageRegistry() { String path = getIconPath(); - putImageInRegistry(ICON_ID_DAYTIME, path+"/full/obj16/daytime.gif"); //$NON-NLS-1$ + putImageInRegistry(ICON_ID_DAYTIME, path+"full/obj16/daytime.gif"); //$NON-NLS-1$ } } diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesPlugin.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesPlugin.java index 809aa8a45ec..4c8da20fe8a 100644 --- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesPlugin.java +++ b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/RSESamplesPlugin.java @@ -129,11 +129,10 @@ public class RSESamplesPlugin extends SystemBasePlugin { protected void initializeImageRegistry() { String path = getIconPath(); - putImageInRegistry("ICON_ID_TEAM", path+"/team.gif"); //$NON-NLS-1$ //$NON-NLS-2$ - putImageInRegistry("ICON_ID_DEVELOPER", path+"/developer.gif"); //$NON-NLS-1$ //$NON-NLS-2$ - putImageInRegistry("ICON_ID_TEAMFILTER", path+"/teamFilter.gif"); //$NON-NLS-1$ //$NON-NLS-2$ - putImageInRegistry("ICON_ID_DEVELOPERFILTER", path+"/developerFilter.gif"); //$NON-NLS-1$ //$NON-NLS-2$ - // TO RETRIEVE AN ICON, CALL GETIMAGE OR GETIMAGEDESCRIPTOR WITH ITS XXX_ID ID + putImageInRegistry("ICON_ID_TEAM", path + "team.gif"); //$NON-NLS-1$ //$NON-NLS-2$ + putImageInRegistry("ICON_ID_DEVELOPER", path + "developer.gif"); //$NON-NLS-1$ //$NON-NLS-2$ + putImageInRegistry("ICON_ID_TEAMFILTER", path + "teamFilter.gif"); //$NON-NLS-1$ //$NON-NLS-2$ + putImageInRegistry("ICON_ID_DEVELOPERFILTER", path + "developerFilter.gif"); //$NON-NLS-1$ //$NON-NLS-2$ } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java index 7480c195d16..915fdb4f520 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java @@ -23,17 +23,14 @@ public interface ISystemIconConstants { public static final String PLUGIN_ID ="org.eclipse.rse.ui"; public static final String PREFIX = PLUGIN_ID + "."; - public static final String SEP = "/"; // Icons - public static final String ICON_DIR = "icons"; - public static final String ICON_PATH = SEP + ICON_DIR + SEP; public static final String ICON_SUFFIX = "Icon"; public static final String ICON_BANNER_SUFFIX = "BannerIcon"; public static final String ICON_EXT = ".gif"; // WIZARD ICONS... - public static final String ICON_WIZARD_DIR = SEP + "full" + SEP + "wizban" + SEP + ""; + public static final String ICON_WIZARD_DIR = "full/wizban/"; public static final String ICON_SYSTEM_NEWPROFILEWIZARD_ROOT = "newprofile_wiz"; public static final String ICON_SYSTEM_NEWPROFILEWIZARD = ICON_WIZARD_DIR + ICON_SYSTEM_NEWPROFILEWIZARD_ROOT + ICON_EXT; public static final String ICON_SYSTEM_NEWPROFILEWIZARD_ID = PREFIX + ICON_SYSTEM_NEWPROFILEWIZARD_ROOT + ICON_BANNER_SUFFIX; @@ -60,7 +57,7 @@ public interface ISystemIconConstants // THING ICONS... - public static final String ICON_MODEL_DIR = SEP + "full" + SEP + "obj16" + SEP + ""; + public static final String ICON_MODEL_DIR = "full/obj16/"; public static final String ICON_SYSTEM_PROFILE_ROOT = "systemprofile"; public static final String ICON_SYSTEM_PROFILE = ICON_MODEL_DIR + ICON_SYSTEM_PROFILE_ROOT+ICON_EXT; @@ -123,7 +120,7 @@ public interface ISystemIconConstants public static final String ICON_SYSTEM_TARGET_ID = PREFIX+ICON_SYSTEM_TARGET_ROOT+ICON_SUFFIX; // NEW ACTION ICONS... - public static final String ICON_NEWACTIONS_DIR = SEP + "full" + SEP + "ctool16" + SEP + ""; + public static final String ICON_NEWACTIONS_DIR = "full/ctool16/"; public static final String ICON_SYSTEM_NEW_ROOT = "new"; public static final String ICON_SYSTEM_NEW = ICON_NEWACTIONS_DIR + ICON_SYSTEM_NEW_ROOT+ICON_EXT; @@ -159,7 +156,7 @@ public interface ISystemIconConstants // OTHER ACTION ICONS... - public static final String ICON_ACTIONS_DIR = SEP + "full" + SEP + "elcl16" + SEP + ""; + public static final String ICON_ACTIONS_DIR = "full/elcl16/"; public static final String ICON_SYSTEM_COMPILE_ROOT = "compile"; public static final String ICON_SYSTEM_COMPILE = ICON_ACTIONS_DIR + ICON_SYSTEM_COMPILE_ROOT+ICON_EXT; @@ -299,7 +296,7 @@ public interface ISystemIconConstants public static final String ICON_SYSTEM_REFRESH_ID = PREFIX + ICON_SYSTEM_REFRESH_ROOT + ICON_SUFFIX; // SPECIAL MODEL OBJECT ICONS... - public static final String ICON_OBJS_DIR = SEP + "full" + SEP + "obj16" + SEP; + public static final String ICON_OBJS_DIR = "full/obj16/"; public static final String ICON_SYSTEM_ERROR_ROOT = "error"; public static final String ICON_SYSTEM_ERROR_ID = PREFIX + ICON_SYSTEM_ERROR_ROOT + ICON_SUFFIX; public static final String ICON_SYSTEM_ERROR = ICON_OBJS_DIR + ICON_SYSTEM_ERROR_ROOT + ICON_EXT; diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java index 618dca64e0a..792d6e8841b 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java @@ -50,11 +50,6 @@ import org.osgi.framework.BundleContext; public abstract class SystemBasePlugin extends AbstractUIPlugin { - /** - * Default folder for icons, relative to this plugin's install folder: "icons". - */ - private static final String ICON_PATH = "icons"; - // static variables private static SystemBasePlugin baseInst = null; @@ -151,7 +146,7 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin * @return the prefix of the path for icons, i.e. "icons/". */ public static String getIconPath() { - return ICON_PATH; + return "icons/"; //$NON-NLS-1$ } /** @@ -856,7 +851,7 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin } /** - * Returns an image descriptor from the base IDE. + * Returns an image descriptor from the base IDE. Looks only in the "icons/full/" directories. * * @see org.eclipse.ui.views.navigator.ResourceNavigatorActionGroup#getImageDescriptor(java.lang.String) */ @@ -884,25 +879,6 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin return descriptor; } - // ---------------------------------------- - // TRANSLATABLE RESOURCE-RELATED METHODS... - // ---------------------------------------- - - /** - * Put up an error message when a programming error is detected. - * Please note this should never happen in production so we don't translate! - */ - public void showProgrammerErrorMessage(String msg) - { - org.eclipse.swt.widgets.MessageBox mb = new org.eclipse.swt.widgets.MessageBox(null); - //mb.setTitle("Remote Systems Programming Error"); - String errmsg = "Programming Error: " + msg; - mb.setMessage(errmsg); - mb.open(); - logError(errmsg); - } - - // ----------------- // LOGGER METHODS... // -----------------