1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

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.
This commit is contained in:
David Dykstal 2006-08-07 15:45:56 +00:00
parent 17b8ed3c91
commit 96842affa0
8 changed files with 23 additions and 54 deletions

View file

@ -56,7 +56,7 @@ to load each of your images.
<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getWorkspaceRoot()">getWorkspaceRoot()</A></samp>. Return the root of the workspace.
<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getWorkspace()">getWorkspace()</A></samp>. Return the workspace root.
<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getInstallLocation()">getInstallLocation()</A></samp>. Return the install directory for this plugin.
<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getIconPath()">getIconPath()</A></samp>. Return the typical path for icons, relative to the plugin's folder: "icons"
<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getIconPath()">getIconPath()</A></samp>. Return the typical path for icons, relative to the plugin's folder: "icons/"
<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#putImageInRegistry(java.lang.String, java.lang.String)">putImageInRegistry(String id, String fileName)</A></samp>. 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
<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getImage(java.lang.String)">getImage(String id)</A></samp>. Return an Image given the ID with which it was registered in putImageInRegistry.
<li><samp><A href="../../../reference/api/org/eclipse/rse/core/SystemBasePlugin.html#getImageDescriptor(java.lang.String)">getImageDescriptor(String id)</A></samp>. Return an ImageDescriptor given the ID with which it was registered in putImageInRegistry.

View file

@ -18,9 +18,8 @@
protected void initializeImageRegistry()
{
String path = getIconPath();
<b>putImageInRegistry("ICON_ID_TEAM", path+"team.gif");</b>
<b>putImageInRegistry("ICON_ID_DEVELOPER", path+"developer.gif");</b>
// TO RETRIEVE AN ICON, CALL GETIMAGE OR GETIMAGEDESCRIPTOR WITH ITS XXX_ID ID
<b>putImageInRegistry("ICON_ID_TEAM", path + "team.gif");</b>
<b>putImageInRegistry("ICON_ID_DEVELOPER", path + "developer.gif");</b>
}
</samp></pre>
</body>

View file

@ -18,11 +18,10 @@
protected void initializeImageRegistry()
{
String path = getIconPath();
putImageInRegistry("ICON_ID_TEAM", path+"team.gif");
putImageInRegistry("ICON_ID_DEVELOPER", path+"developer.gif");
<b>putImageInRegistry("ICON_ID_TEAMFILTER", path+"teamFilter.gif");</b>
<b>putImageInRegistry("ICON_ID_DEVELOPERFILTER", path+"developerFilter.gif");</b>
// 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");
<b>putImageInRegistry("ICON_ID_TEAMFILTER", path + "teamFilter.gif");</b>
<b>putImageInRegistry("ICON_ID_DEVELOPERFILTER", path + "developerFilter.gif");</b>
}
</samp></pre>
</body>

View file

@ -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");
}
/**

View file

@ -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$
}
}

View file

@ -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$
}
/**

View file

@ -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;

View file

@ -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...
// -----------------