Method: createManagedFromKey(String, String)

1: /*
2: * #%~
3: * org.overture.ide.ui
4: * %%
5: * Copyright (C) 2008 - 2014 Overture
6: * %%
7: * This program is free software: you can redistribute it and/or modify
8: * it under the terms of the GNU General Public License as
9: * published by the Free Software Foundation, either version 3 of the
10: * License, or (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public
18: * License along with this program. If not, see
19: * <http://www.gnu.org/licenses/gpl-3.0.html>.
20: * #~%
21: */
22: package org.overture.ide.ui;
23:
24: import java.net.URL;
25:
26: import java.util.HashMap;
27: import java.util.Iterator;
28:
29: import org.eclipse.core.runtime.FileLocator;
30: import org.eclipse.core.runtime.IPath;
31: import org.eclipse.core.runtime.Path;
32: import org.eclipse.jface.action.IAction;
33: import org.eclipse.jface.resource.ImageDescriptor;
34: import org.eclipse.jface.resource.ImageRegistry;
35: import org.eclipse.swt.graphics.Image;
36: import org.eclipse.swt.graphics.ImageData;
37: import org.osgi.framework.Bundle;
38:
39: @SuppressWarnings("unused")
40: public class VdmPluginImages
41: {
42:
43:         public static final IPath ICONS_PATH = new Path("$nl$/icons/"); //$NON-NLS-1$
44:
45:         private static final String NAME_PREFIX = "org.overture.ide.ui."; //$NON-NLS-1$
46:         private static final int NAME_PREFIX_LENGTH = NAME_PREFIX.length();
47:
48:         // The plug-in registry
49:         private static ImageRegistry fgImageRegistry = null;
50:         private static HashMap<String, ImageDescriptor> fgAvoidSWTErrorMap = null;
51:
52:         private static final String T_OBJ = "obj16"; //$NON-NLS-1$
53:         private static final String T_OVR = "ovr16"; //$NON-NLS-1$
54:
55:         private static final String T_WIZBAN = "wizban"; //$NON-NLS-1$
56:         private static final String T_ELCL = "elcl16"; //$NON-NLS-1$
57:         private static final String T_DLCL = "dlcl16"; //$NON-NLS-1$
58:         private static final String T_ETOOL = "etool16"; //$NON-NLS-1$
59:         private static final String T_EVIEW = "eview16"; //$NON-NLS-1$
60:
61:         /*
62:          * Keys for images available from the Java-UI plug-in image registry.
63:          */
64:         public static final String IMG_METHOD_PUBLIC = NAME_PREFIX
65:                         + "methpub_obj.gif"; //$NON-NLS-1$
66:         public static final String IMG_METHOD_PROTECTED = NAME_PREFIX
67:                         + "methpro_obj.gif"; //$NON-NLS-1$
68:         public static final String IMG_METHOD_PRIVATE = NAME_PREFIX
69:                         + "methpri_obj.gif"; //$NON-NLS-1$
70:         public static final String IMG_METHOD_DEFAULT = NAME_PREFIX
71:                         + "methdef_obj.gif"; //$NON-NLS-1$
72:
73:         
74:         public static final String IMG_FUNC_PUBLIC = NAME_PREFIX
75:                         + "funcdef_pub.gif"; //$NON-NLS-1$
76:         public static final String IMG_FUNC_PROTECTED = NAME_PREFIX
77:                         + "funcdef_pro.gif"; //$NON-NLS-1$
78:         public static final String IMG_FUNC_PRIVATE = NAME_PREFIX
79:                         + "funcdef_pri.gif"; //$NON-NLS-1$
80:         public static final String IMG_FUNC_DEFAULT = NAME_PREFIX
81:                         + "funcdef_def.gif"; //$NON-NLS-1$
82:
83:         
84:         //        
85:         //        
86:         //        public static final String IMG_MISC_PUBLIC= NAME_PREFIX + "methpub_obj.gif";                         //$NON-NLS-1$
87:         //        public static final String IMG_MISC_PROTECTED= NAME_PREFIX + "methpro_obj.gif";                 //$NON-NLS-1$
88:         //        public static final String IMG_MISC_PRIVATE= NAME_PREFIX + "methpri_obj.gif";                 //$NON-NLS-1$
89:         //        public static final String IMG_MISC_DEFAULT= NAME_PREFIX + "methdef_obj.gif";                 //$NON-NLS-1$
90:         //
91:         public static final String IMG_FIELD_PUBLIC = NAME_PREFIX
92:                         + "field_public_obj.gif"; //$NON-NLS-1$
93:         public static final String IMG_FIELD_PROTECTED = NAME_PREFIX
94:                         + "field_protected_obj.gif"; //$NON-NLS-1$
95:         public static final String IMG_FIELD_PRIVATE = NAME_PREFIX
96:                         + "field_private_obj.gif"; //$NON-NLS-1$
97:         public static final String IMG_FIELD_DEFAULT = NAME_PREFIX
98:                         + "field_default_obj.gif"; //$NON-NLS-1$
99:
100:         public static final String IMG_TYPE_PUBLIC = NAME_PREFIX
101:                         + "type_public_obj.gif"; //$NON-NLS-1$
102:         public static final String IMG_TYPE_PROTECTED = NAME_PREFIX
103:                         + "type_protected_obj.gif"; //$NON-NLS-1$
104:         public static final String IMG_TYPE_PRIVATE = NAME_PREFIX
105:                         + "type_private_obj.gif"; //$NON-NLS-1$
106:         public static final String IMG_TYPE_DEFAULT = NAME_PREFIX
107:                         + "type_default_obj.gif"; //$NON-NLS-1$
108:
109:         public static final String IMG_TRACE_DEFAULT = NAME_PREFIX
110:                         + "trace_default_obj.gif"; //$NON-NLS-1$
111:         //
112:         //        public static final String IMG_ELCL_VIEW_MENU= NAME_PREFIX + T_ELCL + "view_menu.gif"; //$NON-NLS-1$
113:         //        public static final String IMG_DLCL_VIEW_MENU= NAME_PREFIX + T_DLCL + "view_menu.gif"; //$NON-NLS-1$
114:         //
115:         //        
116:         public static final String IMG_OBJS_LOCK = NAME_PREFIX + "lock_obj.gif";
117:         //        public static final String IMG_OBJS_GHOST= NAME_PREFIX + "ghost.gif";                                 //$NON-NLS-1$
118:         //        public static final String IMG_OBJS_SEARCH_TSK= NAME_PREFIX + "search_tsk.gif";                 //$NON-NLS-1$
119:         //        public static final String IMG_OBJS_PACKDECL= NAME_PREFIX + "packd_obj.gif";                         //$NON-NLS-1$
120:         public static final String IMG_OBJS_IMPDECL = NAME_PREFIX + "imp_obj.gif"; //$NON-NLS-1$
121:         public static final String IMG_OBJS_IMPCONT = NAME_PREFIX + "impc_obj.gif"; //$NON-NLS-1$
122:         //        public static final String IMG_OBJS_JSEARCH= NAME_PREFIX + "jsearch_obj.gif";                 //$NON-NLS-1$
123:         //        public static final String IMG_OBJS_SEARCH_DECL= NAME_PREFIX + "search_decl_obj.gif"; //$NON-NLS-1$
124:         //        public static final String IMG_OBJS_SEARCH_REF= NAME_PREFIX + "search_ref_obj.gif";         //$NON-NLS-1$
125:         public static final String IMG_OBJS_CLASS = NAME_PREFIX + "class_obj.gif"; //$NON-NLS-1$
126:         //        public static final String IMG_OBJS_CLASSALT= NAME_PREFIX + "classfo_obj.gif";                         //$NON-NLS-1$
127:         //        public static final String IMG_OBJS_CLASS_DEFAULT= NAME_PREFIX + "class_default_obj.gif";                         //$NON-NLS-1$
128:         public static final String IMG_OBJS_SYSTEM = NAME_PREFIX + "system_obj.gif"; //$NON-NLS-1$
129:         public static final String IMG_OBJS_MODULE = NAME_PREFIX + "module_obj.gif"; //$NON-NLS-1$
130:         //        
131:         public static final String IMG_OBJS_VDM_LIBRARY = NAME_PREFIX
132:                         + "vdm_library_obj.gif"; //$NON-NLS-1$
133:
134:         public static final String IMG_OBJS_VDM_PER_SYNC = NAME_PREFIX
135:                         + "vdm_per_sync.gif"; //$NON-NLS-1$
136:         
137:         public static final String IMG_ALPHA_SORTING = NAME_PREFIX + "alphab_sort_co.gif";
138:         
139:         //
140:         //        public static final String IMG_OBJS_INNER_CLASS_PUBLIC= NAME_PREFIX + "innerclass_public_obj.gif"; //$NON-NLS-1$
141:         //        public static final String IMG_OBJS_INNER_CLASS_DEFAULT= NAME_PREFIX + "innerclass_default_obj.gif"; //$NON-NLS-1$
142:         //        public static final String IMG_OBJS_INNER_CLASS_PROTECTED= NAME_PREFIX + "innerclass_protected_obj.gif"; //$NON-NLS-1$
143:         //        public static final String IMG_OBJS_INNER_CLASS_PRIVATE= NAME_PREFIX + "innerclass_private_obj.gif"; //$NON-NLS-1$
144:         //
145:         //        public static final String IMG_OBJS_INTERFACE= NAME_PREFIX + "int_obj.gif";                         //$NON-NLS-1$
146:         //        public static final String IMG_OBJS_INTERFACEALT= NAME_PREFIX + "intf_obj.gif";                         //$NON-NLS-1$
147:         //        public static final String IMG_OBJS_INTERFACE_DEFAULT= NAME_PREFIX + "int_default_obj.gif";                 //$NON-NLS-1$
148:         //
149:         //        public static final String IMG_OBJS_INNER_INTERFACE_PUBLIC= NAME_PREFIX + "innerinterface_public_obj.gif"; //$NON-NLS-1$
150:         //        public static final String IMG_OBJS_INNER_INTERFACE_DEFAULT= NAME_PREFIX + "innerinterface_default_obj.gif"; //$NON-NLS-1$
151:         //        public static final String IMG_OBJS_INNER_INTERFACE_PROTECTED= NAME_PREFIX + "innerinterface_protected_obj.gif"; //$NON-NLS-1$
152:         //        public static final String IMG_OBJS_INNER_INTERFACE_PRIVATE= NAME_PREFIX + "innerinterface_private_obj.gif"; //$NON-NLS-1$
153:         //
154:         //        public static final String IMG_OBJS_ANNOTATION= NAME_PREFIX + "annotation_obj.gif"; //$NON-NLS-1$
155:         //        public static final String IMG_OBJS_ANNOTATION_DEFAULT= NAME_PREFIX + "annotation_default_obj.gif"; //$NON-NLS-1$
156:         //        public static final String IMG_OBJS_ANNOTATION_PROTECTED= NAME_PREFIX + "annotation_protected_obj.gif"; //$NON-NLS-1$
157:         //        public static final String IMG_OBJS_ANNOTATION_PRIVATE= NAME_PREFIX + "annotation_private_obj.gif"; //$NON-NLS-1$
158:         //        public static final String IMG_OBJS_ANNOTATION_ALT= NAME_PREFIX + "annotation_alt_obj.gif"; //$NON-NLS-1$
159:         //
160:         //        public static final String IMG_OBJS_ENUM= NAME_PREFIX + "enum_obj.gif"; //$NON-NLS-1$
161:         //        public static final String IMG_OBJS_ENUM_DEFAULT= NAME_PREFIX + "enum_default_obj.gif"; //$NON-NLS-1$
162:         //        public static final String IMG_OBJS_ENUM_PROTECTED= NAME_PREFIX + "enum_protected_obj.gif"; //$NON-NLS-1$
163:         //        public static final String IMG_OBJS_ENUM_PRIVATE= NAME_PREFIX + "enum_private_obj.gif"; //$NON-NLS-1$
164:         //        public static final String IMG_OBJS_ENUM_ALT= NAME_PREFIX + "enum_alt_obj.gif"; //$NON-NLS-1$
165:         //
166:         //        public static final String IMG_OBJS_CUNIT= NAME_PREFIX + "jcu_obj.gif";                                 //$NON-NLS-1$
167:         public static final String IMG_OBJS_CUNIT_RESOURCE = NAME_PREFIX
168:                         + "jcu_resource_obj.gif"; //$NON-NLS-1$
169:         //        public static final String IMG_OBJS_CFILE= NAME_PREFIX + "classf_obj.gif";                         //$NON-NLS-1$
170:         //        public static final String IMG_OBJS_CFILECLASS= NAME_PREFIX + "class_obj.gif";                 //$NON-NLS-1$
171:         //        public static final String IMG_OBJS_CFILEINT= NAME_PREFIX + "int_obj.gif";                         //$NON-NLS-1$
172:         //        public static final String IMG_OBJS_LOGICAL_PACKAGE= NAME_PREFIX + "logical_package_obj.gif";//$NON-NLS-1$
173:         //        public static final String IMG_OBJS_EMPTY_LOGICAL_PACKAGE= NAME_PREFIX + "empty_logical_package_obj.gif";//$NON-NLS-1$
174:         public static final String IMG_OBJS_PACKAGE = NAME_PREFIX
175:                         + "package_obj.gif"; //$NON-NLS-1$
176:         //        public static final String IMG_OBJS_EMPTY_PACK_RESOURCE= NAME_PREFIX + "empty_pack_fldr_obj.gif"; //$NON-NLS-1$
177:         //        public static final String IMG_OBJS_EMPTY_PACKAGE= NAME_PREFIX + "empty_pack_obj.gif"; //$NON-NLS-1$
178:         public static final String IMG_OBJS_PACKFRAG_ROOT = NAME_PREFIX
179:                         + "packagefolder_obj.gif"; //$NON-NLS-1$
180:         //        public static final String IMG_OBJS_JAR= NAME_PREFIX + "jar_obj.gif";                                 //$NON-NLS-1$
181:         //        public static final String IMG_OBJS_EXTJAR= NAME_PREFIX + "jar_l_obj.gif";                         //$NON-NLS-1$
182:         //        public static final String IMG_OBJS_JAR_WSRC= NAME_PREFIX + "jar_src_obj.gif";                 //$NON-NLS-1$
183:         //        public static final String IMG_OBJS_EXTJAR_WSRC= NAME_PREFIX + "jar_lsrc_obj.gif";        //$NON-NLS-1$
184:                 public static final String IMG_OBJS_CLASSFOLDER= NAME_PREFIX + "cf_obj.gif";                         //$NON-NLS-1$
185:         //        public static final String IMG_OBJS_CLASSFOLDER_WSRC= NAME_PREFIX + "cf_src_obj.gif";                 //$NON-NLS-1$
186:         //
187:         //        public static final String IMG_OBJS_ENV_VAR= NAME_PREFIX + "envvar_obj.gif";                         //$NON-NLS-1$
188:         //        public static final String IMG_OBJS_JAVA_MODEL= NAME_PREFIX + "java_model_obj.gif"; //$NON-NLS-1$
189:         //        public static final String IMG_OBJS_UNKNOWN= NAME_PREFIX + "unknown_obj.gif"; //$NON-NLS-1$
190:         //        public static final String IMG_OBJS_LOCAL_VARIABLE= NAME_PREFIX + "localvariable_obj.gif"; //$NON-NLS-1$
191:         //        public static final String IMG_OBJS_PROJECT_SETTINGS= NAME_PREFIX + "settings_obj.gif"; //$NON-NLS-1$
192:         //
193:         //        public static final String IMG_OBJS_LIBRARY= NAME_PREFIX + "library_obj.gif";                 //$NON-NLS-1$
194:         //
195:         //        public static final String IMG_OBJS_JAVADOCTAG= NAME_PREFIX + "jdoc_tag_obj.gif";         //$NON-NLS-1$
196:         //        public static final String IMG_OBJS_HTMLTAG= NAME_PREFIX + "html_tag_obj.gif";                 //$NON-NLS-1$
197:         //
198:         public static final String IMG_OBJS_TEMPLATE = NAME_PREFIX
199:                         + "template_obj.gif"; //$NON-NLS-1$
200:         //        public static final String IMG_OBJS_SWT_TEMPLATE= NAME_PREFIX + "template_swt_obj.gif";                 //$NON-NLS-1$
201:         //        public static final String IMG_OBJS_TYPEVARIABLE= NAME_PREFIX + "typevariable_obj.gif";                 //$NON-NLS-1$
202:         //
203:         //        public static final String IMG_OBJS_EXCEPTION= NAME_PREFIX + "jexception_obj.gif";         //$NON-NLS-1$
204:         //        public static final String IMG_OBJS_ERROR= NAME_PREFIX + "jrtexception_obj.gif";                 //$NON-NLS-1$
205:         //
206:         //        public static final String IMG_OBJS_BREAKPOINT_INSTALLED= NAME_PREFIX + "brkpi_obj.gif"; //$NON-NLS-1$
207:         //        public static final String IMG_OBJS_QUICK_ASSIST= NAME_PREFIX + "quickassist_obj.gif"; //$NON-NLS-1$
208:         //        public static final String IMG_OBJS_QUICK_FIX= NAME_PREFIX + "quickfix_obj.gif"; //$NON-NLS-1$
209:         //        public static final String IMG_OBJS_FIXABLE_PROBLEM= NAME_PREFIX + "quickfix_warning_obj.gif"; //$NON-NLS-1$
210:         //        public static final String IMG_OBJS_FIXABLE_ERROR= NAME_PREFIX + "quickfix_error_obj.gif"; //$NON-NLS-1$
211:         //
212:         //        public static final String IMG_OBJS_ACCESSRULES_ATTRIB= NAME_PREFIX + "access_restriction_attrib.gif"; //$NON-NLS-1$
213:         //
214:         //        public static final String IMG_OBJS_REFACTORING_FATAL= NAME_PREFIX + "fatalerror_obj.gif"; //$NON-NLS-1$
215:         //        public static final String IMG_OBJS_REFACTORING_ERROR= NAME_PREFIX + "error_obj.gif"; //$NON-NLS-1$
216:         //        public static final String IMG_OBJS_REFACTORING_WARNING= NAME_PREFIX + "warning_obj.gif"; //$NON-NLS-1$
217:         //        public static final String IMG_OBJS_REFACTORING_INFO= NAME_PREFIX + "info_obj.gif";         //$NON-NLS-1$
218:         //
219:         //        public static final String IMG_OBJS_NLS_TRANSLATE= NAME_PREFIX + "translate.gif"; //$NON-NLS-1$
220:         //        public static final String IMG_OBJS_NLS_NEVER_TRANSLATE= NAME_PREFIX + "never_translate.gif"; //$NON-NLS-1$
221:         //        public static final String IMG_OBJS_NLS_SKIP= NAME_PREFIX + "skip.gif"; //$NON-NLS-1$
222:         //
223:         //        public static final String IMG_OBJS_SEARCH_READACCESS= NAME_PREFIX + "occ_read.gif"; //$NON-NLS-1$
224:         //        public static final String IMG_OBJS_SEARCH_WRITEACCESS= NAME_PREFIX + "occ_write.gif"; //$NON-NLS-1$
225:         //        public static final String IMG_OBJS_SEARCH_OCCURRENCE= NAME_PREFIX + "occ_match.gif"; //$NON-NLS-1$
226:         //
227:         //        public static final String IMG_OBJS_HELP= NAME_PREFIX + "help.gif"; //$NON-NLS-1$
228:
229:         /*
230:          * Set of predefined Image Descriptors.
231:          */
232:         //        public static final ImageDescriptor DESC_VIEW_ERRORWARNING_TAB= createUnManaged(T_EVIEW, "errorwarning_tab.gif"); //$NON-NLS-1$
233:         //        public static final ImageDescriptor DESC_VIEW_CLASSFILEGENERATION_TAB= createUnManaged(T_EVIEW, "classfilegeneration_tab.gif"); //$NON-NLS-1$
234:         //        public static final ImageDescriptor DESC_VIEW_JDKCOMPLIANCE_TAB= createUnManaged(T_EVIEW, "jdkcompliance_tab.gif"); //$NON-NLS-1$
235:         //
236:         //        public static final ImageDescriptor DESC_ELCL_FILTER= createUnManaged(T_ELCL, "filter_ps.gif"); //$NON-NLS-1$
237:         //        public static final ImageDescriptor DESC_DLCL_FILTER= createUnManaged(T_DLCL, "filter_ps.gif"); //$NON-NLS-1$
238:         //
239:         //        public static final ImageDescriptor DESC_ELCL_CODE_ASSIST= createUnManaged(T_ELCL, "metharg_obj.gif"); //$NON-NLS-1$
240:         //        public static final ImageDescriptor DESC_DLCL_CODE_ASSIST= createUnManaged(T_DLCL, "metharg_obj.gif"); //$NON-NLS-1$
241:         //
242:         //        public static final ImageDescriptor DESC_ELCL_VIEW_MENU= createManaged(T_ELCL, "view_menu.gif", IMG_ELCL_VIEW_MENU); //$NON-NLS-1$
243:         //        public static final ImageDescriptor DESC_DLCL_VIEW_MENU= createManaged(T_DLCL, "view_menu.gif", IMG_DLCL_VIEW_MENU); //$NON-NLS-1$
244:         //
245:         // public static final ImageDescriptor DESC_MISC_PUBLIC= createManagedFromKey(T_OBJ, IMG_MISC_PUBLIC);
246:         // public static final ImageDescriptor DESC_MISC_PROTECTED= createManagedFromKey(T_OBJ, IMG_MISC_PROTECTED);
247:         // public static final ImageDescriptor DESC_MISC_PRIVATE= createManagedFromKey(T_OBJ, IMG_MISC_PRIVATE);
248:         // public static final ImageDescriptor DESC_MISC_DEFAULT= createManagedFromKey(T_OBJ, IMG_MISC_DEFAULT);
249:
250:         public static final ImageDescriptor DESC_METHOD_PUBLIC = createManagedFromKey(T_OBJ, IMG_METHOD_PUBLIC);
251:         public static final ImageDescriptor DESC_METHOD_PROTECTED = createManagedFromKey(T_OBJ, IMG_METHOD_PROTECTED);
252:         public static final ImageDescriptor DESC_METHOD_PRIVATE = createManagedFromKey(T_OBJ, IMG_METHOD_PRIVATE);
253:         public static final ImageDescriptor DESC_METHOD_DEFAULT = createManagedFromKey(T_OBJ, IMG_METHOD_DEFAULT);
254:
255:         public static final ImageDescriptor DESC_FUNC_PUBLIC = createManagedFromKey(T_OBJ, IMG_FUNC_PUBLIC);
256:         public static final ImageDescriptor DESC_FUNC_PROTECTED = createManagedFromKey(T_OBJ, IMG_FUNC_PROTECTED);
257:         public static final ImageDescriptor DESC_FUNC_PRIVATE = createManagedFromKey(T_OBJ, IMG_FUNC_PRIVATE);
258:         public static final ImageDescriptor DESC_FUNC_DEFAULT = createManagedFromKey(T_OBJ, IMG_FUNC_DEFAULT);
259:
260:
261:         
262:         //
263:         public static final ImageDescriptor DESC_FIELD_PUBLIC = createManagedFromKey(T_OBJ, IMG_FIELD_PUBLIC);
264:         public static final ImageDescriptor DESC_FIELD_PROTECTED = createManagedFromKey(T_OBJ, IMG_FIELD_PROTECTED);
265:         public static final ImageDescriptor DESC_FIELD_PRIVATE = createManagedFromKey(T_OBJ, IMG_FIELD_PRIVATE);
266:         public static final ImageDescriptor DESC_FIELD_DEFAULT = createManagedFromKey(T_OBJ, IMG_FIELD_DEFAULT);
267:         //        
268:         //        
269:         public static final ImageDescriptor DESC_TYPE_PUBLIC = createManagedFromKey(T_OBJ, IMG_TYPE_PUBLIC);
270:         public static final ImageDescriptor DESC_TYPE_PROTECTED = createManagedFromKey(T_OBJ, IMG_TYPE_PROTECTED);
271:         public static final ImageDescriptor DESC_TYPE_PRIVATE = createManagedFromKey(T_OBJ, IMG_TYPE_PRIVATE);
272:         public static final ImageDescriptor DESC_TYPE_DEFAULT = createManagedFromKey(T_OBJ, IMG_TYPE_DEFAULT);
273:         //        
274:         public static final ImageDescriptor DESC_TRACE_DEFAULT = createManagedFromKey(T_OBJ, IMG_TRACE_DEFAULT);
275:         //
276:         //        public static final ImageDescriptor DESC_MENU_SHIFT_RIGHT= createUnManaged(T_ETOOL, "shift_r_edit.gif");         //$NON-NLS-1$
277:         //        public static final ImageDescriptor DESC_MENU_SHIFT_LEFT= createUnManaged(T_ETOOL, "shift_l_edit.gif");         //$NON-NLS-1$
278:         //
279:         //        public static final ImageDescriptor DESC_MENU_REFRESH= createUnManaged(T_ETOOL, "refresh.gif");         //$NON-NLS-1$
280:         //        
281:         public static final ImageDescriptor DESC_IMG_ALPHA_SORTING = createManagedFromKey(T_EVIEW,IMG_ALPHA_SORTING);
282:         
283:         public static final ImageDescriptor DESC_OBJS_LOCK = createManagedFromKey(T_OBJ, IMG_OBJS_LOCK);
284:         // public static final ImageDescriptor DESC_OBJS_GHOST= createManagedFromKey(T_OBJ, IMG_OBJS_GHOST);
285:         // public static final ImageDescriptor DESC_OBJS_PACKDECL= createManagedFromKey(T_OBJ, IMG_OBJS_PACKDECL);
286:         public static final ImageDescriptor DESC_OBJS_IMPDECL = createManagedFromKey(T_OBJ, IMG_OBJS_IMPDECL);
287:         public static final ImageDescriptor DESC_OBJS_IMPCONT = createManagedFromKey(T_OBJ, IMG_OBJS_IMPCONT);
288:         // public static final ImageDescriptor DESC_OBJS_JSEARCH= createManagedFromKey(T_OBJ, IMG_OBJS_JSEARCH);
289:         // public static final ImageDescriptor DESC_OBJS_SEARCH_DECL= createManagedFromKey(T_OBJ, IMG_OBJS_SEARCH_DECL);
290:         // public static final ImageDescriptor DESC_OBJS_SEARCH_REF= createManagedFromKey(T_OBJ, IMG_OBJS_SEARCH_REF);
291:         // public static final ImageDescriptor DESC_OBJS_CUNIT= createManagedFromKey(T_OBJ, IMG_OBJS_CUNIT);
292:         public static final ImageDescriptor DESC_OBJS_CUNIT_RESOURCE = createManagedFromKey(T_OBJ, IMG_OBJS_CUNIT_RESOURCE);
293:         // public static final ImageDescriptor DESC_OBJS_CFILE= createManagedFromKey(T_OBJ, IMG_OBJS_CFILE);
294:         // public static final ImageDescriptor DESC_OBJS_CFILECLASS= createManagedFromKey(T_OBJ, IMG_OBJS_CFILECLASS);
295:         //        public static final ImageDescriptor DESC_ELCL_CLEAR= createUnManaged(T_ELCL, "clear_co.gif"); //$NON-NLS-1$
296:         // public static final ImageDescriptor DESC_DLCL_CLEAR= createUnManaged(T_DLCL, "clear_co.gif"); //$NON-NLS-1$
297:         // public static final ImageDescriptor DESC_OBJS_CFILEINT= createManagedFromKey(T_OBJ, IMG_OBJS_CFILEINT);
298:         public static final ImageDescriptor DESC_OBJS_PACKAGE = createManagedFromKey(T_OBJ, IMG_OBJS_PACKAGE);
299:         // public static final ImageDescriptor DESC_OBJS_EMPTY_LOGICAL_PACKAGE= createManagedFromKey(T_OBJ,
300:         // IMG_OBJS_EMPTY_LOGICAL_PACKAGE);
301:         // public static final ImageDescriptor DESC_OBJS_LOGICAL_PACKAGE= createManagedFromKey(T_OBJ,
302:         // IMG_OBJS_LOGICAL_PACKAGE);
303:         // public static final ImageDescriptor DESC_OBJS_EMPTY_PACKAGE_RESOURCES= createManagedFromKey(T_OBJ,
304:         // IMG_OBJS_EMPTY_PACK_RESOURCE);
305:         // public static final ImageDescriptor DESC_OBJS_EMPTY_PACKAGE= createManagedFromKey(T_OBJ, IMG_OBJS_EMPTY_PACKAGE);
306:         public static final ImageDescriptor DESC_OBJS_PACKFRAG_ROOT = createManagedFromKey(T_OBJ, IMG_OBJS_PACKFRAG_ROOT);
307:         // public static final ImageDescriptor DESC_OBJS_PROJECT_SETTINGS= createManagedFromKey(T_OBJ,
308:         // IMG_OBJS_PROJECT_SETTINGS);
309:         //
310:         // public static final ImageDescriptor DESC_OBJS_JAVA_MODEL= createManagedFromKey(T_OBJ, IMG_OBJS_JAVA_MODEL);
311:         //
312:         public static final ImageDescriptor DESC_OBJS_CLASS = createManagedFromKey(T_OBJ, IMG_OBJS_CLASS);
313:         // public static final ImageDescriptor DESC_OBJS_CLASS_DEFAULT= createManagedFromKey(T_OBJ, IMG_OBJS_CLASS_DEFAULT);
314:         public static final ImageDescriptor DESC_OBJS_SYSTEM = createManagedFromKey(T_OBJ, IMG_OBJS_SYSTEM);
315:
316:         public static final ImageDescriptor DESC_OBJS_MODULE = createManagedFromKey(T_OBJ, IMG_OBJS_MODULE);
317:
318:         public static final ImageDescriptor DESC_OBJS_VDM_LIBRARY = createManagedFromKey(T_OBJ, IMG_OBJS_VDM_LIBRARY);
319:         public static final ImageDescriptor DESC_OBJS_VDM_PER_SYNC = createManagedFromKey(T_OBJ, IMG_OBJS_VDM_PER_SYNC);
320:         //        
321:         //
322:         // public static final ImageDescriptor DESC_OBJS_INNER_CLASS_PUBLIC= createManagedFromKey(T_OBJ,
323:         // IMG_OBJS_INNER_CLASS_PUBLIC);
324:         // public static final ImageDescriptor DESC_OBJS_INNER_CLASS_DEFAULT= createManagedFromKey(T_OBJ,
325:         // IMG_OBJS_INNER_CLASS_DEFAULT);
326:         // public static final ImageDescriptor DESC_OBJS_INNER_CLASS_PROTECTED= createManagedFromKey(T_OBJ,
327:         // IMG_OBJS_INNER_CLASS_PROTECTED);
328:         // public static final ImageDescriptor DESC_OBJS_INNER_CLASS_PRIVATE= createManagedFromKey(T_OBJ,
329:         // IMG_OBJS_INNER_CLASS_PRIVATE);
330:         //
331:         // public static final ImageDescriptor DESC_OBJS_CLASSALT= createManagedFromKey(T_OBJ, IMG_OBJS_CLASSALT);
332:         //
333:         // public static final ImageDescriptor DESC_OBJS_INTERFACE= createManagedFromKey(T_OBJ, IMG_OBJS_INTERFACE);
334:         // public static final ImageDescriptor DESC_OBJS_INTERFACE_DEFAULT= createManagedFromKey(T_OBJ,
335:         // IMG_OBJS_INTERFACE_DEFAULT);
336:         //
337:         // public static final ImageDescriptor DESC_OBJS_INNER_INTERFACE_PUBLIC= createManagedFromKey(T_OBJ,
338:         // IMG_OBJS_INNER_INTERFACE_PUBLIC);
339:         // public static final ImageDescriptor DESC_OBJS_INNER_INTERFACE_DEFAULT= createManagedFromKey(T_OBJ,
340:         // IMG_OBJS_INNER_INTERFACE_DEFAULT);
341:         // public static final ImageDescriptor DESC_OBJS_INNER_INTERFACE_PROTECTED= createManagedFromKey(T_OBJ,
342:         // IMG_OBJS_INNER_INTERFACE_PROTECTED);
343:         // public static final ImageDescriptor DESC_OBJS_INNER_INTERFACE_PRIVATE= createManagedFromKey(T_OBJ,
344:         // IMG_OBJS_INNER_INTERFACE_PRIVATE);
345:         //
346:         // public static final ImageDescriptor DESC_OBJS_INTERFACEALT= createManagedFromKey(T_OBJ, IMG_OBJS_INTERFACEALT);
347:         //
348:         // public static final ImageDescriptor DESC_OBJS_ANNOTATION= createManagedFromKey(T_OBJ, IMG_OBJS_ANNOTATION);
349:         // public static final ImageDescriptor DESC_OBJS_ANNOTATION_DEFAULT= createManagedFromKey(T_OBJ,
350:         // IMG_OBJS_ANNOTATION_DEFAULT);
351:         // public static final ImageDescriptor DESC_OBJS_ANNOTATION_PROTECTED= createManagedFromKey(T_OBJ,
352:         // IMG_OBJS_ANNOTATION_PROTECTED);
353:         // public static final ImageDescriptor DESC_OBJS_ANNOTATION_PRIVATE= createManagedFromKey(T_OBJ,
354:         // IMG_OBJS_ANNOTATION_PRIVATE);
355:         // public static final ImageDescriptor DESC_OBJS_ANNOTATION_ALT= createManagedFromKey(T_OBJ,
356:         // IMG_OBJS_ANNOTATION_ALT);
357:         //
358:         // public static final ImageDescriptor DESC_OBJS_ENUM= createManagedFromKey(T_OBJ, IMG_OBJS_ENUM);
359:         // public static final ImageDescriptor DESC_OBJS_ENUM_DEFAULT= createManagedFromKey(T_OBJ, IMG_OBJS_ENUM_DEFAULT);
360:         // public static final ImageDescriptor DESC_OBJS_ENUM_PROTECTED= createManagedFromKey(T_OBJ,
361:         // IMG_OBJS_ENUM_PROTECTED);
362:         // public static final ImageDescriptor DESC_OBJS_ENUM_PRIVATE= createManagedFromKey(T_OBJ, IMG_OBJS_ENUM_PRIVATE);
363:         // public static final ImageDescriptor DESC_OBJS_ENUM_ALT= createManagedFromKey(T_OBJ, IMG_OBJS_ENUM_ALT);
364:         //
365:         // public static final ImageDescriptor DESC_OBJS_JAR= createManagedFromKey(T_OBJ, IMG_OBJS_JAR);
366:         // public static final ImageDescriptor DESC_OBJS_EXTJAR= createManagedFromKey(T_OBJ, IMG_OBJS_EXTJAR);
367:         // public static final ImageDescriptor DESC_OBJS_JAR_WSRC= createManagedFromKey(T_OBJ, IMG_OBJS_JAR_WSRC);
368:         // public static final ImageDescriptor DESC_OBJS_EXTJAR_WSRC= createManagedFromKey(T_OBJ, IMG_OBJS_EXTJAR_WSRC);
369:         //
370:          public static final ImageDescriptor DESC_OBJS_CLASSFOLDER= createManagedFromKey(T_OBJ, IMG_OBJS_CLASSFOLDER);
371:         // public static final ImageDescriptor DESC_OBJS_CLASSFOLDER_WSRC= createManagedFromKey(T_OBJ,
372:         // IMG_OBJS_CLASSFOLDER_WSRC);
373:         //
374:         // public static final ImageDescriptor DESC_OBJS_ENV_VAR= createManagedFromKey(T_OBJ, IMG_OBJS_ENV_VAR);
375:         //
376:         // public static final ImageDescriptor DESC_OBJS_LIBRARY= createManagedFromKey(T_OBJ, IMG_OBJS_LIBRARY);
377:         //
378:         // public static final ImageDescriptor DESC_OBJS_JAVADOCTAG= createManagedFromKey(T_OBJ, IMG_OBJS_JAVADOCTAG);
379:         // public static final ImageDescriptor DESC_OBJS_HTMLTAG= createManagedFromKey(T_OBJ, IMG_OBJS_HTMLTAG);
380:         //
381:         public static final ImageDescriptor DESC_OBJS_TEMPLATE = createManagedFromKey(T_OBJ, IMG_OBJS_TEMPLATE);
382:         // public static final ImageDescriptor DESC_OBJS_SWT_TEMPLATE= createManagedFromKey(T_OBJ, IMG_OBJS_SWT_TEMPLATE);
383:         //
384:         // public static final ImageDescriptor DESC_OBJS_TYPEVARIABLE= createManagedFromKey(T_OBJ, IMG_OBJS_TYPEVARIABLE);
385:         //
386:         // public static final ImageDescriptor DESC_OBJS_EXCEPTION= createManagedFromKey(T_OBJ, IMG_OBJS_EXCEPTION);
387:         // public static final ImageDescriptor DESC_OBJS_BREAKPOINT_INSTALLED= createManagedFromKey(T_OBJ,
388:         // IMG_OBJS_BREAKPOINT_INSTALLED);
389:         // public static final ImageDescriptor DESC_OBJS_ERROR= createManagedFromKey(T_OBJ, IMG_OBJS_ERROR);
390:         // public static final ImageDescriptor DESC_OBJS_QUICK_ASSIST= createManagedFromKey(T_OBJ, IMG_OBJS_QUICK_ASSIST);
391:         // public static final ImageDescriptor DESC_OBJS_QUICK_FIX= createManagedFromKey(T_OBJ, IMG_OBJS_QUICK_FIX);
392:         // public static final ImageDescriptor DESC_OBJS_FIXABLE_PROBLEM= createManagedFromKey(T_OBJ,
393:         // IMG_OBJS_FIXABLE_PROBLEM);
394:         // public static final ImageDescriptor DESC_OBJS_FIXABLE_ERROR= createManagedFromKey(T_OBJ, IMG_OBJS_FIXABLE_ERROR);
395:         //
396:         // // public static final ImageDescriptor DESC_OBJS_SNIPPET_EVALUATING= createManaged(T_OBJ,
397:         // IMG_OBJS_SNIPPET_EVALUATING);
398:         //
399:         //        public static final ImageDescriptor DESC_OBJS_DEFAULT_CHANGE= createUnManaged(T_OBJ, "change.gif"); //$NON-NLS-1$
400:         //
401:         //        public static final ImageDescriptor DESC_OBJS_EXCLUSION_FILTER_ATTRIB= createUnManaged(T_OBJ, "exclusion_filter_attrib.gif"); //$NON-NLS-1$
402:         //        public static final ImageDescriptor DESC_OBJS_INCLUSION_FILTER_ATTRIB= createUnManaged(T_OBJ, "inclusion_filter_attrib.gif"); //$NON-NLS-1$
403:         // public static final ImageDescriptor DESC_OBJS_OUTPUT_FOLDER_ATTRIB= createUnManaged(T_OBJ, "output_folder_attrib.gif"); //$NON-NLS-1$
404:         //        public static final ImageDescriptor DESC_OBJS_SOURCE_ATTACH_ATTRIB= createUnManaged(T_OBJ, "source_attach_attrib.gif"); //$NON-NLS-1$
405:         //        public static final ImageDescriptor DESC_OBJS_JAVADOC_LOCATION_ATTRIB= createUnManaged(T_OBJ, "javadoc_location_attrib.gif"); //$NON-NLS-1$
406:         //
407:         // public static final ImageDescriptor DESC_OBJS_ACCESSRULES_ATTRIB= createManagedFromKey(T_OBJ,
408:         // IMG_OBJS_ACCESSRULES_ATTRIB);
409:         //        public static final ImageDescriptor DESC_OBJS_NATIVE_LIB_PATH_ATTRIB= createUnManaged(T_OBJ, "native_lib_path_attrib.gif"); //$NON-NLS-1$
410:         //
411:         // public static final ImageDescriptor DESC_OBJS_REFACTORING_FATAL= createManagedFromKey(T_OBJ,
412:         // IMG_OBJS_REFACTORING_FATAL);
413:         // public static final ImageDescriptor DESC_OBJS_REFACTORING_ERROR= createManagedFromKey(T_OBJ,
414:         // IMG_OBJS_REFACTORING_ERROR);
415:         // public static final ImageDescriptor DESC_OBJS_REFACTORING_WARNING= createManagedFromKey(T_OBJ,
416:         // IMG_OBJS_REFACTORING_WARNING);
417:         // public static final ImageDescriptor DESC_OBJS_REFACTORING_INFO= createManagedFromKey(T_OBJ,
418:         // IMG_OBJS_REFACTORING_INFO);
419:         //
420:         // public static final ImageDescriptor DESC_OBJS_NLS_TRANSLATE= createManagedFromKey(T_OBJ, IMG_OBJS_NLS_TRANSLATE);
421:         // public static final ImageDescriptor DESC_OBJS_NLS_NEVER_TRANSLATE= createManagedFromKey(T_OBJ,
422:         // IMG_OBJS_NLS_NEVER_TRANSLATE);
423:         // public static final ImageDescriptor DESC_OBJS_NLS_SKIP= createManagedFromKey(T_OBJ, IMG_OBJS_NLS_SKIP);
424:         //
425:         // public static final ImageDescriptor DESC_OBJS_UNKNOWN= createManagedFromKey(T_OBJ, IMG_OBJS_UNKNOWN);
426:         //
427:         //        public static final ImageDescriptor DESC_OBJS_TYPE_SEPARATOR= createUnManaged(T_OBJ, "type_separator.gif"); //$NON-NLS-1$
428:         //
429:         // public static final ImageDescriptor DESC_OBJS_SEARCH_READACCESS= createManagedFromKey(T_OBJ,
430:         // IMG_OBJS_SEARCH_READACCESS);
431:         // public static final ImageDescriptor DESC_OBJS_SEARCH_WRITEACCESS= createManagedFromKey(T_OBJ,
432:         // IMG_OBJS_SEARCH_WRITEACCESS);
433:         // public static final ImageDescriptor DESC_OBJS_SEARCH_OCCURRENCE= createManagedFromKey(T_OBJ,
434:         // IMG_OBJS_SEARCH_OCCURRENCE);
435:         //
436:         // public static final ImageDescriptor DESC_OBJS_LOCAL_VARIABLE= createManagedFromKey(T_OBJ,
437:         // IMG_OBJS_LOCAL_VARIABLE);
438:         //
439:         // public static final ImageDescriptor DESC_OBJS_HELP= createManagedFromKey(T_ELCL, IMG_OBJS_HELP);
440:         //
441:         // public static final ImageDescriptor DESC_ELCL_ADD_TO_BP= createUnManaged(T_ELCL, "add_to_buildpath.gif"); //$NON-NLS-1$
442:         // public static final ImageDescriptor DESC_ELCL_REMOVE_FROM_BP= createUnManaged(T_ELCL, "remove_from_buildpath.gif"); //$NON-NLS-1$
443:         // public static final ImageDescriptor DESC_ELCL_INCLUSION= createUnManaged(T_ELCL, "inclusion_filter_attrib.gif"); //$NON-NLS-1$
444:         // public static final ImageDescriptor DESC_ELCL_EXCLUSION= createUnManaged(T_ELCL, "exclusion_filter_attrib.gif"); //$NON-NLS-1$
445:         //// public static final ImageDescriptor DESC_ELCL_INCLUSION_UNDO= createUnManaged(T_ELCL, "inclusion_filter_attrib_undo.gif"); //$NON-NLS-1$
446:         //// public static final ImageDescriptor DESC_ELCL_EXCLUSION_UNDO= createUnManaged(T_ELCL, "exclusion_filter_attrib_undo.gif"); //$NON-NLS-1$
447:         //
448:         // public static final ImageDescriptor DESC_DLCL_ADD_TO_BP= createUnManaged(T_DLCL, "add_to_buildpath.gif"); //$NON-NLS-1$
449:         // public static final ImageDescriptor DESC_DLCL_REMOVE_FROM_BP= createUnManaged(T_DLCL, "remove_from_buildpath.gif"); //$NON-NLS-1$
450:         // public static final ImageDescriptor DESC_DLCL_INCLUSION= createUnManaged(T_DLCL, "inclusion_filter_attrib.gif"); //$NON-NLS-1$
451:         // public static final ImageDescriptor DESC_DLCL_EXCLUSION= createUnManaged(T_DLCL, "exclusion_filter_attrib.gif"); //$NON-NLS-1$
452:         // public static final ImageDescriptor DESC_DLCL_OUTPUT_FOLDER_ATTRIB= createUnManaged(T_DLCL, "output_folder_attrib.gif"); //$NON-NLS-1$
453:         //// public static final ImageDescriptor DESC_DLCL_INCLUSION_UNDO= createUnManaged(T_DLCL, "inclusion_filter_attrib_undo.gif"); //$NON-NLS-1$
454:         //// public static final ImageDescriptor DESC_DLCL_EXCLUSION_UNDO= createUnManaged(T_DLCL, "exclusion_filter_attrib_undo.gif"); //$NON-NLS-1$
455:         //
456:         // public static final ImageDescriptor DESC_DLCL_ADD_LINKED_SOURCE_TO_BUILDPATH= createUnManaged(T_DLCL, "add_linked_source_to_buildpath.gif"); //$NON-NLS-1$
457:         // public static final ImageDescriptor DESC_ELCL_ADD_LINKED_SOURCE_TO_BUILDPATH= createUnManaged(T_ELCL, "add_linked_source_to_buildpath.gif"); //$NON-NLS-1$
458:         //
459:         // public static final ImageDescriptor DESC_DLCL_CONFIGURE_BUILDPATH= createUnManaged(T_DLCL, "configure_build_path.gif"); //$NON-NLS-1$
460:         // public static final ImageDescriptor DESC_ELCL_CONFIGURE_BUILDPATH= createUnManaged(T_ELCL, "configure_build_path.gif"); //$NON-NLS-1$
461:         //
462:         //        public static final ImageDescriptor DESC_DLCL_CONFIGURE_ANNOTATIONS= createUnManaged(T_DLCL, "configure_annotations.gif"); //$NON-NLS-1$
463:         //        public static final ImageDescriptor DESC_ELCL_CONFIGURE_ANNOTATIONS= createUnManaged(T_ELCL, "configure_annotations.gif"); //$NON-NLS-1$
464:         //
465:         // public static final ImageDescriptor DESC_DLCL_CONFIGURE_BUILDPATH_FILTERS= createUnManaged(T_DLCL, "configure_buildpath_filters.gif"); //$NON-NLS-1$
466:         // public static final ImageDescriptor DESC_ELCL_CONFIGURE_BUILDPATH_FILTERS= createUnManaged(T_ELCL, "configure_buildpath_filters.gif"); //$NON-NLS-1$
467:         //
468:         // public static final ImageDescriptor DESC_DLCL_CONFIGURE_OUTPUT_FOLDER= createUnManaged(T_DLCL, "configure_output_folder.gif"); //$NON-NLS-1$
469:         // public static final ImageDescriptor DESC_ELCL_CONFIGURE_OUTPUT_FOLDER= createUnManaged(T_ELCL, "configure_output_folder.gif"); //$NON-NLS-1$
470:         //
471:         // public static final ImageDescriptor DESC_DLCL_CONFIGURE_PROBLEM_SEVERITIES= createUnManaged(T_DLCL, "configure_problem_severity.gif"); //$NON-NLS-1$
472:         //        public static final ImageDescriptor DESC_ELCL_CONFIGURE_PROBLEM_SEVERITIES= createUnManaged(T_ELCL, "configure_problem_severity.gif"); //$NON-NLS-1$
473:         //
474:         // public static final ImageDescriptor DESC_DLCL_EXCLUDE_FROM_BUILDPATH= createUnManaged(T_DLCL, "exclude_from_buildpath.gif"); //$NON-NLS-1$
475:         // public static final ImageDescriptor DESC_ELCL_EXCLUDE_FROM_BUILDPATH= createUnManaged(T_ELCL, "exclude_from_buildpath.gif"); //$NON-NLS-1$
476:         //
477:         // public static final ImageDescriptor DESC_DLCL_INCLUDE_ON_BUILDPATH= createUnManaged(T_DLCL, "include_on_buildpath.gif"); //$NON-NLS-1$
478:         // public static final ImageDescriptor DESC_ELCL_INCLUDE_ON_BUILDPATH= createUnManaged(T_ELCL, "include_on_buildpath.gif"); //$NON-NLS-1$
479:         //
480:         // public static final ImageDescriptor DESC_DLCL_ADD_AS_SOURCE_FOLDER= createUnManaged(T_DLCL, "add_as_source_folder.gif"); //$NON-NLS-1$
481:         // public static final ImageDescriptor DESC_ELCL_ADD_AS_SOURCE_FOLDER= createUnManaged(T_ELCL, "add_as_source_folder.gif"); //$NON-NLS-1$
482:         //
483:         // public static final ImageDescriptor DESC_DLCL_REMOVE_AS_SOURCE_FOLDER= createUnManaged(T_DLCL, "remove_as_source_folder.gif"); //$NON-NLS-1$
484:         // public static final ImageDescriptor DESC_ELCL_REMOVE_AS_SOURCE_FOLDER= createUnManaged(T_ELCL, "remove_as_source_folder.gif"); //$NON-NLS-1$
485:         //
486:         // public static final ImageDescriptor DESC_DLCL_COPY_QUALIFIED_NAME= createUnManaged(T_DLCL, "cpyqual_menu.gif"); //$NON-NLS-1$
487:         // public static final ImageDescriptor DESC_ELCL_COPY_QUALIFIED_NAME= createUnManaged(T_ELCL, "cpyqual_menu.gif"); //$NON-NLS-1$
488:         //
489:         // public static final ImageDescriptor DESC_DLCL_EXTERNAL_BROWSER= createUnManaged(T_DLCL, "external_browser.gif"); //$NON-NLS-1$
490:         //        public static final ImageDescriptor DESC_ELCL_EXTERNAL_BROWSER= createUnManaged(T_ELCL, "external_browser.gif"); //$NON-NLS-1$
491:         //
492:         //        public static final ImageDescriptor DESC_OBJ_OVERRIDES= createUnManaged(T_OBJ, "over_co.gif");                                         //$NON-NLS-1$
493:         //        public static final ImageDescriptor DESC_OBJ_IMPLEMENTS= createUnManaged(T_OBJ, "implm_co.gif");                                 //$NON-NLS-1$
494:         //
495:         public static final ImageDescriptor DESC_OVR_STATIC = createUnManagedCached(T_OVR, "static_co.gif"); //$NON-NLS-1$
496:         public static final ImageDescriptor DESC_OVR_FINAL = createUnManagedCached(T_OVR, "final_co.gif"); //$NON-NLS-1$
497:         public static final ImageDescriptor DESC_OVR_ABSTRACT = createUnManagedCached(T_OVR, "abstract_co.gif"); //$NON-NLS-1$
498:         //        public static final ImageDescriptor DESC_OVR_SYNCH= createUnManagedCached(T_OVR, "synch_co.gif");                                                 //$NON-NLS-1$
499:         public static final ImageDescriptor DESC_OVR_VOLATILE = createUnManagedCached(T_OVR, "volatile_co.gif"); //$NON-NLS-1$
500:         //        public static final ImageDescriptor DESC_OVR_TRANSIENT= createUnManagedCached(T_OVR, "transient_co.gif");                                                 //$NON-NLS-1$
501:         //
502:         public static final ImageDescriptor DESC_OVR_RUN= createUnManagedCached(T_OVR, "run_co.gif");                                                         //$NON-NLS-1$        
503:         public static final ImageDescriptor DESC_OVR_WARNING = createUnManagedCached(T_OVR, "warning_co.gif"); //$NON-NLS-1$
504:         public static final ImageDescriptor DESC_OVR_ERROR = createUnManagedCached(T_OVR, "error_co.gif"); //$NON-NLS-1$
505:         public static final ImageDescriptor DESC_OVR_OVERRIDES= createUnManagedCached(T_OVR, "over_co.gif");                                         //$NON-NLS-1$
506:         //        public static final ImageDescriptor DESC_OVR_IMPLEMENTS= createUnManagedCached(T_OVR, "implm_co.gif");                                 //$NON-NLS-1$
507:         //        public static final ImageDescriptor DESC_OVR_SYNCH_AND_OVERRIDES= createUnManagedCached(T_OVR, "sync_over.gif");         //$NON-NLS-1$
508:         //        public static final ImageDescriptor DESC_OVR_SYNCH_AND_IMPLEMENTS= createUnManagedCached(T_OVR, "sync_impl.gif"); //$NON-NLS-1$
509:         public static final ImageDescriptor DESC_OVR_CONSTRUCTOR = createUnManagedCached(T_OVR, "constr_ovr.gif"); //$NON-NLS-1$
510:         //        public static final ImageDescriptor DESC_OVR_DEPRECATED= createUnManagedCached(T_OVR, "deprecated.gif");                        //$NON-NLS-1$
511:         //        public static final ImageDescriptor DESC_OVR_FOCUS= createUnManagedCached(T_OVR, "focus_ovr.gif"); //$NON-NLS-1$
512:         //        public static final ImageDescriptor DESC_OVR_ANNOTATION= createUnManagedCached(T_OVR, "annotation_tsk.gif"); //$NON-NLS-1$
513:         //        public static final ImageDescriptor DESC_OVR_ENUM= createUnManagedCached(T_OVR, "enum_tsk.gif"); //$NON-NLS-1$
514:         //        public static final ImageDescriptor DESC_OVR_INTERFACE= createUnManagedCached(T_OVR, "interface_tsk.gif"); //$NON-NLS-1$
515:         //        public static final ImageDescriptor DESC_OVR_CLASS= createUnManagedCached(T_OVR, "class_tsk.gif"); //$NON-NLS-1$
516:         //        public static final ImageDescriptor DESC_OVR_ABSTRACT_CLASS= createUnManagedCached(T_OVR, "class_abs_tsk.gif"); //$NON-NLS-1$
517:         //        public static final ImageDescriptor DESC_OVR_LIBRARY= createUnManagedCached(T_OVR, "library_ovr.gif"); //$NON-NLS-1$
518:         //
519:         // // Call Hierarchy
520:         // public static final ImageDescriptor DESC_OVR_RECURSIVE= createUnManaged(T_OVR, "recursive_co.gif"); //$NON-NLS-1$
521:         // public static final ImageDescriptor DESC_OVR_MAX_LEVEL= createUnManaged(T_OVR, "maxlevel_co.gif"); //$NON-NLS-1$
522:         //
523:         //        public static final ImageDescriptor DESC_WIZBAN_NEWCLASS= createUnManaged(T_WIZBAN, "newclass_wiz.png");                         //$NON-NLS-1$
524:         //        public static final ImageDescriptor DESC_WIZBAN_NEWINT= createUnManaged(T_WIZBAN, "newint_wiz.png");                                 //$NON-NLS-1$
525:         //        public static final ImageDescriptor DESC_WIZBAN_NEWENUM= createUnManaged(T_WIZBAN, "newenum_wiz.png");                                 //$NON-NLS-1$
526:         //        public static final ImageDescriptor DESC_WIZBAN_NEWANNOT= createUnManaged(T_WIZBAN, "newannotation_wiz.png");                                 //$NON-NLS-1$
527:         //        public static final ImageDescriptor DESC_WIZBAN_NEWJPRJ= createUnManaged(T_WIZBAN, "newjprj_wiz.png");                         //$NON-NLS-1$
528:         //        public static final ImageDescriptor DESC_WIZBAN_NEWSRCFOLDR= createUnManaged(T_WIZBAN, "newsrcfldr_wiz.png");         //$NON-NLS-1$
529:         //        public static final ImageDescriptor DESC_WIZBAN_NEWMETH= createUnManaged(T_WIZBAN, "newmeth_wiz.png");                         //$NON-NLS-1$
530:         //        public static final ImageDescriptor DESC_WIZBAN_NEWPACK= createUnManaged(T_WIZBAN, "newpack_wiz.png");                         //$NON-NLS-1$
531:         //        public static final ImageDescriptor DESC_WIZBAN_NEWSCRAPPAGE= createUnManaged(T_WIZBAN, "newsbook_wiz.png");                //$NON-NLS-1$
532:         //        public static final ImageDescriptor DESC_WIZBAN_JAVA_LAUNCH= createUnManaged(T_WIZBAN, "java_app_wiz.png");                 //$NON-NLS-1$
533:         //        public static final ImageDescriptor DESC_WIZBAN_JAVA_ATTACH= createUnManaged(T_WIZBAN, "java_attach_wiz.png");         //$NON-NLS-1$
534:         //        public static final ImageDescriptor DESC_WIZBAN_REFACTOR= createUnManaged(T_WIZBAN, "refactor_wiz.png");                         //$NON-NLS-1$
535:         //        public static final ImageDescriptor DESC_WIZBAN_REFACTOR_FIELD= createUnManaged(T_WIZBAN, "fieldrefact_wiz.png");        //$NON-NLS-1$
536:         //        public static final ImageDescriptor DESC_WIZBAN_REFACTOR_METHOD= createUnManaged(T_WIZBAN, "methrefact_wiz.png");        //$NON-NLS-1$
537:         //        public static final ImageDescriptor DESC_WIZBAN_REFACTOR_TYPE= createUnManaged(T_WIZBAN, "typerefact_wiz.png");         //$NON-NLS-1$
538:         //        public static final ImageDescriptor DESC_WIZBAN_REFACTOR_PACKAGE= createUnManaged(T_WIZBAN, "packrefact_wiz.png"); //$NON-NLS-1$
539:         //        public static final ImageDescriptor DESC_WIZBAN_REFACTOR_CODE= createUnManaged(T_WIZBAN, "coderefact_wiz.png");         //$NON-NLS-1$
540:         //        public static final ImageDescriptor DESC_WIZBAN_REFACTOR_CU= createUnManaged(T_WIZBAN, "compunitrefact_wiz.png");        //$NON-NLS-1$
541:         //        public static final ImageDescriptor DESC_WIZBAN_REFACTOR_PULL_UP= createUnManaged(T_WIZBAN, "pullup_wiz.png");        //$NON-NLS-1$
542:         //        public static final ImageDescriptor DESC_WIZBAN_REFACTOR_FIX_DEPRECATION= createUnManaged(T_WIZBAN, "fixdepr_wiz.png");        //$NON-NLS-1$
543:         //        public static final ImageDescriptor DESC_WIZBAN_JAR_PACKAGER= createUnManaged(T_WIZBAN, "jar_pack_wiz.png");                 //$NON-NLS-1$
544:         //        public static final ImageDescriptor DESC_WIZBAN_FAT_JAR_PACKAGER= createUnManaged(T_WIZBAN, "export_runnable_jar_wiz.png");                 //$NON-NLS-1$
545:         //        public static final ImageDescriptor DESC_WIZBAN_REFACTOR_EXTRACT_SUPERTYPE= createUnManaged(T_WIZBAN, "extractsupertype_wiz.png");        //$NON-NLS-1$
546:         //        public static final ImageDescriptor DESC_WIZBAN_REPLACE_JAR= createUnManaged(T_WIZBAN, "replacejar_wiz.png");                 //$NON-NLS-1$
547:         //        public static final ImageDescriptor DESC_WIZBAN_JAVA_WORKINGSET= createUnManaged(T_WIZBAN, "java_workingset_wiz.png");//$NON-NLS-1$
548:         //        public static final ImageDescriptor DESC_WIZBAN_EXPORT_JAVADOC= createUnManaged(T_WIZBAN, "export_javadoc_wiz.png");//$NON-NLS-1$
549:         //        public static final ImageDescriptor DESC_WIZBAN_EXTERNALIZE_STRINGS= createUnManaged(T_WIZBAN, "extstr_wiz.png");//$NON-NLS-1$
550:         //        public static final ImageDescriptor DESC_WIZBAN_ADD_LIBRARY= createUnManaged(T_WIZBAN, "addlibrary_wiz.png");//$NON-NLS-1$
551:         //        public static final ImageDescriptor DESC_WIZBAN_CLEAN_UP= createUnManaged(T_WIZBAN, "cleanup_wiz.png"); //$NON-NLS-1$
552:         //
553:         //
554:         //        
555:         //        public static final ImageDescriptor DESC_TOOL_SHOW_EMPTY_PKG= createUnManaged(T_ETOOL, "show_empty_pkg.gif");                 //$NON-NLS-1$
556:         //        public static final ImageDescriptor DESC_TOOL_SHOW_SEGMENTS= createUnManaged(T_ETOOL, "segment_edit.gif");                 //$NON-NLS-1$
557:         //
558:         //        public static final ImageDescriptor DESC_TOOL_OPENTYPE= createUnManaged(T_ETOOL, "opentype.gif");                                         //$NON-NLS-1$
559:         //        public static final ImageDescriptor DESC_TOOL_NEWPROJECT= createUnManaged(T_ETOOL, "newjprj_wiz.gif");                         //$NON-NLS-1$
560:         //        public static final ImageDescriptor DESC_TOOL_NEWPACKAGE= createUnManaged(T_ETOOL, "newpack_wiz.gif");                         //$NON-NLS-1$
561:         //        public static final ImageDescriptor DESC_TOOL_NEWCLASS= createUnManaged(T_ETOOL, "newclass_wiz.gif");                                 //$NON-NLS-1$
562:         //        public static final ImageDescriptor DESC_TOOL_NEWINTERFACE= createUnManaged(T_ETOOL, "newint_wiz.gif");                         //$NON-NLS-1$
563:         //        public static final ImageDescriptor DESC_TOOL_NEWSNIPPET= createUnManaged(T_ETOOL, "newsbook_wiz.gif");                         //$NON-NLS-1$
564:         // public static final ImageDescriptor DESC_TOOL_NEWPACKROOT= createUnManaged(T_ETOOL, "newpackfolder_wiz.gif"); //$NON-NLS-1$
565:         // public static final ImageDescriptor DESC_DLCL_NEWPACKROOT= createUnManaged(T_DLCL, "newpackfolder_wiz.gif"); //$NON-NLS-1$
566:         //
567:         //        public static final ImageDescriptor DESC_TOOL_CLASSPATH_ORDER= createUnManaged(T_OBJ, "cp_order_obj.gif");                 //$NON-NLS-1$
568:         //        public static final ImageDescriptor DESC_ELCL_COLLAPSEALL= createUnManaged(T_ELCL, "collapseall.gif"); //$NON-NLS-1$
569:         //
570:         // // Keys for correction proposal. We have to put the image into the registry since "code assist" doesn't
571:         // // have a life cycle. So no change to dispose icons.
572:         //
573:         //        public static final String IMG_CORRECTION_CHANGE= NAME_PREFIX + "correction_change.gif"; //$NON-NLS-1$
574:         //        public static final String IMG_CORRECTION_MOVE= NAME_PREFIX + "correction_move.gif"; //$NON-NLS-1$
575:         //        public static final String IMG_CORRECTION_RENAME= NAME_PREFIX + "correction_rename.gif"; //$NON-NLS-1$
576:         //        public static final String IMG_CORRECTION_LINKED_RENAME= NAME_PREFIX + "correction_linked_rename.gif"; //$NON-NLS-1$
577:         //        public static final String IMG_CORRECTION_DELETE_IMPORT= NAME_PREFIX + "correction_delete_import.gif"; //$NON-NLS-1$
578:         //        public static final String IMG_CORRECTION_LOCAL= NAME_PREFIX + "localvariable_obj.gif"; //$NON-NLS-1$
579:         //        public static final String IMG_CORRECTION_REMOVE= NAME_PREFIX + "remove_correction.gif"; //$NON-NLS-1$
580:         //        public static final String IMG_CORRECTION_ADD= NAME_PREFIX + "add_correction.gif"; //$NON-NLS-1$
581:         //        public static final String IMG_CORRECTION_CAST= NAME_PREFIX + "correction_cast.gif"; //$NON-NLS-1$
582:
583:         // outline
584:         //        public static final ImageDescriptor DESC_METHOD_PRIVATE = createManagedFromKey(T_OBJ, IMG_METHOD_PRIVATE);                                         //$NON-NLS-1$
585:         //
586:         //        public static final ImageDescriptor DESC_METHOD_PUBLIC = createManagedFromKey(T_OBJ, IMG_METHOD_PUBLIC);                                         //$NON-NLS-1$
587:         //
588:         //        public static final ImageDescriptor DESC_METHOD_PROTECTED = createManagedFromKey(T_OBJ, IMG_METHOD_PROTECTED);                                         //$NON-NLS-1$
589:         //
590:         //        public static final ImageDescriptor DESC_METHOD_DEFAULT = createManagedFromKey(T_OBJ, IMG_METHOD_DEFAULT);                                                  //$NON-NLS-1$
591:         //
592:         // public static final ImageDescriptor DESC_OBJS_SYSTEM = createManagedFromKey(T_OBJ, IMG_OBJS_SYSTEM);
593:         //
594:         // public static final ImageDescriptor DESC_OBJS_CLASS = createManagedFromKey(T_DLCL, IMG_OBJS_CLASS);
595:         //
596:         // public static final ImageDescriptor DESC_OBJS_MODULE = createManagedFromKey(T_DLCL, IMG_OBJS_MODULE);
597:         //
598:         // public static final ImageDescriptor DESC_TRACE_DEFAULT = createManagedFromKey(T_OBJ, IMG_TRACE_DEFAULT);
599:         //
600:         // public static final ImageDescriptor DESC_OBJS_LOCK = createManagedFromKey(T_OBJ, IMG_OBJS_LOCK);
601:         //
602:         // public static final ImageDescriptor DESC_TYPE_PRIVATE = createManagedFromKey(T_OBJ, IMG_TYPE_PRIVATE);
603:         //
604:         // public static final ImageDescriptor DESC_TYPE_PUBLIC = createManagedFromKey(T_OBJ, IMG_TYPE_PUBLIC);
605:         //
606:         // public static final ImageDescriptor DESC_TYPE_PROTECTED = createManagedFromKey(T_OBJ, IMG_TYPE_PROTECTED);
607:         //
608:         // public static final ImageDescriptor DESC_TYPE_DEFAULT = createManagedFromKey(T_OBJ, IMG_TYPE_DEFAULT);
609:         //
610:         // public static final ImageDescriptor DESC_FIELD_PRIVATE = createManagedFromKey(T_OBJ, IMG_FIELD_PRIVATE);
611:         //
612:         // public static final ImageDescriptor DESC_FIELD_PUBLIC = createManagedFromKey(T_OBJ, IMG_FIELD_PUBLIC);
613:         //
614:         // public static final ImageDescriptor DESC_FIELD_PROTECTED = createManagedFromKey(T_OBJ, IMG_FIELD_PROTECTED);
615:         //
616:         // public static final ImageDescriptor DESC_FIELD_DEFAULT = createManagedFromKey(T_OBJ, IMG_FIELD_DEFAULT);
617:         //
618:         // //Explorer
619:         // public static final ImageDescriptor DESC_OBJS_PACKFRAG_ROOT = createManagedFromKey(T_OBJ,
620:         // IMG_OBJS_PACKFRAG_ROOT);
621:         //
622:         // public static final ImageDescriptor DESC_OBJS_PACKAGE = createManagedFromKey(T_OBJ, IMG_OBJS_PACKAGE);
623:
624:         
625:         
626:         
627:         static
628:         {
629:                 // createManagedFromKey(T_OBJ, IMG_CORRECTION_CHANGE);
630:                 // createManagedFromKey(T_OBJ, IMG_CORRECTION_MOVE);
631:                 // createManagedFromKey(T_OBJ, IMG_CORRECTION_RENAME);
632:                 // createManagedFromKey(T_OBJ, IMG_CORRECTION_LINKED_RENAME);
633:                 // createManagedFromKey(T_OBJ, IMG_CORRECTION_DELETE_IMPORT);
634:                 // createManagedFromKey(T_OBJ, IMG_CORRECTION_LOCAL);
635:                 // createManagedFromKey(T_OBJ, IMG_CORRECTION_REMOVE);
636:                 // createManagedFromKey(T_OBJ, IMG_CORRECTION_ADD);
637:                 // createManagedFromKey(T_OBJ, IMG_CORRECTION_CAST);
638:         }
639:
640:         private static final class CachedImageDescriptor extends ImageDescriptor
641:         {
642:                 private ImageDescriptor fDescriptor;
643:                 private ImageData fData;
644:
645:                 public CachedImageDescriptor(ImageDescriptor descriptor)
646:                 {
647:                         fDescriptor = descriptor;
648:                 }
649:
650:                 public ImageData getImageData()
651:                 {
652:                         if (fData == null)
653:                         {
654:                                 fData = fDescriptor.getImageData();
655:                         }
656:                         return fData;
657:                 }
658:         }
659:
660:         /**
661:          * Returns the image managed under the given key in this registry.
662:          *
663:          * @param key
664:          * the image's key
665:          * @return the image managed under the given key
666:          */
667:         public static Image get(String key)
668:         {
669:                 return getImageRegistry().get(key);
670:         }
671:
672:         /**
673:          * Returns the image descriptor for the given key in this registry. Might be called in a non-UI thread.
674:          *
675:          * @param key
676:          * the image's key
677:          * @return the image descriptor for the given key
678:          */
679:         public static ImageDescriptor getDescriptor(String key)
680:         {
681:                 if (fgImageRegistry == null)
682:                 {
683:                         return fgAvoidSWTErrorMap.get(key);
684:                 }
685:                 return getImageRegistry().getDescriptor(key);
686:         }
687:
688:         /**
689:          * Sets the three image descriptors for enabled, disabled, and hovered to an action. The actions are retrieved from
690:          * the *tool16 folders.
691:          *
692:          * @param action
693:          * the action
694:          * @param iconName
695:          * the icon name
696:          */
697:         public static void setToolImageDescriptors(IAction action, String iconName)
698:         {
699:                 setImageDescriptors(action, "tool16", iconName); //$NON-NLS-1$
700:         }
701:
702:         /**
703:          * Sets the three image descriptors for enabled, disabled, and hovered to an action. The actions are retrieved from
704:          * the *lcl16 folders.
705:          *
706:          * @param action
707:          * the action
708:          * @param iconName
709:          * the icon name
710:          */
711:         public static void setLocalImageDescriptors(IAction action, String iconName)
712:         {
713:                 setImageDescriptors(action, "lcl16", iconName); //$NON-NLS-1$
714:         }
715:
716:         /*
717:          * Helper method to access the image registry from the JavaPlugin class.
718:          */
719:         /* package */
720:         static ImageRegistry getImageRegistry()
721:         {
722:                 if (fgImageRegistry == null)
723:                 {
724:                         ImageRegistry registry = new ImageRegistry();
725:                         for (Iterator<String> iter = fgAvoidSWTErrorMap.keySet().iterator(); iter.hasNext();)
726:                         {
727:                                 String key = iter.next();
728:                                 registry.put(key, fgAvoidSWTErrorMap.get(key));
729:                         }
730:                         fgImageRegistry=registry;
731:                         fgAvoidSWTErrorMap = null;
732:                 }
733:                 return fgImageRegistry;
734:         }
735:
736:         // ---- Helper methods to access icons on the file system --------------------------------------
737:
738:         private static void setImageDescriptors(IAction action, String type,
739:                         String relPath)
740:         {
741:                 ImageDescriptor id = create("d" + type, relPath, false); //$NON-NLS-1$
742:                 if (id != null)
743:                         action.setDisabledImageDescriptor(id);
744:
745:                 /*
746:                  * id= create("c" + type, relPath, false); //$NON-NLS-1$ if (id != null) action.setHoverImageDescriptor(id);
747:                  */
748:
749:                 ImageDescriptor descriptor = create("e" + type, relPath, true); //$NON-NLS-1$
750:                 action.setHoverImageDescriptor(descriptor);
751:                 action.setImageDescriptor(descriptor);
752:         }
753:
754:         private static ImageDescriptor createManagedFromKey(String prefix,
755:                         String key)
756:         {
757:                 return createManaged(prefix, key.substring(NAME_PREFIX_LENGTH), key);
758:         }
759:
760:         private static ImageDescriptor createManaged(String prefix, String name,
761:                         String key)
762:         {
763:                 ImageDescriptor result = create(prefix, name, true);
764:
765:                 if (fgAvoidSWTErrorMap == null)
766:                 {
767:                         fgAvoidSWTErrorMap = new HashMap<String, ImageDescriptor>();
768:                 }
769:                 fgAvoidSWTErrorMap.put(key, result);
770:                 if (fgImageRegistry != null)
771:                 {
772:                         VdmUIPlugin.logErrorMessage("Image registry already defined"); //$NON-NLS-1$
773:                 }
774:                 return result;
775:         }
776:
777:         /*
778:          * Creates an image descriptor for the given prefix and name in the JDT UI bundle. The path can contain variables
779:          * like $NL$. If no image could be found, <code>useMissingImageDescriptor</code> decides if either the 'missing
780:          * image descriptor' is returned or <code>null</code>. or <code>null</code>.
781:          */
782:         private static ImageDescriptor create(String prefix, String name,
783:                         boolean useMissingImageDescriptor)
784:         {
785:                 IPath path = ICONS_PATH.append(prefix).append(name);
786:                 return createImageDescriptor(VdmUIPlugin.getDefault().getBundle(), path, useMissingImageDescriptor);
787:         }
788:
789:         /*
790:          * Creates an image descriptor for the given prefix and name in the JDT UI bundle. The path can contain variables
791:          * like $NL$. If no image could be found, the 'missing image descriptor' is returned.
792:          */
793:         private static ImageDescriptor createUnManaged(String prefix, String name)
794:         {
795:                 return create(prefix, name, true);
796:         }
797:
798:         /*
799:          * Creates an image descriptor for the given prefix and name in the JDT UI bundle and let tye descriptor cache the
800:          * image data. If no image could be found, the 'missing image descriptor' is returned.
801:          */
802:         private static ImageDescriptor createUnManagedCached(String prefix,
803:                         String name)
804:         {
805:                 return new CachedImageDescriptor(create(prefix, name, true));
806:         }
807:
808:         /*
809:          * Creates an image descriptor for the given path in a bundle. The path can contain variables like $NL$. If no image
810:          * could be found, <code>useMissingImageDescriptor</code> decides if either the 'missing image descriptor' is
811:          * returned or <code>null</code>. Added for 3.1.1.
812:          */
813:         public static ImageDescriptor createImageDescriptor(Bundle bundle,
814:                         IPath path, boolean useMissingImageDescriptor)
815:         {
816:                 URL url = FileLocator.find(bundle, path, null);
817:                 if (url != null)
818:                 {
819:                         return ImageDescriptor.createFromURL(url);
820:                 }
821:                 if (useMissingImageDescriptor)
822:                 {
823:                         return ImageDescriptor.getMissingImageDescriptor();
824:                 }
825:                 return null;
826:         }
827: }