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.pde.internal.ui;
011:
012: import java.net.URL;
013:
014: import org.eclipse.core.runtime.FileLocator;
015: import org.eclipse.core.runtime.Path;
016: import org.eclipse.jface.resource.ImageDescriptor;
017: import org.eclipse.jface.resource.ImageRegistry;
018: import org.eclipse.swt.graphics.Image;
019:
020: /**
021: * Bundle of all images used by the PDE plugin.
022: */
023: public class PDEPluginImages {
024:
025: private static final String NAME_PREFIX = PDEPlugin.getPluginId()
026: + "."; //$NON-NLS-1$
027:
028: private static ImageRegistry PLUGIN_REGISTRY;
029:
030: public final static String ICONS_PATH = "icons/"; //$NON-NLS-1$
031:
032: /**
033: * Set of predefined Image Descriptors.
034: */
035:
036: private static final String PATH_OBJ = ICONS_PATH + "obj16/"; //$NON-NLS-1$
037: private static final String PATH_VIEW = ICONS_PATH + "view16/"; //$NON-NLS-1$
038: private static final String PATH_LCL = ICONS_PATH + "elcl16/"; //$NON-NLS-1$
039: private static final String PATH_LCL_DISABLED = ICONS_PATH
040: + "dlcl16/"; //$NON-NLS-1$
041: private static final String PATH_TOOL = ICONS_PATH + "etool16/"; //$NON-NLS-1$
042: private static final String PATH_OVR = ICONS_PATH + "ovr16/"; //$NON-NLS-1$
043: private static final String PATH_WIZBAN = ICONS_PATH + "wizban/"; //$NON-NLS-1$
044:
045: /**
046: * Frequently used images
047: */
048: public static final String IMG_FORM_WIZ = NAME_PREFIX + "FORM_WIZ"; //$NON-NLS-1$
049: public static final String IMG_FORM_BANNER = NAME_PREFIX
050: + "FORM_BANNER"; //$NON-NLS-1$
051: public static final String IMG_ATT_CLASS_OBJ = NAME_PREFIX
052: + "IMG_ATT_CLASS_OBJ"; //$NON-NLS-1$
053: public static final String IMG_ATT_FILE_OBJ = NAME_PREFIX
054: + "IMG_ATT_FILE_OBJ"; //$NON-NLS-1$
055: public static final String IMG_ATT_IMPL_OBJ = NAME_PREFIX
056: + "IMG_ATT_IMPL_OBJ"; //$NON-NLS-1$
057: public static final String IMG_ATT_REQ_OBJ = NAME_PREFIX
058: + "IMG_ATT_REQ_OBJ"; //$NON-NLS-1$
059: public static final String IMG_GENERIC_XML_OBJ = NAME_PREFIX
060: + "IMG_GENERIC_XML_OBJ"; //$NON-NLS-1$
061: public static final String OBJ_DESC_GENERATE_CLASS = NAME_PREFIX
062: + "OBJ_DESC_GENERATE_CLASS"; //$NON-NLS-1$
063: public static final String OBJ_DESC_GENERATE_INTERFACE = NAME_PREFIX
064: + "OBJ_DESC_GENERATE_INTERFACE"; //$NON-NLS-1$
065: public static final String OBJ_DESC_PACKAGE = NAME_PREFIX
066: + "OBJ_DESC_PACKAGE"; //$NON-NLS-1$
067: public static final String OBJ_DESC_BUNDLE = NAME_PREFIX
068: + "OBJ_DESC_BUNDLE"; //$NON-NLS-1$
069:
070: /**
071: * OBJ16
072: */
073: public static final ImageDescriptor DESC_MAIN_TAB = create(
074: PATH_OBJ, "main_tab.gif"); //$NON-NLS-1$
075: public static final ImageDescriptor DESC_ALL_SC_OBJ = create(
076: PATH_OBJ, "all_sc_obj.gif"); //$NON-NLS-1$
077: public static final ImageDescriptor DESC_ATT_CLASS_OBJ = create(
078: PATH_OBJ, "att_class_obj.gif"); //$NON-NLS-1$
079: public static final ImageDescriptor DESC_ATT_FILE_OBJ = create(
080: PATH_OBJ, "att_file_obj.gif"); //$NON-NLS-1$
081: public static final ImageDescriptor DESC_ATT_IMPL_OBJ = create(
082: PATH_OBJ, "att_impl_obj.gif"); //$NON-NLS-1$
083: public static final ImageDescriptor DESC_ATT_REQ_OBJ = create(
084: PATH_OBJ, "att_req_obj.gif"); //$NON-NLS-1$
085: public static final ImageDescriptor DESC_ATT_URI_OBJ = create(
086: PATH_OBJ, "att_URI_obj.gif"); //$NON-NLS-1$
087: public static final ImageDescriptor DESC_BUNDLE_OBJ = create(
088: PATH_OBJ, "bundle_obj.gif"); //$NON-NLS-1$
089: public static final ImageDescriptor DESC_CHOICE_SC_OBJ = create(
090: PATH_OBJ, "choice_sc_obj.gif"); //$NON-NLS-1$
091: public static final ImageDescriptor DESC_FEATURE_JAR_OBJ = create(
092: PATH_OBJ, "ftr_jar_obj.gif"); //$NON-NLS-1$
093: public static final ImageDescriptor DESC_FEATURE_MF_OBJ = create(
094: PATH_OBJ, "ftr_mf_obj.gif"); //$NON-NLS-1$
095: public static final ImageDescriptor DESC_FEATURE_OBJ = create(
096: PATH_OBJ, "feature_obj.gif"); //$NON-NLS-1$
097: public static final ImageDescriptor DESC_NOREF_FEATURE_OBJ = create(
098: PATH_OBJ, "noref_feature_obj.gif"); //$NON-NLS-1$
099: public static final ImageDescriptor DESC_ELREF_SC_OBJ = create(
100: PATH_OBJ, "elref_sc_obj.gif"); //$NON-NLS-1$
101: public static final ImageDescriptor DESC_EXTENSIONS_OBJ = create(
102: PATH_OBJ, "extensions_obj.gif"); //$NON-NLS-1$
103: public static final ImageDescriptor DESC_EXTENSION_OBJ = create(
104: PATH_OBJ, "extension_obj.gif"); //$NON-NLS-1$
105: public static final ImageDescriptor DESC_EXT_PLUGIN_OBJ = create(
106: PATH_OBJ, "ext_plugin_obj.gif"); //$NON-NLS-1$
107: public static final ImageDescriptor DESC_EXT_FRAGMENT_OBJ = create(
108: PATH_OBJ, "external_frgmt_obj.gif"); //$NON-NLS-1$
109: public static final ImageDescriptor DESC_EXT_POINTS_OBJ = create(
110: PATH_OBJ, "ext_points_obj.gif"); //$NON-NLS-1$
111: public static final ImageDescriptor DESC_EXT_POINT_OBJ = create(
112: PATH_OBJ, "ext_point_obj.gif"); //$NON-NLS-1$
113: public static final ImageDescriptor DESC_GEL_SC_OBJ = create(
114: PATH_OBJ, "gel_sc_obj.gif"); //$NON-NLS-1$
115: public static final ImageDescriptor DESC_GENERIC_XML_OBJ = create(
116: PATH_OBJ, "generic_xml_obj.gif"); //$NON-NLS-1$
117: public static final ImageDescriptor DESC_GROUP_SC_OBJ = create(
118: PATH_OBJ, "group_sc_obj.gif"); //$NON-NLS-1$
119: public static final ImageDescriptor DESC_JAR_OBJ = create(PATH_OBJ,
120: "jar_obj.gif"); //$NON-NLS-1$
121: public static final ImageDescriptor DESC_JAR_LIB_OBJ = create(
122: PATH_OBJ, "jar_l_obj.gif"); //$NON-NLS-1$
123: public static final ImageDescriptor DESC_JAVA_LIB_OBJ = create(
124: PATH_OBJ, "java_lib_obj.gif"); //$NON-NLS-1$
125: public static final ImageDescriptor DESC_OVERVIEW_OBJ = create(
126: PATH_OBJ, "overview_obj.gif"); //$NON-NLS-1$
127: public static final ImageDescriptor DESC_PAGE_OBJ = create(
128: PATH_OBJ, "page_obj.gif"); //$NON-NLS-1$
129: public static final ImageDescriptor DESC_PLUGIN_MF_OBJ = create(
130: PATH_OBJ, "plugin_mf_obj.gif"); //$NON-NLS-1$
131: public static final ImageDescriptor DESC_FRAGMENT_MF_OBJ = create(
132: PATH_OBJ, "frgmt_mf_obj.gif"); //$NON-NLS-1$
133: public static final ImageDescriptor DESC_BUILD_VAR_OBJ = create(
134: PATH_OBJ, "build_var_obj.gif"); //$NON-NLS-1$
135: public static final ImageDescriptor DESC_LOOP_OBJ = create(
136: PATH_OBJ, "loop_obj.gif"); //$NON-NLS-1$
137: public static final ImageDescriptor DESC_LOOP_NODE_OBJ = create(
138: PATH_OBJ, "loop_node_obj.gif"); //$NON-NLS-1$
139: public static final ImageDescriptor DESC_PROCESSING_INST_OBJ = create(
140: PATH_OBJ, "processinginst.gif"); //$NON-NLS-1$
141: public static final ImageDescriptor DESC_XML_ELEMENT_OBJ = create(
142: PATH_OBJ, "element.gif"); //$NON-NLS-1$
143: public static final ImageDescriptor DESC_XML_ELEMENT_REF_OBJ = create(
144: PATH_OBJ, "elref_sc_obj.gif"); //$NON-NLS-1$
145:
146: public static final ImageDescriptor DESC_SIMPLECS_OBJ = create(
147: PATH_OBJ, "cheatsheet_simple_obj.gif"); //$NON-NLS-1$
148: public static final ImageDescriptor DESC_COMPCS_OBJ = create(
149: PATH_OBJ, "cheatsheet_composite_obj.gif"); //$NON-NLS-1$
150: public static final ImageDescriptor DESC_CSTASKGROUP_OBJ = create(
151: PATH_OBJ, "cheatsheet_taskgroup_obj.gif"); //$NON-NLS-1$
152: public static final ImageDescriptor DESC_CSITEM_OBJ = create(
153: PATH_OBJ, "cheatsheet_item_obj.gif"); //$NON-NLS-1$
154: public static final ImageDescriptor DESC_CSSUBITEM_OBJ = create(
155: PATH_OBJ, "cheatsheet_subitem_obj.gif"); //$NON-NLS-1$
156: public static final ImageDescriptor DESC_CSINTRO_OBJ = create(
157: PATH_OBJ, "cheatsheet_intro_obj.gif"); //$NON-NLS-1$
158: public static final ImageDescriptor DESC_CSCONCLUSION_OBJ = create(
159: PATH_OBJ, "cheatsheet_conclusion_obj.gif"); //$NON-NLS-1$
160: public static final ImageDescriptor DESC_CSUNSUPPORTED_OBJ = create(
161: PATH_OBJ, "cheatsheet_unsupported_obj.gif"); //$NON-NLS-1$
162: public static final ImageDescriptor DESC_CHEATSHEET_OBJ = create(
163: PATH_OBJ, "cheatsheet_obj.gif"); //$NON-NLS-1$
164:
165: public static final ImageDescriptor DESC_TOC_OBJ = create(PATH_OBJ,
166: "toc_obj.gif"); //$NON-NLS-1$
167: public static final ImageDescriptor DESC_TOC_TOPIC_OBJ = create(
168: PATH_OBJ, "toc_topic_obj.gif"); //$NON-NLS-1$
169: public static final ImageDescriptor DESC_TOC_LEAFTOPIC_OBJ = create(
170: PATH_OBJ, "toc_leaftopic_obj.gif"); //$NON-NLS-1$
171: public static final ImageDescriptor DESC_TOC_LINK_OBJ = create(
172: PATH_OBJ, "toc_link_obj.gif"); //$NON-NLS-1$
173: public static final ImageDescriptor DESC_TOC_ANCHOR_OBJ = create(
174: PATH_OBJ, "toc_anchor_obj.gif"); //$NON-NLS-1$
175:
176: public static final ImageDescriptor DESC_COMGROUP_OBJ = create(
177: PATH_OBJ, "keygroups_obj.gif"); //$NON-NLS-1$
178: public static final ImageDescriptor DESC_GENCOM_OBJ = create(
179: PATH_OBJ, "command_obj.gif"); //$NON-NLS-1$
180:
181: public static final ImageDescriptor DESC_PLUGIN_OBJ = create(
182: PATH_OBJ, "plugin_obj.gif"); //$NON-NLS-1$
183: public static final ImageDescriptor DESC_PLUGIN_DIS_OBJ = create(
184: PATH_OBJ, "plugin_dis_obj.gif"); //$NON-NLS-1$
185: public static final ImageDescriptor DESC_OPERATING_SYSTEM_OBJ = create(
186: PATH_OBJ, "operating_system_obj.gif"); //$NON-NLS-1$
187: public static final ImageDescriptor DESC_SETTINGS_OBJ = create(
188: PATH_OBJ, "settings.gif"); //$NON-NLS-1$
189: public static final ImageDescriptor DESC_FRAGMENT_OBJ = create(
190: PATH_OBJ, "frgmt_obj.gif"); //$NON-NLS-1$
191: public static final ImageDescriptor DESC_FRAGMENT_DIS_OBJ = create(
192: PATH_OBJ, "frgmt_dis_obj.gif"); //$NON-NLS-1$
193: public static final ImageDescriptor DESC_REQ_PLUGINS_OBJ = create(
194: PATH_OBJ, "req_plugins_obj.gif"); //$NON-NLS-1$
195: public static final ImageDescriptor DESC_FRAGMENTS_OBJ = create(
196: PATH_OBJ, "frgmts_obj.gif"); //$NON-NLS-1$
197: public static final ImageDescriptor DESC_REQ_PLUGIN_OBJ = create(
198: PATH_OBJ, "req_plugin_obj.gif"); //$NON-NLS-1$
199: public static final ImageDescriptor DESC_RUNTIME_OBJ = create(
200: PATH_OBJ, "runtime_obj.gif"); //$NON-NLS-1$
201: public static final ImageDescriptor DESC_SCHEMA_OBJ = create(
202: PATH_OBJ, "schema_obj.gif"); //$NON-NLS-1$
203: public static final ImageDescriptor DESC_SCOMP_JAR_OBJ = create(
204: PATH_OBJ, "scomp_jar_obj.gif"); //$NON-NLS-1$
205: public static final ImageDescriptor DESC_SEQ_SC_OBJ = create(
206: PATH_OBJ, "seq_sc_obj.gif"); //$NON-NLS-1$
207: public static final ImageDescriptor DESC_DOC_SECTION_OBJ = create(
208: PATH_OBJ, "doc_section_obj.gif"); //$NON-NLS-1$
209: public static final ImageDescriptor DESC_ALERT_OBJ = create(
210: PATH_OBJ, "alert_obj.gif"); //$NON-NLS-1$
211: public static final ImageDescriptor DESC_TSK_ALERT_OBJ = create(
212: PATH_OBJ, "tsk_alert_obj.gif"); //$NON-NLS-1$
213: public static final ImageDescriptor DESC_LINK_OBJ = create(
214: PATH_OBJ, "link_obj.gif"); //$NON-NLS-1$
215: public static final ImageDescriptor DESC_LINKS_OBJ = create(
216: PATH_OBJ, "links_obj.gif"); //$NON-NLS-1$
217: public static final ImageDescriptor DESC_ERROR_ST_OBJ = create(
218: PATH_OBJ, "error_st_obj.gif"); //$NON-NLS-1$
219: public static final ImageDescriptor DESC_WARNING_ST_OBJ = create(
220: PATH_OBJ, "warning_st_obj.gif"); //$NON-NLS-1$
221: public static final ImageDescriptor DESC_INFO_ST_OBJ = create(
222: PATH_OBJ, "info_st_obj.gif"); //$NON-NLS-1$
223: public static final ImageDescriptor DESC_CATEGORY_OBJ = create(
224: PATH_OBJ, "category_obj.gif"); //$NON-NLS-1$
225: public static final ImageDescriptor DESC_PSEARCH_OBJ = create(
226: PATH_OBJ, "psearch_obj.gif"); //$NON-NLS-1$
227: public static final ImageDescriptor DESC_SITE_OBJ = create(
228: PATH_OBJ, "site_obj.gif"); //$NON-NLS-1$
229: public static final ImageDescriptor DESC_JUNIT_MAIN_TAB = create(
230: PATH_OBJ, "test.gif"); //$NON-NLS-1$
231: public static final ImageDescriptor DESC_OUTPUT_FOLDER_OBJ = create(
232: PATH_OBJ, "output_folder_attrib.gif"); //$NON-NLS-1$
233: public static final ImageDescriptor DESC_SOURCE_ATTACHMENT_OBJ = create(
234: PATH_OBJ, "source_attach_attrib.gif"); //$NON-NLS-1$
235: public static final ImageDescriptor DESC_FTR_XML_OBJ = create(
236: PATH_OBJ, "ftr_xml_obj.gif"); //$NON-NLS-1$
237: public static final ImageDescriptor DESC_OK_TRANSLATE_OBJ = create(
238: PATH_OBJ, "ok_st_obj.gif"); //$NON-NLS-1$
239: public static final ImageDescriptor DESC_NO_TRANSLATE_OBJ = create(
240: PATH_OBJ, "incomplete_tsk.gif"); //$NON-NLS-1$
241: public static final ImageDescriptor DESC_DISCOVERY = create(
242: PATH_OBJ, "discovery.gif"); //$NON-NLS-1$
243: public static final ImageDescriptor DESC_XML_TEXT_NODE = create(
244: PATH_OBJ, "xml_text_node.gif"); //$NON-NLS-1$
245: public static final ImageDescriptor DESC_CLIPBOARD = create(
246: PATH_OBJ, "copyviewtoclipboard_tsk.gif"); //$NON-NLS-1$
247: public static final ImageDescriptor DESC_BUILD_EXEC = create(
248: PATH_OBJ, "build_exec.gif"); //$NON-NLS-1$
249: public static final ImageDescriptor DESC_TARGET_DEFINITION = create(
250: PATH_OBJ, "target_profile_xml_obj.gif"); //$NON-NLS-1$
251: public static final ImageDescriptor DESC_TARGET_ENVIRONMENT = create(
252: PATH_OBJ, "environment.gif"); //$NON-NLS-1$
253: public static final ImageDescriptor DESC_PRODUCT_DEFINITION = create(
254: PATH_OBJ, "product_xml_obj.gif"); //$NON-NLS-1$
255: public static final ImageDescriptor DESC_PRODUCT_LAUNCHING = create(
256: PATH_OBJ, "start_application.gif"); //$NON-NLS-1$
257: public static final ImageDescriptor DESC_PRODUCT_BRANDING = create(
258: PATH_OBJ, "eclipse.gif"); //$NON-NLS-1$
259: public static final ImageDescriptor DESC_PLUGINS_FRAGMENTS = create(
260: PATH_OBJ, "plugins_and_fragments.gif"); //$NON-NLS-1$
261: public static final ImageDescriptor DESC_SITE_XML_OBJ = create(
262: PATH_OBJ, "site_xml_obj.gif"); //$NON-NLS-1$
263: public static final ImageDescriptor DESC_IMAGE_APPLICATION = create(
264: PATH_OBJ, "image_application.gif"); //$NON-NLS-1$
265: public static final ImageDescriptor DESC_FOCUS_ON = create(
266: PATH_OBJ, "focus.gif"); //$NON-NLS-1$
267:
268: /**
269: * OVR16
270: */
271: public static final ImageDescriptor DESC_DOC_CO = create(PATH_OVR,
272: "doc_co.gif"); //$NON-NLS-1$
273: public static final ImageDescriptor DESC_WARNING_CO = create(
274: PATH_OVR, "warning_co.gif"); //$NON-NLS-1$
275: public static final ImageDescriptor DESC_ERROR_CO = create(
276: PATH_OVR, "error_co.gif"); //$NON-NLS-1$
277: public static final ImageDescriptor DESC_EXPORT_CO = create(
278: PATH_OVR, "export_co.gif"); //$NON-NLS-1$
279: public static final ImageDescriptor DESC_EXTERNAL_CO = create(
280: PATH_OVR, "external_co.gif"); //$NON-NLS-1$
281: public static final ImageDescriptor DESC_BINARY_CO = create(
282: PATH_OVR, "binary_co.gif"); //$NON-NLS-1$
283: public static final ImageDescriptor DESC_JAVA_CO = create(PATH_OVR,
284: "java_co.gif"); //$NON-NLS-1$
285: public static final ImageDescriptor DESC_JAR_CO = create(PATH_OVR,
286: "jar_co.gif"); //$NON-NLS-1$
287: public static final ImageDescriptor DESC_PROJECT_CO = create(
288: PATH_OVR, "project_co.gif"); //$NON-NLS-1$
289:
290: /**
291: * TOOL16
292: */
293: public static final ImageDescriptor DESC_DEFCON_TOOL = create(
294: PATH_TOOL, "defcon_wiz.gif"); //$NON-NLS-1$
295: public static final ImageDescriptor DESC_NEWEXPRJ_TOOL = create(
296: PATH_TOOL, "newexprj_wiz.gif"); //$NON-NLS-1$
297: public static final ImageDescriptor DESC_NEWEXP_TOOL = create(
298: PATH_TOOL, "newexp_wiz.gif"); //$NON-NLS-1$
299: public static final ImageDescriptor DESC_NEWEX_TOOL = create(
300: PATH_TOOL, "newex_wiz.gif"); //$NON-NLS-1$
301: public static final ImageDescriptor DESC_NEWFTRPRJ_TOOL = create(
302: PATH_TOOL, "newftrprj_wiz.gif"); //$NON-NLS-1$
303: public static final ImageDescriptor DESC_NEWPPRJ_TOOL = create(
304: PATH_TOOL, "newpprj_wiz.gif"); //$NON-NLS-1$
305: public static final ImageDescriptor DESC_NEWFRAGPRJ_TOOL = create(
306: PATH_TOOL, "newfragprj_wiz.gif"); //$NON-NLS-1$
307: public static final ImageDescriptor DESC_WORKBENCH_LAUNCHER_WIZ = create(
308: PATH_TOOL, "eclipse_launcher_wiz.gif"); //$NON-NLS-1$
309: public static final ImageDescriptor DESC_NEWEXP_WIZ_TOOL = create(
310: PATH_TOOL, "newexp_wiz.gif"); //$NON-NLS-1$
311: public static final ImageDescriptor DESC_DEPLOYCS_TOOL = create(
312: PATH_TOOL, "new_cheatsheet_wiz.gif"); //$NON-NLS-1$
313: public static final ImageDescriptor DESC_VALIDATE_TOOL = create(
314: PATH_TOOL, "validate.gif"); //$NON-NLS-1$
315: public static final ImageDescriptor DESC_EXPORT_PLUGIN_TOOL = create(
316: PATH_TOOL, "exp_deployplug.gif"); //$NON-NLS-1$
317: public static final ImageDescriptor DESC_EXPORT_PRODUCT_TOOL = create(
318: PATH_TOOL, "exp_product.gif"); //$NON-NLS-1$
319: public static final ImageDescriptor DESC_EXPORT_FEATURE_TOOL = create(
320: PATH_TOOL, "exp_deployfeat.gif"); //$NON-NLS-1$
321: public static final ImageDescriptor DESC_BUILD_TOOL = create(
322: PATH_TOOL, "build_exec.gif"); //$NON-NLS-1$
323:
324: /**
325: * LCL
326: */
327: public static final ImageDescriptor DESC_ADD_ATT = create(PATH_LCL,
328: "add_att.gif"); //$NON-NLS-1$
329: public static final ImageDescriptor DESC_ALPHAB_SORT_CO = create(
330: PATH_LCL, "alphab_sort_co.gif"); //$NON-NLS-1$
331: public static final ImageDescriptor DESC_ALPHAB_SORT_CO_MINI = create(
332: PATH_LCL, "alphab_sort_co_mini.gif"); //$NON-NLS-1$
333: public static final ImageDescriptor DESC_CLONE_ATT = create(
334: PATH_LCL, "clone_att.gif"); //$NON-NLS-1$
335: public static final ImageDescriptor DESC_CLONE_EL = create(
336: PATH_LCL, "clone_el.gif"); //$NON-NLS-1$
337: public static final ImageDescriptor DESC_GENERATE_CLASS = create(
338: PATH_LCL, "generate_class.gif"); //$NON-NLS-1$
339: public static final ImageDescriptor DESC_GENERATE_INTERFACE = create(
340: PATH_LCL, "generate_interface.gif"); //$NON-NLS-1$
341: public static final ImageDescriptor DESC_PACKAGE_OBJ = create(
342: PATH_LCL, "package_obj.gif"); //$NON-NLS-1$
343: public static final ImageDescriptor DESC_GOTOOBJ = create(PATH_LCL,
344: "goto_obj.gif"); //$NON-NLS-1$
345: public static final ImageDescriptor DESC_PROPERTIES = create(
346: PATH_LCL, "properties.gif"); //$NON-NLS-1$
347: public static final ImageDescriptor DESC_REFRESH = create(PATH_LCL,
348: "refresh.gif"); //$NON-NLS-1$
349: public static final ImageDescriptor DESC_DELETE = create(PATH_LCL,
350: "delete_edit.gif"); //$NON-NLS-1$
351: public static final ImageDescriptor DESC_MAXIMIZE = create(
352: PATH_LCL, "maximize.gif"); //$NON-NLS-1$
353: public static final ImageDescriptor DESC_RESTORE = create(PATH_LCL,
354: "restore.gif"); //$NON-NLS-1$
355: public static final ImageDescriptor DESC_FULL_HIERARCHY = create(
356: PATH_LCL, "full_hierarchy.gif"); //$NON-NLS-1$
357: public static final ImageDescriptor DESC_HORIZONTAL = create(
358: PATH_LCL, "th_horizontal.gif"); //$NON-NLS-1$
359: public static final ImageDescriptor DESC_VERTICAL = create(
360: PATH_LCL, "th_vertical.gif"); //$NON-NLS-1$
361: public static final ImageDescriptor DESC_COLLAPSE_ALL = create(
362: PATH_LCL, "collapseall.gif"); //$NON-NLS-1$
363: public static final ImageDescriptor DESC_COLLAPSE_ALL_MINI = create(
364: PATH_LCL, "collapse_all_mini.gif"); //$NON-NLS-1$
365: public static final ImageDescriptor DESC_HELP = create(PATH_LCL,
366: "help.gif"); //$NON-NLS-1$
367: public static final ImageDescriptor DESC_LINK_WITH_EDITOR = create(
368: PATH_LCL, "synced.gif"); //$NON-NLS-1$
369: public static final ImageDescriptor DESC_CALLEES = create(PATH_LCL,
370: "ch_callees.gif"); //$NON-NLS-1$
371: public static final ImageDescriptor DESC_CALLERS = create(PATH_LCL,
372: "ch_callers.gif"); //$NON-NLS-1$
373: public static final ImageDescriptor DESC_DEP_LOOP = create(
374: PATH_LCL, "dep_loop.gif"); //$NON-NLS-1$
375: public static final ImageDescriptor DESC_FLAT_LAYOUT = create(
376: PATH_LCL, "flatLayout.gif"); //$NON-NLS-1$
377: public static final ImageDescriptor DESC_HIERARCHICAL_LAYOUT = create(
378: PATH_LCL, "hierarchicalLayout.gif"); //$NON-NLS-1$
379: public static final ImageDescriptor DESC_HISTORY_LIST = create(
380: PATH_LCL, "history_list.gif"); //$NON-NLS-1$
381: public static final ImageDescriptor DESC_CLEAR = create(PATH_LCL,
382: "clear.gif"); //$NON-NLS-1$
383: public static final ImageDescriptor DESC_FILTER = create(PATH_LCL,
384: "filter_ps.gif"); //$NON-NLS-1$
385:
386: public static final ImageDescriptor DESC_ADD_ATT_DISABLED = create(
387: PATH_LCL_DISABLED, "add_att.gif"); //$NON-NLS-1$
388: public static final ImageDescriptor DESC_ALPHAB_SORT_CO_DISABLED = create(
389: PATH_LCL_DISABLED, "alphab_sort_co.gif"); //$NON-NLS-1$
390: public static final ImageDescriptor DESC_CLONE_ATT_DISABLED = create(
391: PATH_LCL_DISABLED, "clone_att.gif"); //$NON-NLS-1$
392: public static final ImageDescriptor DESC_CLONE_EL_DISABLED = create(
393: PATH_LCL_DISABLED, "clone_el.gif"); //$NON-NLS-1$
394: public static final ImageDescriptor DESC_GENERATE_CLASS_DISABLED = create(
395: PATH_LCL_DISABLED, "generate_class.gif"); //$NON-NLS-1$
396: public static final ImageDescriptor DESC_GOTOOBJ_DISABLED = create(
397: PATH_LCL_DISABLED, "goto_obj.gif"); //$NON-NLS-1$
398: public static final ImageDescriptor DESC_PROPERTIES_DISABLED = create(
399: PATH_LCL_DISABLED, "properties.gif"); //$NON-NLS-1$
400: public static final ImageDescriptor DESC_REFRESH_DISABLED = create(
401: PATH_LCL_DISABLED, "refresh.gif"); //$NON-NLS-1$
402: public static final ImageDescriptor DESC_REMOVE_ATT_DISABLED = create(
403: PATH_LCL_DISABLED, "remove_att.gif"); //$NON-NLS-1$
404: public static final ImageDescriptor DESC_HORIZONTAL_DISABLED = create(
405: PATH_LCL_DISABLED, "th_horizontal.gif"); //$NON-NLS-1$
406: public static final ImageDescriptor DESC_VERTICAL_DISABLED = create(
407: PATH_LCL_DISABLED, "th_vertical.gif"); //$NON-NLS-1$
408: public static final ImageDescriptor DESC_COLLAPSE_ALL_DISABLED = create(
409: PATH_LCL_DISABLED, "collapseall.gif"); //$NON-NLS-1$
410: public static final ImageDescriptor DESC_LINK_WITH_EDITOR_DISABLED = create(
411: PATH_LCL_DISABLED, "synced.gif"); //$NON-NLS-1$
412: public static final ImageDescriptor DESC_CALLEES_DISABLED = create(
413: PATH_LCL_DISABLED, "ch_callees.gif"); //$NON-NLS-1$
414: public static final ImageDescriptor DESC_CALLERS_DISABLED = create(
415: PATH_LCL_DISABLED, "ch_callers.gif"); //$NON-NLS-1$
416: public static final ImageDescriptor DESC_DEP_LOOP_DISABLED = create(
417: PATH_LCL_DISABLED, "dep_loop.gif"); //$NON-NLS-1$
418: public static final ImageDescriptor DESC_FLAT_LAYOUT_DISABLED = create(
419: PATH_LCL_DISABLED, "flatLayout.gif"); //$NON-NLS-1$
420: public static final ImageDescriptor DESC_HIERARCHICAL_LAYOUT_DISABLED = create(
421: PATH_LCL_DISABLED, "hierarchicalLayout.gif"); //$NON-NLS-1$
422: public static final ImageDescriptor DESC_HISTORY_LIST_DISABLED = create(
423: PATH_LCL_DISABLED, "history_list.gif"); //$NON-NLS-1$
424: public static final ImageDescriptor DESC_DCLEAR = create(
425: PATH_LCL_DISABLED, "clear.gif"); //$NON-NLS-1$
426: public static final ImageDescriptor DESC_FILTER_DISABLED = create(
427: PATH_LCL_DISABLED, "filter_ps.gif"); //$NON-NLS-1$
428:
429: public static final ImageDescriptor DESC_RUN_EXC = create(PATH_OBJ,
430: "run_exc.gif"); //$NON-NLS-1$
431: public static final ImageDescriptor DESC_DEBUG_EXC = create(
432: PATH_OBJ, "debug_exc.gif"); //$NON-NLS-1$
433: public static final ImageDescriptor DESC_PROFILE_EXC = create(
434: PATH_OBJ, "profile_exc.gif"); //$NON-NLS-1$
435:
436: /**
437: * WIZ
438: */
439: public static final ImageDescriptor DESC_NEWPPRJ_WIZ = create(
440: PATH_WIZBAN, "newpprj_wiz.png"); //$NON-NLS-1$
441: public static final ImageDescriptor DESC_NEWFRAGPRJ_WIZ = create(
442: PATH_WIZBAN, "newfprj_wiz.png"); //$NON-NLS-1$
443: public static final ImageDescriptor DESC_DEFCON_WIZ = create(
444: PATH_WIZBAN, "defcon_wiz.png"); //$NON-NLS-1$
445: public static final ImageDescriptor DESC_TARGET_WIZ = create(
446: PATH_WIZBAN, "target_wiz.png"); //$NON-NLS-1$
447: public static final ImageDescriptor DESC_NEWEX_WIZ = create(
448: PATH_WIZBAN, "newex_wiz.png"); //$NON-NLS-1$
449: public static final ImageDescriptor DESC_NEWEXP_WIZ = create(
450: PATH_WIZBAN, "newexp_wiz.png"); //$NON-NLS-1$
451: public static final ImageDescriptor DESC_NEWEXPRJ_WIZ = create(
452: PATH_WIZBAN, "newexprj_wiz.png"); //$NON-NLS-1$
453: public static final ImageDescriptor DESC_NEWFTRPRJ_WIZ = create(
454: PATH_WIZBAN, "newftrprj_wiz.png"); //$NON-NLS-1$
455: public static final ImageDescriptor DESC_NEWFTRPTCH_WIZ = create(
456: PATH_WIZBAN, "newefix_wizban.png"); //$NON-NLS-1$
457: public static final ImageDescriptor DESC_NEWSITEPRJ_WIZ = create(
458: PATH_WIZBAN, "newsiteprj_wiz.png"); //$NON-NLS-1$
459: public static final ImageDescriptor DESC_FILESYSTEM_WIZARD = create(
460: PATH_WIZBAN, "newfolder_wiz.png"); //$NON-NLS-1$
461: public static final ImageDescriptor DESC_CONVJPPRJ_WIZ = create(
462: PATH_WIZBAN, "convjpprj_wiz.png"); //$NON-NLS-1$
463: public static final ImageDescriptor DESC_EXT_POINT_SCHEMA_WIZ = create(
464: PATH_WIZBAN, "schema_wiz.png"); //$NON-NLS-1$
465: public static final ImageDescriptor DESC_PLUGIN_IMPORT_WIZ = create(
466: PATH_WIZBAN, "imp_extplug_wiz.png"); //$NON-NLS-1$
467: public static final ImageDescriptor DESC_PLUGIN_EXPORT_WIZ = create(
468: PATH_WIZBAN, "exp_deployplug_wiz.png"); //$NON-NLS-1$
469: public static final ImageDescriptor DESC_FEATURE_IMPORT_WIZ = create(
470: PATH_WIZBAN, "imp_extfeat_wiz.png"); //$NON-NLS-1$
471: public static final ImageDescriptor DESC_FEATURE_EXPORT_WIZ = create(
472: PATH_WIZBAN, "exp_deployfeat_wiz.png"); //$NON-NLS-1$
473: public static final ImageDescriptor DESC_MIGRATE_30_WIZ = create(
474: PATH_WIZBAN, "migrate_30_wiz.png"); //$NON-NLS-1$
475: public static final ImageDescriptor DESC_PRODUCT_WIZ = create(
476: PATH_WIZBAN, "product_wiz.png"); //$NON-NLS-1$
477: public static final ImageDescriptor DESC_CHEATSHEET_WIZ = create(
478: PATH_WIZBAN, "new_cheatsheet_wiz.png"); //$NON-NLS-1$
479: public static final ImageDescriptor DESC_PRODUCT_EXPORT_WIZ = create(
480: PATH_WIZBAN, "exp_product.png"); //$NON-NLS-1$
481: public static final ImageDescriptor DESC_JAR_TO_PLUGIN_WIZ = create(
482: PATH_WIZBAN, "jarToPlugin_wiz.png"); //$NON-NLS-1$
483: public static final ImageDescriptor DESC_EXTSTR_WIZ = create(
484: PATH_WIZBAN, "extstr_wiz.png"); //$NON-NLS-1$
485: public static final ImageDescriptor DESC_XHTML_CONVERT_WIZ = create(
486: PATH_WIZBAN, "xhtml_wiz.png"); //$NON-NLS-1$
487: public static final ImageDescriptor DESC_ORGANIZE_MANIFESTS = create(
488: PATH_WIZBAN, "cleanmanifest_wiz.png"); //$NON-NLS-1$
489: /**
490: * View
491: */
492: public static final ImageDescriptor DESC_ARGUMENT_TAB = create(
493: PATH_VIEW, "variable_tab.gif"); //$NON-NLS-1$
494:
495: private static ImageDescriptor create(String prefix, String name) {
496: return ImageDescriptor
497: .createFromURL(makeImageURL(prefix, name));
498: }
499:
500: public static Image get(String key) {
501: if (PLUGIN_REGISTRY == null)
502: initialize();
503: return PLUGIN_REGISTRY.get(key);
504: }
505:
506: /* package */
507: private static final void initialize() {
508: PLUGIN_REGISTRY = new ImageRegistry();
509: manage(IMG_ATT_CLASS_OBJ, DESC_ATT_CLASS_OBJ);
510: manage(IMG_ATT_FILE_OBJ, DESC_ATT_FILE_OBJ);
511: manage(IMG_ATT_IMPL_OBJ, DESC_ATT_IMPL_OBJ);
512: manage(IMG_ATT_REQ_OBJ, DESC_ATT_REQ_OBJ);
513: manage(IMG_GENERIC_XML_OBJ, DESC_GENERIC_XML_OBJ);
514: manage(OBJ_DESC_GENERATE_CLASS, DESC_GENERATE_CLASS);
515: manage(OBJ_DESC_GENERATE_INTERFACE, DESC_GENERATE_INTERFACE);
516: manage(OBJ_DESC_PACKAGE, DESC_PACKAGE_OBJ);
517: manage(OBJ_DESC_BUNDLE, DESC_BUNDLE_OBJ);
518: }
519:
520: private static URL makeImageURL(String prefix, String name) {
521: String path = "$nl$/" + prefix + name; //$NON-NLS-1$
522: return FileLocator.find(PDEPlugin.getDefault().getBundle(),
523: new Path(path), null);
524: }
525:
526: public static Image manage(String key, ImageDescriptor desc) {
527: Image image = desc.createImage();
528: PLUGIN_REGISTRY.put(key, image);
529: return image;
530: }
531: }
|