001: /*******************************************************************************
002: * Copyright (c) 2000, 2007 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.jdt.internal.ui;
011:
012: import java.net.URL;
013: import java.util.HashMap;
014: import java.util.Iterator;
015:
016: import org.eclipse.core.runtime.FileLocator;
017: import org.eclipse.core.runtime.IPath;
018: import org.eclipse.core.runtime.Path;
019:
020: import org.eclipse.swt.graphics.Image;
021: import org.eclipse.swt.graphics.ImageData;
022:
023: import org.eclipse.jface.action.IAction;
024: import org.eclipse.jface.resource.ImageDescriptor;
025: import org.eclipse.jface.resource.ImageRegistry;
026:
027: import org.osgi.framework.Bundle;
028:
029: /**
030: * Bundle of most images used by the Java plug-in.
031: */
032: public class JavaPluginImages {
033:
034: public static final IPath ICONS_PATH = new Path("$nl$/icons/full"); //$NON-NLS-1$
035:
036: private static final String NAME_PREFIX = "org.eclipse.jdt.ui."; //$NON-NLS-1$
037: private static final int NAME_PREFIX_LENGTH = NAME_PREFIX.length();
038:
039: // The plug-in registry
040: private static ImageRegistry fgImageRegistry = null;
041: private static HashMap fgAvoidSWTErrorMap = null;
042:
043: private static final String T_OBJ = "obj16"; //$NON-NLS-1$
044: private static final String T_OVR = "ovr16"; //$NON-NLS-1$
045: private static final String T_WIZBAN = "wizban"; //$NON-NLS-1$
046: private static final String T_ELCL = "elcl16"; //$NON-NLS-1$
047: private static final String T_DLCL = "dlcl16"; //$NON-NLS-1$
048: private static final String T_ETOOL = "etool16"; //$NON-NLS-1$
049: private static final String T_EVIEW = "eview16"; //$NON-NLS-1$
050:
051: /*
052: * Keys for images available from the Java-UI plug-in image registry.
053: */
054: public static final String IMG_MISC_PUBLIC = NAME_PREFIX
055: + "methpub_obj.gif"; //$NON-NLS-1$
056: public static final String IMG_MISC_PROTECTED = NAME_PREFIX
057: + "methpro_obj.gif"; //$NON-NLS-1$
058: public static final String IMG_MISC_PRIVATE = NAME_PREFIX
059: + "methpri_obj.gif"; //$NON-NLS-1$
060: public static final String IMG_MISC_DEFAULT = NAME_PREFIX
061: + "methdef_obj.gif"; //$NON-NLS-1$
062:
063: public static final String IMG_FIELD_PUBLIC = NAME_PREFIX
064: + "field_public_obj.gif"; //$NON-NLS-1$
065: public static final String IMG_FIELD_PROTECTED = NAME_PREFIX
066: + "field_protected_obj.gif"; //$NON-NLS-1$
067: public static final String IMG_FIELD_PRIVATE = NAME_PREFIX
068: + "field_private_obj.gif"; //$NON-NLS-1$
069: public static final String IMG_FIELD_DEFAULT = NAME_PREFIX
070: + "field_default_obj.gif"; //$NON-NLS-1$
071:
072: public static final String IMG_ELCL_VIEW_MENU = NAME_PREFIX
073: + T_ELCL + "view_menu.gif"; //$NON-NLS-1$
074: public static final String IMG_DLCL_VIEW_MENU = NAME_PREFIX
075: + T_DLCL + "view_menu.gif"; //$NON-NLS-1$
076:
077: public static final String IMG_OBJS_GHOST = NAME_PREFIX
078: + "ghost.gif"; //$NON-NLS-1$
079: public static final String IMG_OBJS_SEARCH_TSK = NAME_PREFIX
080: + "search_tsk.gif"; //$NON-NLS-1$
081: public static final String IMG_OBJS_PACKDECL = NAME_PREFIX
082: + "packd_obj.gif"; //$NON-NLS-1$
083: public static final String IMG_OBJS_IMPDECL = NAME_PREFIX
084: + "imp_obj.gif"; //$NON-NLS-1$
085: public static final String IMG_OBJS_IMPCONT = NAME_PREFIX
086: + "impc_obj.gif"; //$NON-NLS-1$
087: public static final String IMG_OBJS_JSEARCH = NAME_PREFIX
088: + "jsearch_obj.gif"; //$NON-NLS-1$
089: public static final String IMG_OBJS_SEARCH_DECL = NAME_PREFIX
090: + "search_decl_obj.gif"; //$NON-NLS-1$
091: public static final String IMG_OBJS_SEARCH_REF = NAME_PREFIX
092: + "search_ref_obj.gif"; //$NON-NLS-1$
093: public static final String IMG_OBJS_CLASS = NAME_PREFIX
094: + "class_obj.gif"; //$NON-NLS-1$
095: public static final String IMG_OBJS_CLASSALT = NAME_PREFIX
096: + "classfo_obj.gif"; //$NON-NLS-1$
097: public static final String IMG_OBJS_CLASS_DEFAULT = NAME_PREFIX
098: + "class_default_obj.gif"; //$NON-NLS-1$
099:
100: public static final String IMG_OBJS_INNER_CLASS_PUBLIC = NAME_PREFIX
101: + "innerclass_public_obj.gif"; //$NON-NLS-1$
102: public static final String IMG_OBJS_INNER_CLASS_DEFAULT = NAME_PREFIX
103: + "innerclass_default_obj.gif"; //$NON-NLS-1$
104: public static final String IMG_OBJS_INNER_CLASS_PROTECTED = NAME_PREFIX
105: + "innerclass_protected_obj.gif"; //$NON-NLS-1$
106: public static final String IMG_OBJS_INNER_CLASS_PRIVATE = NAME_PREFIX
107: + "innerclass_private_obj.gif"; //$NON-NLS-1$
108:
109: public static final String IMG_OBJS_INTERFACE = NAME_PREFIX
110: + "int_obj.gif"; //$NON-NLS-1$
111: public static final String IMG_OBJS_INTERFACEALT = NAME_PREFIX
112: + "intf_obj.gif"; //$NON-NLS-1$
113: public static final String IMG_OBJS_INTERFACE_DEFAULT = NAME_PREFIX
114: + "int_default_obj.gif"; //$NON-NLS-1$
115:
116: public static final String IMG_OBJS_INNER_INTERFACE_PUBLIC = NAME_PREFIX
117: + "innerinterface_public_obj.gif"; //$NON-NLS-1$
118: public static final String IMG_OBJS_INNER_INTERFACE_DEFAULT = NAME_PREFIX
119: + "innerinterface_default_obj.gif"; //$NON-NLS-1$
120: public static final String IMG_OBJS_INNER_INTERFACE_PROTECTED = NAME_PREFIX
121: + "innerinterface_protected_obj.gif"; //$NON-NLS-1$
122: public static final String IMG_OBJS_INNER_INTERFACE_PRIVATE = NAME_PREFIX
123: + "innerinterface_private_obj.gif"; //$NON-NLS-1$
124:
125: public static final String IMG_OBJS_ANNOTATION = NAME_PREFIX
126: + "annotation_obj.gif"; //$NON-NLS-1$
127: public static final String IMG_OBJS_ANNOTATION_DEFAULT = NAME_PREFIX
128: + "annotation_default_obj.gif"; //$NON-NLS-1$
129: public static final String IMG_OBJS_ANNOTATION_PROTECTED = NAME_PREFIX
130: + "annotation_protected_obj.gif"; //$NON-NLS-1$
131: public static final String IMG_OBJS_ANNOTATION_PRIVATE = NAME_PREFIX
132: + "annotation_private_obj.gif"; //$NON-NLS-1$
133: public static final String IMG_OBJS_ANNOTATION_ALT = NAME_PREFIX
134: + "annotation_alt_obj.gif"; //$NON-NLS-1$
135:
136: public static final String IMG_OBJS_ENUM = NAME_PREFIX
137: + "enum_obj.gif"; //$NON-NLS-1$
138: public static final String IMG_OBJS_ENUM_DEFAULT = NAME_PREFIX
139: + "enum_default_obj.gif"; //$NON-NLS-1$
140: public static final String IMG_OBJS_ENUM_PROTECTED = NAME_PREFIX
141: + "enum_protected_obj.gif"; //$NON-NLS-1$
142: public static final String IMG_OBJS_ENUM_PRIVATE = NAME_PREFIX
143: + "enum_private_obj.gif"; //$NON-NLS-1$
144: public static final String IMG_OBJS_ENUM_ALT = NAME_PREFIX
145: + "enum_alt_obj.gif"; //$NON-NLS-1$
146:
147: public static final String IMG_OBJS_CUNIT = NAME_PREFIX
148: + "jcu_obj.gif"; //$NON-NLS-1$
149: public static final String IMG_OBJS_CUNIT_RESOURCE = NAME_PREFIX
150: + "jcu_resource_obj.gif"; //$NON-NLS-1$
151: public static final String IMG_OBJS_CFILE = NAME_PREFIX
152: + "classf_obj.gif"; //$NON-NLS-1$
153: public static final String IMG_OBJS_CFILECLASS = NAME_PREFIX
154: + "class_obj.gif"; //$NON-NLS-1$
155: public static final String IMG_OBJS_CFILEINT = NAME_PREFIX
156: + "int_obj.gif"; //$NON-NLS-1$
157: public static final String IMG_OBJS_LOGICAL_PACKAGE = NAME_PREFIX
158: + "logical_package_obj.gif";//$NON-NLS-1$
159: public static final String IMG_OBJS_EMPTY_LOGICAL_PACKAGE = NAME_PREFIX
160: + "empty_logical_package_obj.gif";//$NON-NLS-1$
161: public static final String IMG_OBJS_PACKAGE = NAME_PREFIX
162: + "package_obj.gif"; //$NON-NLS-1$
163: public static final String IMG_OBJS_EMPTY_PACK_RESOURCE = NAME_PREFIX
164: + "empty_pack_fldr_obj.gif"; //$NON-NLS-1$
165: public static final String IMG_OBJS_EMPTY_PACKAGE = NAME_PREFIX
166: + "empty_pack_obj.gif"; //$NON-NLS-1$
167: public static final String IMG_OBJS_PACKFRAG_ROOT = NAME_PREFIX
168: + "packagefolder_obj.gif"; //$NON-NLS-1$
169: public static final String IMG_OBJS_JAR = NAME_PREFIX
170: + "jar_obj.gif"; //$NON-NLS-1$
171: public static final String IMG_OBJS_EXTJAR = NAME_PREFIX
172: + "jar_l_obj.gif"; //$NON-NLS-1$
173: public static final String IMG_OBJS_JAR_WSRC = NAME_PREFIX
174: + "jar_src_obj.gif"; //$NON-NLS-1$
175: public static final String IMG_OBJS_EXTJAR_WSRC = NAME_PREFIX
176: + "jar_lsrc_obj.gif"; //$NON-NLS-1$
177: public static final String IMG_OBJS_ENV_VAR = NAME_PREFIX
178: + "envvar_obj.gif"; //$NON-NLS-1$
179: public static final String IMG_OBJS_JAVA_MODEL = NAME_PREFIX
180: + "java_model_obj.gif"; //$NON-NLS-1$
181: public static final String IMG_OBJS_UNKNOWN = NAME_PREFIX
182: + "unknown_obj.gif"; //$NON-NLS-1$
183: public static final String IMG_OBJS_LOCAL_VARIABLE = NAME_PREFIX
184: + "localvariable_obj.gif"; //$NON-NLS-1$
185: public static final String IMG_OBJS_PROJECT_SETTINGS = NAME_PREFIX
186: + "settings_obj.gif"; //$NON-NLS-1$
187:
188: public static final String IMG_OBJS_LIBRARY = NAME_PREFIX
189: + "library_obj.gif"; //$NON-NLS-1$
190:
191: public static final String IMG_OBJS_JAVADOCTAG = NAME_PREFIX
192: + "jdoc_tag_obj.gif"; //$NON-NLS-1$
193: public static final String IMG_OBJS_HTMLTAG = NAME_PREFIX
194: + "html_tag_obj.gif"; //$NON-NLS-1$
195:
196: public static final String IMG_OBJS_TEMPLATE = NAME_PREFIX
197: + "template_obj.gif"; //$NON-NLS-1$
198: public static final String IMG_OBJS_SWT_TEMPLATE = NAME_PREFIX
199: + "template_swt_obj.gif"; //$NON-NLS-1$
200: public static final String IMG_OBJS_TYPEVARIABLE = NAME_PREFIX
201: + "typevariable_obj.gif"; //$NON-NLS-1$
202:
203: public static final String IMG_OBJS_EXCEPTION = NAME_PREFIX
204: + "jexception_obj.gif"; //$NON-NLS-1$
205: public static final String IMG_OBJS_ERROR = NAME_PREFIX
206: + "jrtexception_obj.gif"; //$NON-NLS-1$
207:
208: public static final String IMG_OBJS_BREAKPOINT_INSTALLED = NAME_PREFIX
209: + "brkpi_obj.gif"; //$NON-NLS-1$
210: public static final String IMG_OBJS_QUICK_ASSIST = NAME_PREFIX
211: + "quickassist_obj.gif"; //$NON-NLS-1$
212: public static final String IMG_OBJS_FIXABLE_PROBLEM = NAME_PREFIX
213: + "quickfix_warning_obj.gif"; //$NON-NLS-1$
214: public static final String IMG_OBJS_FIXABLE_ERROR = NAME_PREFIX
215: + "quickfix_error_obj.gif"; //$NON-NLS-1$
216:
217: public static final String IMG_OBJS_ACCESSRULES_ATTRIB = NAME_PREFIX
218: + "access_restriction_attrib.gif"; //$NON-NLS-1$
219:
220: public static final String IMG_OBJS_REFACTORING_FATAL = NAME_PREFIX
221: + "fatalerror_obj.gif"; //$NON-NLS-1$
222: public static final String IMG_OBJS_REFACTORING_ERROR = NAME_PREFIX
223: + "error_obj.gif"; //$NON-NLS-1$
224: public static final String IMG_OBJS_REFACTORING_WARNING = NAME_PREFIX
225: + "warning_obj.gif"; //$NON-NLS-1$
226: public static final String IMG_OBJS_REFACTORING_INFO = NAME_PREFIX
227: + "info_obj.gif"; //$NON-NLS-1$
228:
229: public static final String IMG_OBJS_NLS_TRANSLATE = NAME_PREFIX
230: + "translate.gif"; //$NON-NLS-1$
231: public static final String IMG_OBJS_NLS_NEVER_TRANSLATE = NAME_PREFIX
232: + "never_translate.gif"; //$NON-NLS-1$
233: public static final String IMG_OBJS_NLS_SKIP = NAME_PREFIX
234: + "skip.gif"; //$NON-NLS-1$
235:
236: public static final String IMG_OBJS_SEARCH_READACCESS = NAME_PREFIX
237: + "occ_read.gif"; //$NON-NLS-1$
238: public static final String IMG_OBJS_SEARCH_WRITEACCESS = NAME_PREFIX
239: + "occ_write.gif"; //$NON-NLS-1$
240: public static final String IMG_OBJS_SEARCH_OCCURRENCE = NAME_PREFIX
241: + "occ_match.gif"; //$NON-NLS-1$
242:
243: public static final String IMG_OBJS_HELP = NAME_PREFIX + "help.gif"; //$NON-NLS-1$
244:
245: /*
246: * Set of predefined Image Descriptors.
247: */
248: public static final ImageDescriptor DESC_VIEW_ERRORWARNING_TAB = createUnManaged(
249: T_EVIEW, "errorwarning_tab.gif"); //$NON-NLS-1$
250: public static final ImageDescriptor DESC_VIEW_CLASSFILEGENERATION_TAB = createUnManaged(
251: T_EVIEW, "classfilegeneration_tab.gif"); //$NON-NLS-1$
252: public static final ImageDescriptor DESC_VIEW_JDKCOMPLIANCE_TAB = createUnManaged(
253: T_EVIEW, "jdkcompliance_tab.gif"); //$NON-NLS-1$
254:
255: public static final ImageDescriptor DESC_ELCL_FILTER = createUnManaged(
256: T_ELCL, "filter_ps.gif"); //$NON-NLS-1$
257: public static final ImageDescriptor DESC_DLCL_FILTER = createUnManaged(
258: T_DLCL, "filter_ps.gif"); //$NON-NLS-1$
259:
260: public static final ImageDescriptor DESC_ELCL_CODE_ASSIST = createUnManaged(
261: T_ELCL, "metharg_obj.gif"); //$NON-NLS-1$
262: public static final ImageDescriptor DESC_DLCL_CODE_ASSIST = createUnManaged(
263: T_DLCL, "metharg_obj.gif"); //$NON-NLS-1$
264:
265: public static final ImageDescriptor DESC_ELCL_VIEW_MENU = createManaged(
266: T_ELCL, "view_menu.gif", IMG_ELCL_VIEW_MENU); //$NON-NLS-1$
267: public static final ImageDescriptor DESC_DLCL_VIEW_MENU = createManaged(
268: T_DLCL, "view_menu.gif", IMG_DLCL_VIEW_MENU); //$NON-NLS-1$
269:
270: public static final ImageDescriptor DESC_MISC_PUBLIC = createManagedFromKey(
271: T_OBJ, IMG_MISC_PUBLIC);
272: public static final ImageDescriptor DESC_MISC_PROTECTED = createManagedFromKey(
273: T_OBJ, IMG_MISC_PROTECTED);
274: public static final ImageDescriptor DESC_MISC_PRIVATE = createManagedFromKey(
275: T_OBJ, IMG_MISC_PRIVATE);
276: public static final ImageDescriptor DESC_MISC_DEFAULT = createManagedFromKey(
277: T_OBJ, IMG_MISC_DEFAULT);
278:
279: public static final ImageDescriptor DESC_FIELD_PUBLIC = createManagedFromKey(
280: T_OBJ, IMG_FIELD_PUBLIC);
281: public static final ImageDescriptor DESC_FIELD_PROTECTED = createManagedFromKey(
282: T_OBJ, IMG_FIELD_PROTECTED);
283: public static final ImageDescriptor DESC_FIELD_PRIVATE = createManagedFromKey(
284: T_OBJ, IMG_FIELD_PRIVATE);
285: public static final ImageDescriptor DESC_FIELD_DEFAULT = createManagedFromKey(
286: T_OBJ, IMG_FIELD_DEFAULT);
287:
288: public static final ImageDescriptor DESC_MENU_SHIFT_RIGHT = createUnManaged(
289: T_ETOOL, "shift_r_edit.gif"); //$NON-NLS-1$
290: public static final ImageDescriptor DESC_MENU_SHIFT_LEFT = createUnManaged(
291: T_ETOOL, "shift_l_edit.gif"); //$NON-NLS-1$
292:
293: public static final ImageDescriptor DESC_OBJS_GHOST = createManagedFromKey(
294: T_OBJ, IMG_OBJS_GHOST);
295: public static final ImageDescriptor DESC_OBJS_PACKDECL = createManagedFromKey(
296: T_OBJ, IMG_OBJS_PACKDECL);
297: public static final ImageDescriptor DESC_OBJS_IMPDECL = createManagedFromKey(
298: T_OBJ, IMG_OBJS_IMPDECL);
299: public static final ImageDescriptor DESC_OBJS_IMPCONT = createManagedFromKey(
300: T_OBJ, IMG_OBJS_IMPCONT);
301: public static final ImageDescriptor DESC_OBJS_JSEARCH = createManagedFromKey(
302: T_OBJ, IMG_OBJS_JSEARCH);
303: public static final ImageDescriptor DESC_OBJS_SEARCH_DECL = createManagedFromKey(
304: T_OBJ, IMG_OBJS_SEARCH_DECL);
305: public static final ImageDescriptor DESC_OBJS_SEARCH_REF = createManagedFromKey(
306: T_OBJ, IMG_OBJS_SEARCH_REF);
307: public static final ImageDescriptor DESC_OBJS_CUNIT = createManagedFromKey(
308: T_OBJ, IMG_OBJS_CUNIT);
309: public static final ImageDescriptor DESC_OBJS_CUNIT_RESOURCE = createManagedFromKey(
310: T_OBJ, IMG_OBJS_CUNIT_RESOURCE);
311: public static final ImageDescriptor DESC_OBJS_CFILE = createManagedFromKey(
312: T_OBJ, IMG_OBJS_CFILE);
313: public static final ImageDescriptor DESC_OBJS_CFILECLASS = createManagedFromKey(
314: T_OBJ, IMG_OBJS_CFILECLASS);
315: public static final ImageDescriptor DESC_ELCL_CLEAR = createUnManaged(
316: T_ELCL, "clear_co.gif"); //$NON-NLS-1$
317: public static final ImageDescriptor DESC_DLCL_CLEAR = createUnManaged(
318: T_DLCL, "clear_co.gif"); //$NON-NLS-1$
319: public static final ImageDescriptor DESC_OBJS_CFILEINT = createManagedFromKey(
320: T_OBJ, IMG_OBJS_CFILEINT);
321: public static final ImageDescriptor DESC_OBJS_PACKAGE = createManagedFromKey(
322: T_OBJ, IMG_OBJS_PACKAGE);
323: public static final ImageDescriptor DESC_OBJS_EMPTY_LOGICAL_PACKAGE = createManagedFromKey(
324: T_OBJ, IMG_OBJS_EMPTY_LOGICAL_PACKAGE);
325: public static final ImageDescriptor DESC_OBJS_LOGICAL_PACKAGE = createManagedFromKey(
326: T_OBJ, IMG_OBJS_LOGICAL_PACKAGE);
327: public static final ImageDescriptor DESC_OBJS_EMPTY_PACKAGE_RESOURCES = createManagedFromKey(
328: T_OBJ, IMG_OBJS_EMPTY_PACK_RESOURCE);
329: public static final ImageDescriptor DESC_OBJS_EMPTY_PACKAGE = createManagedFromKey(
330: T_OBJ, IMG_OBJS_EMPTY_PACKAGE);
331: public static final ImageDescriptor DESC_OBJS_PACKFRAG_ROOT = createManagedFromKey(
332: T_OBJ, IMG_OBJS_PACKFRAG_ROOT);
333: public static final ImageDescriptor DESC_OBJS_PROJECT_SETTINGS = createManagedFromKey(
334: T_OBJ, IMG_OBJS_PROJECT_SETTINGS);
335:
336: public static final ImageDescriptor DESC_OBJS_JAVA_MODEL = createManagedFromKey(
337: T_OBJ, IMG_OBJS_JAVA_MODEL);
338:
339: public static final ImageDescriptor DESC_OBJS_CLASS = createManagedFromKey(
340: T_OBJ, IMG_OBJS_CLASS);
341: public static final ImageDescriptor DESC_OBJS_CLASS_DEFAULT = createManagedFromKey(
342: T_OBJ, IMG_OBJS_CLASS_DEFAULT);
343:
344: public static final ImageDescriptor DESC_OBJS_INNER_CLASS_PUBLIC = createManagedFromKey(
345: T_OBJ, IMG_OBJS_INNER_CLASS_PUBLIC);
346: public static final ImageDescriptor DESC_OBJS_INNER_CLASS_DEFAULT = createManagedFromKey(
347: T_OBJ, IMG_OBJS_INNER_CLASS_DEFAULT);
348: public static final ImageDescriptor DESC_OBJS_INNER_CLASS_PROTECTED = createManagedFromKey(
349: T_OBJ, IMG_OBJS_INNER_CLASS_PROTECTED);
350: public static final ImageDescriptor DESC_OBJS_INNER_CLASS_PRIVATE = createManagedFromKey(
351: T_OBJ, IMG_OBJS_INNER_CLASS_PRIVATE);
352:
353: public static final ImageDescriptor DESC_OBJS_CLASSALT = createManagedFromKey(
354: T_OBJ, IMG_OBJS_CLASSALT);
355:
356: public static final ImageDescriptor DESC_OBJS_INTERFACE = createManagedFromKey(
357: T_OBJ, IMG_OBJS_INTERFACE);
358: public static final ImageDescriptor DESC_OBJS_INTERFACE_DEFAULT = createManagedFromKey(
359: T_OBJ, IMG_OBJS_INTERFACE_DEFAULT);
360:
361: public static final ImageDescriptor DESC_OBJS_INNER_INTERFACE_PUBLIC = createManagedFromKey(
362: T_OBJ, IMG_OBJS_INNER_INTERFACE_PUBLIC);
363: public static final ImageDescriptor DESC_OBJS_INNER_INTERFACE_DEFAULT = createManagedFromKey(
364: T_OBJ, IMG_OBJS_INNER_INTERFACE_DEFAULT);
365: public static final ImageDescriptor DESC_OBJS_INNER_INTERFACE_PROTECTED = createManagedFromKey(
366: T_OBJ, IMG_OBJS_INNER_INTERFACE_PROTECTED);
367: public static final ImageDescriptor DESC_OBJS_INNER_INTERFACE_PRIVATE = createManagedFromKey(
368: T_OBJ, IMG_OBJS_INNER_INTERFACE_PRIVATE);
369:
370: public static final ImageDescriptor DESC_OBJS_INTERFACEALT = createManagedFromKey(
371: T_OBJ, IMG_OBJS_INTERFACEALT);
372:
373: public static final ImageDescriptor DESC_OBJS_ANNOTATION = createManagedFromKey(
374: T_OBJ, IMG_OBJS_ANNOTATION);
375: public static final ImageDescriptor DESC_OBJS_ANNOTATION_DEFAULT = createManagedFromKey(
376: T_OBJ, IMG_OBJS_ANNOTATION_DEFAULT);
377: public static final ImageDescriptor DESC_OBJS_ANNOTATION_PROTECTED = createManagedFromKey(
378: T_OBJ, IMG_OBJS_ANNOTATION_PROTECTED);
379: public static final ImageDescriptor DESC_OBJS_ANNOTATION_PRIVATE = createManagedFromKey(
380: T_OBJ, IMG_OBJS_ANNOTATION_PRIVATE);
381: public static final ImageDescriptor DESC_OBJS_ANNOTATION_ALT = createManagedFromKey(
382: T_OBJ, IMG_OBJS_ANNOTATION_ALT);
383:
384: public static final ImageDescriptor DESC_OBJS_ENUM = createManagedFromKey(
385: T_OBJ, IMG_OBJS_ENUM);
386: public static final ImageDescriptor DESC_OBJS_ENUM_DEFAULT = createManagedFromKey(
387: T_OBJ, IMG_OBJS_ENUM_DEFAULT);
388: public static final ImageDescriptor DESC_OBJS_ENUM_PROTECTED = createManagedFromKey(
389: T_OBJ, IMG_OBJS_ENUM_PROTECTED);
390: public static final ImageDescriptor DESC_OBJS_ENUM_PRIVATE = createManagedFromKey(
391: T_OBJ, IMG_OBJS_ENUM_PRIVATE);
392: public static final ImageDescriptor DESC_OBJS_ENUM_ALT = createManagedFromKey(
393: T_OBJ, IMG_OBJS_ENUM_ALT);
394:
395: public static final ImageDescriptor DESC_OBJS_JAR = createManagedFromKey(
396: T_OBJ, IMG_OBJS_JAR);
397: public static final ImageDescriptor DESC_OBJS_EXTJAR = createManagedFromKey(
398: T_OBJ, IMG_OBJS_EXTJAR);
399: public static final ImageDescriptor DESC_OBJS_JAR_WSRC = createManagedFromKey(
400: T_OBJ, IMG_OBJS_JAR_WSRC);
401: public static final ImageDescriptor DESC_OBJS_EXTJAR_WSRC = createManagedFromKey(
402: T_OBJ, IMG_OBJS_EXTJAR_WSRC);
403: public static final ImageDescriptor DESC_OBJS_ENV_VAR = createManagedFromKey(
404: T_OBJ, IMG_OBJS_ENV_VAR);
405:
406: public static final ImageDescriptor DESC_OBJS_LIBRARY = createManagedFromKey(
407: T_OBJ, IMG_OBJS_LIBRARY);
408:
409: public static final ImageDescriptor DESC_OBJS_JAVADOCTAG = createManagedFromKey(
410: T_OBJ, IMG_OBJS_JAVADOCTAG);
411: public static final ImageDescriptor DESC_OBJS_HTMLTAG = createManagedFromKey(
412: T_OBJ, IMG_OBJS_HTMLTAG);
413:
414: public static final ImageDescriptor DESC_OBJS_TEMPLATE = createManagedFromKey(
415: T_OBJ, IMG_OBJS_TEMPLATE);
416: public static final ImageDescriptor DESC_OBJS_SWT_TEMPLATE = createManagedFromKey(
417: T_OBJ, IMG_OBJS_SWT_TEMPLATE);
418:
419: public static final ImageDescriptor DESC_OBJS_TYPEVARIABLE = createManagedFromKey(
420: T_OBJ, IMG_OBJS_TYPEVARIABLE);
421:
422: public static final ImageDescriptor DESC_OBJS_EXCEPTION = createManagedFromKey(
423: T_OBJ, IMG_OBJS_EXCEPTION);
424: public static final ImageDescriptor DESC_OBJS_BREAKPOINT_INSTALLED = createManagedFromKey(
425: T_OBJ, IMG_OBJS_BREAKPOINT_INSTALLED);
426: public static final ImageDescriptor DESC_OBJS_ERROR = createManagedFromKey(
427: T_OBJ, IMG_OBJS_ERROR);
428: public static final ImageDescriptor DESC_OBJS_QUICK_ASSIST = createManagedFromKey(
429: T_OBJ, IMG_OBJS_QUICK_ASSIST);
430: public static final ImageDescriptor DESC_OBJS_FIXABLE_PROBLEM = createManagedFromKey(
431: T_OBJ, IMG_OBJS_FIXABLE_PROBLEM);
432: public static final ImageDescriptor DESC_OBJS_FIXABLE_ERROR = createManagedFromKey(
433: T_OBJ, IMG_OBJS_FIXABLE_ERROR);
434:
435: // public static final ImageDescriptor DESC_OBJS_SNIPPET_EVALUATING= createManaged(T_OBJ, IMG_OBJS_SNIPPET_EVALUATING);
436:
437: public static final ImageDescriptor DESC_OBJS_DEFAULT_CHANGE = createUnManaged(
438: T_OBJ, "change.gif"); //$NON-NLS-1$
439:
440: public static final ImageDescriptor DESC_OBJS_EXCLUSION_FILTER_ATTRIB = createUnManaged(
441: T_OBJ, "exclusion_filter_attrib.gif"); //$NON-NLS-1$
442: public static final ImageDescriptor DESC_OBJS_INCLUSION_FILTER_ATTRIB = createUnManaged(
443: T_OBJ, "inclusion_filter_attrib.gif"); //$NON-NLS-1$
444: public static final ImageDescriptor DESC_OBJS_OUTPUT_FOLDER_ATTRIB = createUnManaged(
445: T_OBJ, "output_folder_attrib.gif"); //$NON-NLS-1$
446: public static final ImageDescriptor DESC_OBJS_SOURCE_ATTACH_ATTRIB = createUnManaged(
447: T_OBJ, "source_attach_attrib.gif"); //$NON-NLS-1$
448: public static final ImageDescriptor DESC_OBJS_JAVADOC_LOCATION_ATTRIB = createUnManaged(
449: T_OBJ, "javadoc_location_attrib.gif"); //$NON-NLS-1$
450:
451: public static final ImageDescriptor DESC_OBJS_ACCESSRULES_ATTRIB = createManagedFromKey(
452: T_OBJ, IMG_OBJS_ACCESSRULES_ATTRIB);
453: public static final ImageDescriptor DESC_OBJS_NATIVE_LIB_PATH_ATTRIB = createUnManaged(
454: T_OBJ, "native_lib_path_attrib.gif"); //$NON-NLS-1$
455:
456: public static final ImageDescriptor DESC_OBJS_REFACTORING_FATAL = createManagedFromKey(
457: T_OBJ, IMG_OBJS_REFACTORING_FATAL);
458: public static final ImageDescriptor DESC_OBJS_REFACTORING_ERROR = createManagedFromKey(
459: T_OBJ, IMG_OBJS_REFACTORING_ERROR);
460: public static final ImageDescriptor DESC_OBJS_REFACTORING_WARNING = createManagedFromKey(
461: T_OBJ, IMG_OBJS_REFACTORING_WARNING);
462: public static final ImageDescriptor DESC_OBJS_REFACTORING_INFO = createManagedFromKey(
463: T_OBJ, IMG_OBJS_REFACTORING_INFO);
464:
465: public static final ImageDescriptor DESC_OBJS_NLS_TRANSLATE = createManagedFromKey(
466: T_OBJ, IMG_OBJS_NLS_TRANSLATE);
467: public static final ImageDescriptor DESC_OBJS_NLS_NEVER_TRANSLATE = createManagedFromKey(
468: T_OBJ, IMG_OBJS_NLS_NEVER_TRANSLATE);
469: public static final ImageDescriptor DESC_OBJS_NLS_SKIP = createManagedFromKey(
470: T_OBJ, IMG_OBJS_NLS_SKIP);
471:
472: public static final ImageDescriptor DESC_OBJS_UNKNOWN = createManagedFromKey(
473: T_OBJ, IMG_OBJS_UNKNOWN);
474:
475: public static final ImageDescriptor DESC_OBJS_TYPE_SEPARATOR = createUnManaged(
476: T_OBJ, "type_separator.gif"); //$NON-NLS-1$
477:
478: public static final ImageDescriptor DESC_OBJS_SEARCH_READACCESS = createManagedFromKey(
479: T_OBJ, IMG_OBJS_SEARCH_READACCESS);
480: public static final ImageDescriptor DESC_OBJS_SEARCH_WRITEACCESS = createManagedFromKey(
481: T_OBJ, IMG_OBJS_SEARCH_WRITEACCESS);
482: public static final ImageDescriptor DESC_OBJS_SEARCH_OCCURRENCE = createManagedFromKey(
483: T_OBJ, IMG_OBJS_SEARCH_OCCURRENCE);
484:
485: public static final ImageDescriptor DESC_OBJS_LOCAL_VARIABLE = createManagedFromKey(
486: T_OBJ, IMG_OBJS_LOCAL_VARIABLE);
487:
488: public static final ImageDescriptor DESC_OBJS_HELP = createManagedFromKey(
489: T_ELCL, IMG_OBJS_HELP);
490:
491: public static final ImageDescriptor DESC_ELCL_ADD_TO_BP = createUnManaged(
492: T_ELCL, "add_to_buildpath.gif"); //$NON-NLS-1$
493: public static final ImageDescriptor DESC_ELCL_REMOVE_FROM_BP = createUnManaged(
494: T_ELCL, "remove_from_buildpath.gif"); //$NON-NLS-1$
495: public static final ImageDescriptor DESC_ELCL_INCLUSION = createUnManaged(
496: T_ELCL, "inclusion_filter_attrib.gif"); //$NON-NLS-1$
497: public static final ImageDescriptor DESC_ELCL_EXCLUSION = createUnManaged(
498: T_ELCL, "exclusion_filter_attrib.gif"); //$NON-NLS-1$
499: // public static final ImageDescriptor DESC_ELCL_INCLUSION_UNDO= createUnManaged(T_ELCL, "inclusion_filter_attrib_undo.gif"); //$NON-NLS-1$
500: // public static final ImageDescriptor DESC_ELCL_EXCLUSION_UNDO= createUnManaged(T_ELCL, "exclusion_filter_attrib_undo.gif"); //$NON-NLS-1$
501:
502: public static final ImageDescriptor DESC_DLCL_ADD_TO_BP = createUnManaged(
503: T_DLCL, "add_to_buildpath.gif"); //$NON-NLS-1$
504: public static final ImageDescriptor DESC_DLCL_REMOVE_FROM_BP = createUnManaged(
505: T_DLCL, "remove_from_buildpath.gif"); //$NON-NLS-1$
506: public static final ImageDescriptor DESC_DLCL_INCLUSION = createUnManaged(
507: T_DLCL, "inclusion_filter_attrib.gif"); //$NON-NLS-1$
508: public static final ImageDescriptor DESC_DLCL_EXCLUSION = createUnManaged(
509: T_DLCL, "exclusion_filter_attrib.gif"); //$NON-NLS-1$
510: public static final ImageDescriptor DESC_DLCL_OUTPUT_FOLDER_ATTRIB = createUnManaged(
511: T_DLCL, "output_folder_attrib.gif"); //$NON-NLS-1$
512: // public static final ImageDescriptor DESC_DLCL_INCLUSION_UNDO= createUnManaged(T_DLCL, "inclusion_filter_attrib_undo.gif"); //$NON-NLS-1$
513: // public static final ImageDescriptor DESC_DLCL_EXCLUSION_UNDO= createUnManaged(T_DLCL, "exclusion_filter_attrib_undo.gif"); //$NON-NLS-1$
514:
515: public static final ImageDescriptor DESC_DLCL_ADD_LINKED_SOURCE_TO_BUILDPATH = createUnManaged(
516: T_DLCL, "add_linked_source_to_buildpath.gif"); //$NON-NLS-1$
517: public static final ImageDescriptor DESC_ELCL_ADD_LINKED_SOURCE_TO_BUILDPATH = createUnManaged(
518: T_ELCL, "add_linked_source_to_buildpath.gif"); //$NON-NLS-1$
519:
520: public static final ImageDescriptor DESC_DLCL_CONFIGURE_BUILDPATH = createUnManaged(
521: T_DLCL, "configure_build_path.gif"); //$NON-NLS-1$
522: public static final ImageDescriptor DESC_ELCL_CONFIGURE_BUILDPATH = createUnManaged(
523: T_ELCL, "configure_build_path.gif"); //$NON-NLS-1$
524:
525: public static final ImageDescriptor DESC_DLCL_CONFIGURE_BUILDPATH_FILTERS = createUnManaged(
526: T_DLCL, "configure_buildpath_filters.gif"); //$NON-NLS-1$
527: public static final ImageDescriptor DESC_ELCL_CONFIGURE_BUILDPATH_FILTERS = createUnManaged(
528: T_ELCL, "configure_buildpath_filters.gif"); //$NON-NLS-1$
529:
530: public static final ImageDescriptor DESC_DLCL_CONFIGURE_OUTPUT_FOLDER = createUnManaged(
531: T_DLCL, "configure_output_folder.gif"); //$NON-NLS-1$
532: public static final ImageDescriptor DESC_ELCL_CONFIGURE_OUTPUT_FOLDER = createUnManaged(
533: T_ELCL, "configure_output_folder.gif"); //$NON-NLS-1$
534:
535: public static final ImageDescriptor DESC_DLCL_EXCLUDE_FROM_BUILDPATH = createUnManaged(
536: T_DLCL, "exclude_from_buildpath.gif"); //$NON-NLS-1$
537: public static final ImageDescriptor DESC_ELCL_EXCLUDE_FROM_BUILDPATH = createUnManaged(
538: T_ELCL, "exclude_from_buildpath.gif"); //$NON-NLS-1$
539:
540: public static final ImageDescriptor DESC_DLCL_INCLUDE_ON_BUILDPATH = createUnManaged(
541: T_DLCL, "include_on_buildpath.gif"); //$NON-NLS-1$
542: public static final ImageDescriptor DESC_ELCL_INCLUDE_ON_BUILDPATH = createUnManaged(
543: T_ELCL, "include_on_buildpath.gif"); //$NON-NLS-1$
544:
545: public static final ImageDescriptor DESC_DLCL_ADD_AS_SOURCE_FOLDER = createUnManaged(
546: T_DLCL, "add_as_source_folder.gif"); //$NON-NLS-1$
547: public static final ImageDescriptor DESC_ELCL_ADD_AS_SOURCE_FOLDER = createUnManaged(
548: T_ELCL, "add_as_source_folder.gif"); //$NON-NLS-1$
549:
550: public static final ImageDescriptor DESC_DLCL_REMOVE_AS_SOURCE_FOLDER = createUnManaged(
551: T_DLCL, "remove_as_source_folder.gif"); //$NON-NLS-1$
552: public static final ImageDescriptor DESC_ELCL_REMOVE_AS_SOURCE_FOLDER = createUnManaged(
553: T_ELCL, "remove_as_source_folder.gif"); //$NON-NLS-1$
554:
555: public static final ImageDescriptor DESC_DLCL_COPY_QUALIFIED_NAME = createUnManaged(
556: T_DLCL, "cpyqual_menu.gif"); //$NON-NLS-1$
557: public static final ImageDescriptor DESC_ELCL_COPY_QUALIFIED_NAME = createUnManaged(
558: T_ELCL, "cpyqual_menu.gif"); //$NON-NLS-1$
559:
560: public static final ImageDescriptor DESC_OBJ_OVERRIDES = createUnManaged(
561: T_OBJ, "over_co.gif"); //$NON-NLS-1$
562: public static final ImageDescriptor DESC_OBJ_IMPLEMENTS = createUnManaged(
563: T_OBJ, "implm_co.gif"); //$NON-NLS-1$
564:
565: public static final ImageDescriptor DESC_OVR_STATIC = createUnManagedCached(
566: T_OVR, "static_co.gif"); //$NON-NLS-1$
567: public static final ImageDescriptor DESC_OVR_FINAL = createUnManagedCached(
568: T_OVR, "final_co.gif"); //$NON-NLS-1$
569: public static final ImageDescriptor DESC_OVR_ABSTRACT = createUnManagedCached(
570: T_OVR, "abstract_co.gif"); //$NON-NLS-1$
571: public static final ImageDescriptor DESC_OVR_SYNCH = createUnManagedCached(
572: T_OVR, "synch_co.gif"); //$NON-NLS-1$
573: public static final ImageDescriptor DESC_OVR_VOLATILE = createUnManagedCached(
574: T_OVR, "volatile_co.gif"); //$NON-NLS-1$
575: public static final ImageDescriptor DESC_OVR_TRANSIENT = createUnManagedCached(
576: T_OVR, "transient_co.gif"); //$NON-NLS-1$
577:
578: public static final ImageDescriptor DESC_OVR_RUN = createUnManagedCached(
579: T_OVR, "run_co.gif"); //$NON-NLS-1$
580: public static final ImageDescriptor DESC_OVR_WARNING = createUnManagedCached(
581: T_OVR, "warning_co.gif"); //$NON-NLS-1$
582: public static final ImageDescriptor DESC_OVR_ERROR = createUnManagedCached(
583: T_OVR, "error_co.gif"); //$NON-NLS-1$
584: public static final ImageDescriptor DESC_OVR_OVERRIDES = createUnManagedCached(
585: T_OVR, "over_co.gif"); //$NON-NLS-1$
586: public static final ImageDescriptor DESC_OVR_IMPLEMENTS = createUnManagedCached(
587: T_OVR, "implm_co.gif"); //$NON-NLS-1$
588: public static final ImageDescriptor DESC_OVR_SYNCH_AND_OVERRIDES = createUnManagedCached(
589: T_OVR, "sync_over.gif"); //$NON-NLS-1$
590: public static final ImageDescriptor DESC_OVR_SYNCH_AND_IMPLEMENTS = createUnManagedCached(
591: T_OVR, "sync_impl.gif"); //$NON-NLS-1$
592: public static final ImageDescriptor DESC_OVR_CONSTRUCTOR = createUnManagedCached(
593: T_OVR, "constr_ovr.gif"); //$NON-NLS-1$
594: public static final ImageDescriptor DESC_OVR_DEPRECATED = createUnManagedCached(
595: T_OVR, "deprecated.gif"); //$NON-NLS-1$
596: public static final ImageDescriptor DESC_OVR_FOCUS = createUnManagedCached(
597: T_OVR, "focus_ovr.gif"); //$NON-NLS-1$
598: public static final ImageDescriptor DESC_OVR_ANNOTATION = createUnManagedCached(
599: T_OVR, "annotation_tsk.gif"); //$NON-NLS-1$
600: public static final ImageDescriptor DESC_OVR_ENUM = createUnManagedCached(
601: T_OVR, "enum_tsk.gif"); //$NON-NLS-1$
602: public static final ImageDescriptor DESC_OVR_INTERFACE = createUnManagedCached(
603: T_OVR, "interface_tsk.gif"); //$NON-NLS-1$
604: public static final ImageDescriptor DESC_OVR_CLASS = createUnManagedCached(
605: T_OVR, "class_tsk.gif"); //$NON-NLS-1$
606: public static final ImageDescriptor DESC_OVR_ABSTRACT_CLASS = createUnManagedCached(
607: T_OVR, "class_abs_tsk.gif"); //$NON-NLS-1$
608:
609: // Call Hierarchy
610: public static final ImageDescriptor DESC_OVR_RECURSIVE = createUnManaged(
611: T_OVR, "recursive_co.gif"); //$NON-NLS-1$
612: public static final ImageDescriptor DESC_OVR_MAX_LEVEL = createUnManaged(
613: T_OVR, "maxlevel_co.gif"); //$NON-NLS-1$
614:
615: public static final ImageDescriptor DESC_WIZBAN_NEWCLASS = createUnManaged(
616: T_WIZBAN, "newclass_wiz.png"); //$NON-NLS-1$
617: public static final ImageDescriptor DESC_WIZBAN_NEWINT = createUnManaged(
618: T_WIZBAN, "newint_wiz.png"); //$NON-NLS-1$
619: public static final ImageDescriptor DESC_WIZBAN_NEWENUM = createUnManaged(
620: T_WIZBAN, "newenum_wiz.png"); //$NON-NLS-1$
621: public static final ImageDescriptor DESC_WIZBAN_NEWANNOT = createUnManaged(
622: T_WIZBAN, "newannotation_wiz.png"); //$NON-NLS-1$
623: public static final ImageDescriptor DESC_WIZBAN_NEWJPRJ = createUnManaged(
624: T_WIZBAN, "newjprj_wiz.png"); //$NON-NLS-1$
625: public static final ImageDescriptor DESC_WIZBAN_NEWSRCFOLDR = createUnManaged(
626: T_WIZBAN, "newsrcfldr_wiz.png"); //$NON-NLS-1$
627: public static final ImageDescriptor DESC_WIZBAN_NEWMETH = createUnManaged(
628: T_WIZBAN, "newmeth_wiz.png"); //$NON-NLS-1$
629: public static final ImageDescriptor DESC_WIZBAN_NEWPACK = createUnManaged(
630: T_WIZBAN, "newpack_wiz.png"); //$NON-NLS-1$
631: public static final ImageDescriptor DESC_WIZBAN_NEWSCRAPPAGE = createUnManaged(
632: T_WIZBAN, "newsbook_wiz.png"); //$NON-NLS-1$
633: public static final ImageDescriptor DESC_WIZBAN_JAVA_LAUNCH = createUnManaged(
634: T_WIZBAN, "java_app_wiz.png"); //$NON-NLS-1$
635: public static final ImageDescriptor DESC_WIZBAN_JAVA_ATTACH = createUnManaged(
636: T_WIZBAN, "java_attach_wiz.png"); //$NON-NLS-1$
637: public static final ImageDescriptor DESC_WIZBAN_REFACTOR = createUnManaged(
638: T_WIZBAN, "refactor_wiz.png"); //$NON-NLS-1$
639: public static final ImageDescriptor DESC_WIZBAN_REFACTOR_FIELD = createUnManaged(
640: T_WIZBAN, "fieldrefact_wiz.png"); //$NON-NLS-1$
641: public static final ImageDescriptor DESC_WIZBAN_REFACTOR_METHOD = createUnManaged(
642: T_WIZBAN, "methrefact_wiz.png"); //$NON-NLS-1$
643: public static final ImageDescriptor DESC_WIZBAN_REFACTOR_TYPE = createUnManaged(
644: T_WIZBAN, "typerefact_wiz.png"); //$NON-NLS-1$
645: public static final ImageDescriptor DESC_WIZBAN_REFACTOR_PACKAGE = createUnManaged(
646: T_WIZBAN, "packrefact_wiz.png"); //$NON-NLS-1$
647: public static final ImageDescriptor DESC_WIZBAN_REFACTOR_CODE = createUnManaged(
648: T_WIZBAN, "coderefact_wiz.png"); //$NON-NLS-1$
649: public static final ImageDescriptor DESC_WIZBAN_REFACTOR_CU = createUnManaged(
650: T_WIZBAN, "compunitrefact_wiz.png"); //$NON-NLS-1$
651: public static final ImageDescriptor DESC_WIZBAN_REFACTOR_PULL_UP = createUnManaged(
652: T_WIZBAN, "pullup_wiz.png"); //$NON-NLS-1$
653: public static final ImageDescriptor DESC_WIZBAN_REFACTOR_FIX_DEPRECATION = createUnManaged(
654: T_WIZBAN, "fixdepr_wiz.png"); //$NON-NLS-1$
655: public static final ImageDescriptor DESC_WIZBAN_JAR_PACKAGER = createUnManaged(
656: T_WIZBAN, "jar_pack_wiz.png"); //$NON-NLS-1$
657: public static final ImageDescriptor DESC_WIZBAN_REFACTOR_EXTRACT_SUPERTYPE = createUnManaged(
658: T_WIZBAN, "extractsupertype_wiz.png"); //$NON-NLS-1$
659: public static final ImageDescriptor DESC_WIZBAN_REPLACE_JAR = createUnManaged(
660: T_WIZBAN, "replacejar_wiz.png"); //$NON-NLS-1$
661: public static final ImageDescriptor DESC_WIZBAN_JAVA_WORKINGSET = createUnManaged(
662: T_WIZBAN, "java_workingset_wiz.png");//$NON-NLS-1$
663: public static final ImageDescriptor DESC_WIZBAN_EXPORT_JAVADOC = createUnManaged(
664: T_WIZBAN, "export_javadoc_wiz.png");//$NON-NLS-1$
665: public static final ImageDescriptor DESC_WIZBAN_EXTERNALIZE_STRINGS = createUnManaged(
666: T_WIZBAN, "extstr_wiz.png");//$NON-NLS-1$
667: public static final ImageDescriptor DESC_WIZBAN_ADD_LIBRARY = createUnManaged(
668: T_WIZBAN, "addlibrary_wiz.png");//$NON-NLS-1$
669: public static final ImageDescriptor DESC_WIZBAN_CLEAN_UP = createUnManaged(
670: T_WIZBAN, "cleanup_wiz.png"); //$NON-NLS-1$
671:
672: public static final ImageDescriptor DESC_TOOL_SHOW_EMPTY_PKG = createUnManaged(
673: T_ETOOL, "show_empty_pkg.gif"); //$NON-NLS-1$
674: public static final ImageDescriptor DESC_TOOL_SHOW_SEGMENTS = createUnManaged(
675: T_ETOOL, "segment_edit.gif"); //$NON-NLS-1$
676:
677: public static final ImageDescriptor DESC_TOOL_OPENTYPE = createUnManaged(
678: T_ETOOL, "opentype.gif"); //$NON-NLS-1$
679: public static final ImageDescriptor DESC_TOOL_NEWPROJECT = createUnManaged(
680: T_ETOOL, "newjprj_wiz.gif"); //$NON-NLS-1$
681: public static final ImageDescriptor DESC_TOOL_NEWPACKAGE = createUnManaged(
682: T_ETOOL, "newpack_wiz.gif"); //$NON-NLS-1$
683: public static final ImageDescriptor DESC_TOOL_NEWCLASS = createUnManaged(
684: T_ETOOL, "newclass_wiz.gif"); //$NON-NLS-1$
685: public static final ImageDescriptor DESC_TOOL_NEWINTERFACE = createUnManaged(
686: T_ETOOL, "newint_wiz.gif"); //$NON-NLS-1$
687: public static final ImageDescriptor DESC_TOOL_NEWSNIPPET = createUnManaged(
688: T_ETOOL, "newsbook_wiz.gif"); //$NON-NLS-1$
689: public static final ImageDescriptor DESC_TOOL_NEWPACKROOT = createUnManaged(
690: T_ETOOL, "newpackfolder_wiz.gif"); //$NON-NLS-1$
691: public static final ImageDescriptor DESC_DLCL_NEWPACKROOT = createUnManaged(
692: T_DLCL, "newpackfolder_wiz.gif"); //$NON-NLS-1$
693:
694: public static final ImageDescriptor DESC_TOOL_CLASSPATH_ORDER = createUnManaged(
695: T_OBJ, "cp_order_obj.gif"); //$NON-NLS-1$
696: public static final ImageDescriptor DESC_ELCL_COLLAPSEALL = createUnManaged(
697: T_ELCL, "collapseall.gif"); //$NON-NLS-1$
698:
699: // Keys for correction proposal. We have to put the image into the registry since "code assist" doesn't
700: // have a life cycle. So no change to dispose icons.
701:
702: public static final String IMG_CORRECTION_CHANGE = NAME_PREFIX
703: + "correction_change.gif"; //$NON-NLS-1$
704: public static final String IMG_CORRECTION_MOVE = NAME_PREFIX
705: + "correction_move.gif"; //$NON-NLS-1$
706: public static final String IMG_CORRECTION_RENAME = NAME_PREFIX
707: + "correction_rename.gif"; //$NON-NLS-1$
708: public static final String IMG_CORRECTION_LINKED_RENAME = NAME_PREFIX
709: + "correction_linked_rename.gif"; //$NON-NLS-1$
710: public static final String IMG_CORRECTION_DELETE_IMPORT = NAME_PREFIX
711: + "correction_delete_import.gif"; //$NON-NLS-1$
712: public static final String IMG_CORRECTION_LOCAL = NAME_PREFIX
713: + "localvariable_obj.gif"; //$NON-NLS-1$
714: public static final String IMG_CORRECTION_REMOVE = NAME_PREFIX
715: + "remove_correction.gif"; //$NON-NLS-1$
716: public static final String IMG_CORRECTION_ADD = NAME_PREFIX
717: + "add_correction.gif"; //$NON-NLS-1$
718: public static final String IMG_CORRECTION_CAST = NAME_PREFIX
719: + "correction_cast.gif"; //$NON-NLS-1$
720:
721: static {
722: createManagedFromKey(T_OBJ, IMG_CORRECTION_CHANGE);
723: createManagedFromKey(T_OBJ, IMG_CORRECTION_MOVE);
724: createManagedFromKey(T_OBJ, IMG_CORRECTION_RENAME);
725: createManagedFromKey(T_OBJ, IMG_CORRECTION_LINKED_RENAME);
726: createManagedFromKey(T_OBJ, IMG_CORRECTION_DELETE_IMPORT);
727: createManagedFromKey(T_OBJ, IMG_CORRECTION_LOCAL);
728: createManagedFromKey(T_OBJ, IMG_CORRECTION_REMOVE);
729: createManagedFromKey(T_OBJ, IMG_CORRECTION_ADD);
730: createManagedFromKey(T_OBJ, IMG_CORRECTION_CAST);
731: }
732:
733: private static final class CachedImageDescriptor extends
734: ImageDescriptor {
735: private ImageDescriptor fDescriptor;
736: private ImageData fData;
737:
738: public CachedImageDescriptor(ImageDescriptor descriptor) {
739: fDescriptor = descriptor;
740: }
741:
742: public ImageData getImageData() {
743: if (fData == null) {
744: fData = fDescriptor.getImageData();
745: }
746: return fData;
747: }
748: }
749:
750: /**
751: * Returns the image managed under the given key in this registry.
752: *
753: * @param key the image's key
754: * @return the image managed under the given key
755: */
756: public static Image get(String key) {
757: return getImageRegistry().get(key);
758: }
759:
760: /**
761: * Returns the image descriptor for the given key in this registry. Might be called in a non-UI thread.
762: *
763: * @param key the image's key
764: * @return the image descriptor for the given key
765: */
766: public static ImageDescriptor getDescriptor(String key) {
767: if (fgImageRegistry == null) {
768: return (ImageDescriptor) fgAvoidSWTErrorMap.get(key);
769: }
770: return getImageRegistry().getDescriptor(key);
771: }
772:
773: /**
774: * Sets the three image descriptors for enabled, disabled, and hovered to an action. The actions
775: * are retrieved from the *tool16 folders.
776: *
777: * @param action the action
778: * @param iconName the icon name
779: */
780: public static void setToolImageDescriptors(IAction action,
781: String iconName) {
782: setImageDescriptors(action, "tool16", iconName); //$NON-NLS-1$
783: }
784:
785: /**
786: * Sets the three image descriptors for enabled, disabled, and hovered to an action. The actions
787: * are retrieved from the *lcl16 folders.
788: *
789: * @param action the action
790: * @param iconName the icon name
791: */
792: public static void setLocalImageDescriptors(IAction action,
793: String iconName) {
794: setImageDescriptors(action, "lcl16", iconName); //$NON-NLS-1$
795: }
796:
797: /*
798: * Helper method to access the image registry from the JavaPlugin class.
799: */
800: /* package */static ImageRegistry getImageRegistry() {
801: if (fgImageRegistry == null) {
802: fgImageRegistry = new ImageRegistry();
803: for (Iterator iter = fgAvoidSWTErrorMap.keySet().iterator(); iter
804: .hasNext();) {
805: String key = (String) iter.next();
806: fgImageRegistry.put(key,
807: (ImageDescriptor) fgAvoidSWTErrorMap.get(key));
808: }
809: fgAvoidSWTErrorMap = null;
810: }
811: return fgImageRegistry;
812: }
813:
814: //---- Helper methods to access icons on the file system --------------------------------------
815:
816: private static void setImageDescriptors(IAction action,
817: String type, String relPath) {
818: ImageDescriptor id = create("d" + type, relPath, false); //$NON-NLS-1$
819: if (id != null)
820: action.setDisabledImageDescriptor(id);
821:
822: /*
823: * id= create("c" + type, relPath, false); //$NON-NLS-1$
824: * if (id != null)
825: * action.setHoverImageDescriptor(id);
826: */
827:
828: ImageDescriptor descriptor = create("e" + type, relPath, true); //$NON-NLS-1$
829: action.setHoverImageDescriptor(descriptor);
830: action.setImageDescriptor(descriptor);
831: }
832:
833: private static ImageDescriptor createManagedFromKey(String prefix,
834: String key) {
835: return createManaged(prefix, key.substring(NAME_PREFIX_LENGTH),
836: key);
837: }
838:
839: private static ImageDescriptor createManaged(String prefix,
840: String name, String key) {
841: ImageDescriptor result = create(prefix, name, true);
842:
843: if (fgAvoidSWTErrorMap == null) {
844: fgAvoidSWTErrorMap = new HashMap();
845: }
846: fgAvoidSWTErrorMap.put(key, result);
847: if (fgImageRegistry != null) {
848: JavaPlugin
849: .logErrorMessage("Image registry already defined"); //$NON-NLS-1$
850: }
851: return result;
852: }
853:
854: /*
855: * Creates an image descriptor for the given prefix and name in the JDT UI bundle. The path can
856: * contain variables like $NL$.
857: * If no image could be found, <code>useMissingImageDescriptor</code> decides if either
858: * the 'missing image descriptor' is returned or <code>null</code>.
859: * or <code>null</code>.
860: */
861: private static ImageDescriptor create(String prefix, String name,
862: boolean useMissingImageDescriptor) {
863: IPath path = ICONS_PATH.append(prefix).append(name);
864: return createImageDescriptor(JavaPlugin.getDefault()
865: .getBundle(), path, useMissingImageDescriptor);
866: }
867:
868: /*
869: * Creates an image descriptor for the given prefix and name in the JDT UI bundle. The path can
870: * contain variables like $NL$.
871: * If no image could be found, the 'missing image descriptor' is returned.
872: */
873: private static ImageDescriptor createUnManaged(String prefix,
874: String name) {
875: return create(prefix, name, true);
876: }
877:
878: /*
879: * Creates an image descriptor for the given prefix and name in the JDT UI bundle and let tye descriptor cache the image data.
880: * If no image could be found, the 'missing image descriptor' is returned.
881: */
882: private static ImageDescriptor createUnManagedCached(String prefix,
883: String name) {
884: return new CachedImageDescriptor(create(prefix, name, true));
885: }
886:
887: /*
888: * Creates an image descriptor for the given path in a bundle. The path can contain variables
889: * like $NL$.
890: * If no image could be found, <code>useMissingImageDescriptor</code> decides if either
891: * the 'missing image descriptor' is returned or <code>null</code>.
892: * Added for 3.1.1.
893: */
894: public static ImageDescriptor createImageDescriptor(Bundle bundle,
895: IPath path, boolean useMissingImageDescriptor) {
896: URL url = FileLocator.find(bundle, path, null);
897: if (url != null) {
898: return ImageDescriptor.createFromURL(url);
899: }
900: if (useMissingImageDescriptor) {
901: return ImageDescriptor.getMissingImageDescriptor();
902: }
903: return null;
904: }
905: }
|