1 11 package org.eclipse.pde.internal.ui; 12 13 import java.net.URL ; 14 15 import org.eclipse.core.runtime.FileLocator; 16 import org.eclipse.core.runtime.Path; 17 import org.eclipse.jface.resource.ImageDescriptor; 18 import org.eclipse.jface.resource.ImageRegistry; 19 import org.eclipse.swt.graphics.Image; 20 21 24 public class PDEPluginImages { 25 26 private static final String NAME_PREFIX= PDEPlugin.getPluginId()+"."; 28 private static ImageRegistry PLUGIN_REGISTRY; 29 30 public final static String ICONS_PATH = "icons/"; 32 35 36 private static final String PATH_OBJ= ICONS_PATH+"obj16/"; private static final String PATH_VIEW = ICONS_PATH+"view16/"; private static final String PATH_LCL= ICONS_PATH+"elcl16/"; private static final String PATH_LCL_DISABLED= ICONS_PATH+"dlcl16/"; private static final String PATH_TOOL = ICONS_PATH + "etool16/"; private static final String PATH_OVR = ICONS_PATH + "ovr16/"; private static final String PATH_WIZBAN = ICONS_PATH + "wizban/"; 44 47 public static final String IMG_FORM_WIZ = NAME_PREFIX+"FORM_WIZ"; public static final String IMG_FORM_BANNER = NAME_PREFIX+"FORM_BANNER"; public static final String IMG_ATT_CLASS_OBJ = NAME_PREFIX + "IMG_ATT_CLASS_OBJ"; public static final String IMG_ATT_FILE_OBJ = NAME_PREFIX + "IMG_ATT_FILE_OBJ"; public static final String IMG_ATT_IMPL_OBJ = NAME_PREFIX + "IMG_ATT_IMPL_OBJ"; public static final String IMG_ATT_REQ_OBJ = NAME_PREFIX + "IMG_ATT_REQ_OBJ"; public static final String IMG_GENERIC_XML_OBJ = NAME_PREFIX + "IMG_GENERIC_XML_OBJ"; public static final String OBJ_DESC_GENERATE_CLASS = NAME_PREFIX + "OBJ_DESC_GENERATE_CLASS"; public static final String OBJ_DESC_GENERATE_INTERFACE = NAME_PREFIX + "OBJ_DESC_GENERATE_INTERFACE"; public static final String OBJ_DESC_PACKAGE = NAME_PREFIX + "OBJ_DESC_PACKAGE"; 58 61 public static final ImageDescriptor DESC_MAIN_TAB = create(PATH_OBJ, "main_tab.gif"); public static final ImageDescriptor DESC_ALL_SC_OBJ = create(PATH_OBJ, "all_sc_obj.gif"); public static final ImageDescriptor DESC_ATT_CLASS_OBJ = create(PATH_OBJ, "att_class_obj.gif"); public static final ImageDescriptor DESC_ATT_FILE_OBJ = create(PATH_OBJ, "att_file_obj.gif"); public static final ImageDescriptor DESC_ATT_IMPL_OBJ = create(PATH_OBJ, "att_impl_obj.gif"); public static final ImageDescriptor DESC_ATT_REQ_OBJ = create(PATH_OBJ, "att_req_obj.gif"); public static final ImageDescriptor DESC_ATT_URI_OBJ = create(PATH_OBJ, "att_URI_obj.gif"); public static final ImageDescriptor DESC_BUNDLE_OBJ = create(PATH_OBJ, "bundle_obj.gif"); public static final ImageDescriptor DESC_CHOICE_SC_OBJ = create(PATH_OBJ, "choice_sc_obj.gif"); public static final ImageDescriptor DESC_FEATURE_JAR_OBJ = create(PATH_OBJ, "ftr_jar_obj.gif"); public static final ImageDescriptor DESC_FEATURE_MF_OBJ = create(PATH_OBJ, "ftr_mf_obj.gif"); public static final ImageDescriptor DESC_FEATURE_OBJ = create(PATH_OBJ, "feature_obj.gif"); public static final ImageDescriptor DESC_NOREF_FEATURE_OBJ = create(PATH_OBJ, "noref_feature_obj.gif"); public static final ImageDescriptor DESC_ELREF_SC_OBJ = create(PATH_OBJ, "elref_sc_obj.gif"); public static final ImageDescriptor DESC_EXTENSIONS_OBJ = create(PATH_OBJ, "extensions_obj.gif"); public static final ImageDescriptor DESC_EXTENSION_OBJ = create(PATH_OBJ, "extension_obj.gif"); public static final ImageDescriptor DESC_EXT_PLUGIN_OBJ = create(PATH_OBJ, "ext_plugin_obj.gif"); public static final ImageDescriptor DESC_EXT_FRAGMENT_OBJ = create(PATH_OBJ, "external_frgmt_obj.gif"); public static final ImageDescriptor DESC_EXT_POINTS_OBJ = create(PATH_OBJ, "ext_points_obj.gif"); public static final ImageDescriptor DESC_EXT_POINT_OBJ = create(PATH_OBJ, "ext_point_obj.gif"); public static final ImageDescriptor DESC_GEL_SC_OBJ = create(PATH_OBJ, "gel_sc_obj.gif"); public static final ImageDescriptor DESC_GENERIC_XML_OBJ = create(PATH_OBJ, "generic_xml_obj.gif"); public static final ImageDescriptor DESC_GROUP_SC_OBJ = create(PATH_OBJ, "group_sc_obj.gif"); public static final ImageDescriptor DESC_JAR_OBJ = create(PATH_OBJ, "jar_obj.gif"); public static final ImageDescriptor DESC_JAR_LIB_OBJ = create(PATH_OBJ, "jar_l_obj.gif"); public static final ImageDescriptor DESC_JAVA_LIB_OBJ = create(PATH_OBJ, "java_lib_obj.gif"); public static final ImageDescriptor DESC_OVERVIEW_OBJ = create(PATH_OBJ, "overview_obj.gif"); public static final ImageDescriptor DESC_PAGE_OBJ = create(PATH_OBJ, "page_obj.gif"); public static final ImageDescriptor DESC_PLUGIN_MF_OBJ = create(PATH_OBJ, "plugin_mf_obj.gif"); public static final ImageDescriptor DESC_FRAGMENT_MF_OBJ = create(PATH_OBJ, "frgmt_mf_obj.gif"); public static final ImageDescriptor DESC_BUILD_VAR_OBJ = create(PATH_OBJ, "build_var_obj.gif"); public static final ImageDescriptor DESC_LOOP_OBJ = create(PATH_OBJ, "loop_obj.gif"); public static final ImageDescriptor DESC_LOOP_NODE_OBJ = create(PATH_OBJ, "loop_node_obj.gif"); public static final ImageDescriptor DESC_PROCESSING_INST_OBJ = create(PATH_OBJ, "processinginst.gif"); public static final ImageDescriptor DESC_XML_ELEMENT_OBJ = create(PATH_OBJ, "element.gif"); public static final ImageDescriptor DESC_XML_ELEMENT_REF_OBJ = create(PATH_OBJ, "elref_sc_obj.gif"); 98 public static final ImageDescriptor DESC_SIMPLECS_OBJ = create(PATH_OBJ, "cheatsheet_simple_obj.gif"); public static final ImageDescriptor DESC_COMPCS_OBJ = create(PATH_OBJ, "cheatsheet_composite_obj.gif"); public static final ImageDescriptor DESC_CSTASKGROUP_OBJ = create(PATH_OBJ, "cheatsheet_taskgroup_obj.gif"); public static final ImageDescriptor DESC_CSITEM_OBJ = create(PATH_OBJ, "cheatsheet_item_obj.gif"); public static final ImageDescriptor DESC_CSSUBITEM_OBJ = create(PATH_OBJ, "cheatsheet_subitem_obj.gif"); public static final ImageDescriptor DESC_CSINTRO_OBJ = create(PATH_OBJ, "cheatsheet_intro_obj.gif"); public static final ImageDescriptor DESC_CSCONCLUSION_OBJ = create(PATH_OBJ, "cheatsheet_conclusion_obj.gif"); public static final ImageDescriptor DESC_CSUNSUPPORTED_OBJ = create(PATH_OBJ, "cheatsheet_unsupported_obj.gif"); public static final ImageDescriptor DESC_CHEATSHEET_OBJ = create(PATH_OBJ, "cheatsheet_obj.gif"); 108 public static final ImageDescriptor DESC_COMGROUP_OBJ = create(PATH_OBJ, "keygroups_obj.gif"); public static final ImageDescriptor DESC_GENCOM_OBJ = create(PATH_OBJ, "command_obj.gif"); 111 public static final ImageDescriptor DESC_PLUGIN_OBJ = create(PATH_OBJ, "plugin_obj.gif"); public static final ImageDescriptor DESC_PLUGIN_DIS_OBJ = create(PATH_OBJ, "plugin_dis_obj.gif"); public static final ImageDescriptor DESC_OPERATING_SYSTEM_OBJ = create(PATH_OBJ, "operating_system_obj.gif"); public static final ImageDescriptor DESC_SETTINGS_OBJ = create(PATH_OBJ, "settings.gif"); public static final ImageDescriptor DESC_FRAGMENT_OBJ = create(PATH_OBJ, "frgmt_obj.gif"); public static final ImageDescriptor DESC_FRAGMENT_DIS_OBJ = create(PATH_OBJ, "frgmt_dis_obj.gif"); public static final ImageDescriptor DESC_REQ_PLUGINS_OBJ = create(PATH_OBJ, "req_plugins_obj.gif"); public static final ImageDescriptor DESC_FRAGMENTS_OBJ = create(PATH_OBJ, "frgmts_obj.gif"); public static final ImageDescriptor DESC_REQ_PLUGIN_OBJ = create(PATH_OBJ, "req_plugin_obj.gif"); public static final ImageDescriptor DESC_RUNTIME_OBJ = create(PATH_OBJ, "runtime_obj.gif"); public static final ImageDescriptor DESC_SCHEMA_OBJ = create(PATH_OBJ, "schema_obj.gif"); public static final ImageDescriptor DESC_SCOMP_JAR_OBJ = create(PATH_OBJ, "scomp_jar_obj.gif"); public static final ImageDescriptor DESC_SEQ_SC_OBJ = create(PATH_OBJ, "seq_sc_obj.gif"); public static final ImageDescriptor DESC_DOC_SECTION_OBJ = create(PATH_OBJ, "doc_section_obj.gif"); public static final ImageDescriptor DESC_ALERT_OBJ = create(PATH_OBJ, "alert_obj.gif"); public static final ImageDescriptor DESC_TSK_ALERT_OBJ = create(PATH_OBJ, "tsk_alert_obj.gif"); public static final ImageDescriptor DESC_LINK_OBJ = create(PATH_OBJ, "link_obj.gif"); public static final ImageDescriptor DESC_LINKS_OBJ = create(PATH_OBJ, "links_obj.gif"); public static final ImageDescriptor DESC_ERROR_ST_OBJ = create(PATH_OBJ, "error_st_obj.gif"); public static final ImageDescriptor DESC_WARNING_ST_OBJ = create(PATH_OBJ, "warning_st_obj.gif"); public static final ImageDescriptor DESC_INFO_ST_OBJ = create(PATH_OBJ, "info_st_obj.gif"); public static final ImageDescriptor DESC_CATEGORY_OBJ = create(PATH_OBJ, "category_obj.gif"); public static final ImageDescriptor DESC_PSEARCH_OBJ = create(PATH_OBJ, "psearch_obj.gif"); public static final ImageDescriptor DESC_SITE_OBJ = create(PATH_OBJ, "site_obj.gif"); public static final ImageDescriptor DESC_JUNIT_MAIN_TAB = create(PATH_OBJ, "test.gif"); public static final ImageDescriptor DESC_OUTPUT_FOLDER_OBJ = create(PATH_OBJ, "output_folder_attrib.gif"); public static final ImageDescriptor DESC_SOURCE_ATTACHMENT_OBJ = create(PATH_OBJ, "source_attach_attrib.gif"); public static final ImageDescriptor DESC_FTR_XML_OBJ = create(PATH_OBJ, "ftr_xml_obj.gif"); public static final ImageDescriptor DESC_OK_TRANSLATE_OBJ = create(PATH_OBJ, "ok_st_obj.gif"); public static final ImageDescriptor DESC_NO_TRANSLATE_OBJ = create(PATH_OBJ, "incomplete_tsk.gif"); public static final ImageDescriptor DESC_DISCOVERY = create(PATH_OBJ, "discovery.gif"); public static final ImageDescriptor DESC_XML_TEXT_NODE = create(PATH_OBJ, "xml_text_node.gif"); public static final ImageDescriptor DESC_CLIPBOARD = create(PATH_OBJ, "copyviewtoclipboard_tsk.gif"); public static final ImageDescriptor DESC_BUILD_EXEC = create(PATH_OBJ, "build_exec.gif"); public static final ImageDescriptor DESC_TARGET_DEFINITION = create(PATH_OBJ, "target_profile_xml_obj.gif"); public static final ImageDescriptor DESC_TARGET_ENVIRONMENT = create(PATH_OBJ, "environment.gif"); public static final ImageDescriptor DESC_PRODUCT_DEFINITION = create(PATH_OBJ, "product_xml_obj.gif"); public static final ImageDescriptor DESC_PRODUCT_LAUNCHING = create(PATH_OBJ, "start_application.gif"); public static final ImageDescriptor DESC_PRODUCT_BRANDING = create(PATH_OBJ, "eclipse.gif"); public static final ImageDescriptor DESC_PLUGINS_FRAGMENTS = create(PATH_OBJ, "plugins_and_fragments.gif"); public static final ImageDescriptor DESC_SITE_XML_OBJ = create(PATH_OBJ, "site_xml_obj.gif"); public static final ImageDescriptor DESC_IMAGE_APPLICATION = create(PATH_OBJ, "image_application.gif"); public static final ImageDescriptor DESC_FOCUS_ON = create(PATH_OBJ, "focus.gif"); 155 158 public static final ImageDescriptor DESC_DOC_CO = create(PATH_OVR, "doc_co.gif"); public static final ImageDescriptor DESC_WARNING_CO = create(PATH_OVR, "warning_co.gif"); public static final ImageDescriptor DESC_ERROR_CO = create(PATH_OVR, "error_co.gif"); public static final ImageDescriptor DESC_EXPORT_CO = create(PATH_OVR, "export_co.gif"); public static final ImageDescriptor DESC_EXTERNAL_CO = create(PATH_OVR, "external_co.gif"); public static final ImageDescriptor DESC_BINARY_CO = create(PATH_OVR, "binary_co.gif"); public static final ImageDescriptor DESC_JAVA_CO = create(PATH_OVR, "java_co.gif"); public static final ImageDescriptor DESC_JAR_CO = create(PATH_OVR, "jar_co.gif"); public static final ImageDescriptor DESC_PROJECT_CO = create(PATH_OVR, "project_co.gif"); 168 171 public static final ImageDescriptor DESC_DEFCON_TOOL = create(PATH_TOOL, "defcon_wiz.gif"); public static final ImageDescriptor DESC_NEWEXPRJ_TOOL = create(PATH_TOOL, "newexprj_wiz.gif"); public static final ImageDescriptor DESC_NEWEXP_TOOL = create(PATH_TOOL, "newexp_wiz.gif"); public static final ImageDescriptor DESC_NEWEX_TOOL = create(PATH_TOOL, "newex_wiz.gif"); public static final ImageDescriptor DESC_NEWFTRPRJ_TOOL = create(PATH_TOOL, "newftrprj_wiz.gif"); public static final ImageDescriptor DESC_NEWPPRJ_TOOL = create(PATH_TOOL, "newpprj_wiz.gif"); public static final ImageDescriptor DESC_NEWFRAGPRJ_TOOL = create(PATH_TOOL, "newfragprj_wiz.gif"); public static final ImageDescriptor DESC_WORKBENCH_LAUNCHER_WIZ = create(PATH_TOOL, "eclipse_launcher_wiz.gif"); public static final ImageDescriptor DESC_NEWEXP_WIZ_TOOL = create(PATH_TOOL, "newexp_wiz.gif"); public static final ImageDescriptor DESC_DEPLOYCS_TOOL = create(PATH_TOOL, "new_cheatsheet_wiz.gif"); public static final ImageDescriptor DESC_VALIDATE_TOOL = create(PATH_TOOL, "validate.gif"); 183 186 public static final ImageDescriptor DESC_ADD_ATT = create(PATH_LCL, "add_att.gif"); public static final ImageDescriptor DESC_ALPHAB_SORT_CO = create(PATH_LCL, "alphab_sort_co.gif"); public static final ImageDescriptor DESC_ALPHAB_SORT_CO_MINI = create(PATH_LCL, "alphab_sort_co_mini.gif"); public static final ImageDescriptor DESC_CLONE_ATT = create(PATH_LCL, "clone_att.gif"); public static final ImageDescriptor DESC_CLONE_EL = create(PATH_LCL, "clone_el.gif"); public static final ImageDescriptor DESC_GENERATE_CLASS = create(PATH_LCL, "generate_class.gif"); public static final ImageDescriptor DESC_GENERATE_INTERFACE = create(PATH_LCL, "generate_interface.gif"); public static final ImageDescriptor DESC_PACKAGE_OBJ = create(PATH_LCL, "package_obj.gif"); public static final ImageDescriptor DESC_GOTOOBJ = create(PATH_LCL, "goto_obj.gif"); public static final ImageDescriptor DESC_PROPERTIES = create(PATH_LCL, "properties.gif"); public static final ImageDescriptor DESC_REFRESH = create(PATH_LCL, "refresh.gif"); public static final ImageDescriptor DESC_DELETE = create(PATH_LCL, "delete_edit.gif"); public static final ImageDescriptor DESC_MAXIMIZE = create(PATH_LCL, "maximize.gif"); public static final ImageDescriptor DESC_RESTORE = create(PATH_LCL, "restore.gif"); public static final ImageDescriptor DESC_FULL_HIERARCHY = create(PATH_LCL, "full_hierarchy.gif"); public static final ImageDescriptor DESC_HORIZONTAL = create(PATH_LCL, "th_horizontal.gif"); public static final ImageDescriptor DESC_VERTICAL = create(PATH_LCL, "th_vertical.gif"); public static final ImageDescriptor DESC_COLLAPSE_ALL = create(PATH_LCL, "collapseall.gif"); public static final ImageDescriptor DESC_COLLAPSE_ALL_MINI = create(PATH_LCL, "collapse_all_mini.gif"); public static final ImageDescriptor DESC_HELP = create(PATH_LCL, "help.gif"); public static final ImageDescriptor DESC_LINK_WITH_EDITOR = create(PATH_LCL, "synced.gif"); public static final ImageDescriptor DESC_CALLEES = create(PATH_LCL, "ch_callees.gif"); public static final ImageDescriptor DESC_CALLERS = create(PATH_LCL, "ch_callers.gif"); public static final ImageDescriptor DESC_DEP_LOOP = create(PATH_LCL, "dep_loop.gif"); public static final ImageDescriptor DESC_FLAT_LAYOUT = create(PATH_LCL, "flatLayout.gif"); public static final ImageDescriptor DESC_HIERARCHICAL_LAYOUT = create(PATH_LCL, "hierarchicalLayout.gif"); public static final ImageDescriptor DESC_HISTORY_LIST = create(PATH_LCL, "history_list.gif"); public static final ImageDescriptor DESC_CLEAR = create(PATH_LCL, "clear.gif"); public static final ImageDescriptor DESC_FILTER = create(PATH_LCL, "filter_ps.gif"); 216 public static final ImageDescriptor DESC_ADD_ATT_DISABLED = create(PATH_LCL_DISABLED, "add_att.gif"); public static final ImageDescriptor DESC_ALPHAB_SORT_CO_DISABLED = create(PATH_LCL_DISABLED, "alphab_sort_co.gif"); public static final ImageDescriptor DESC_CLONE_ATT_DISABLED = create(PATH_LCL_DISABLED, "clone_att.gif"); public static final ImageDescriptor DESC_CLONE_EL_DISABLED = create(PATH_LCL_DISABLED, "clone_el.gif"); public static final ImageDescriptor DESC_GENERATE_CLASS_DISABLED = create(PATH_LCL_DISABLED, "generate_class.gif"); public static final ImageDescriptor DESC_GOTOOBJ_DISABLED = create(PATH_LCL_DISABLED, "goto_obj.gif"); public static final ImageDescriptor DESC_PROPERTIES_DISABLED = create(PATH_LCL_DISABLED, "properties.gif"); public static final ImageDescriptor DESC_REFRESH_DISABLED = create(PATH_LCL_DISABLED, "refresh.gif"); public static final ImageDescriptor DESC_REMOVE_ATT_DISABLED = create(PATH_LCL_DISABLED, "remove_att.gif"); public static final ImageDescriptor DESC_HORIZONTAL_DISABLED = create(PATH_LCL_DISABLED, "th_horizontal.gif"); public static final ImageDescriptor DESC_VERTICAL_DISABLED = create(PATH_LCL_DISABLED, "th_vertical.gif"); public static final ImageDescriptor DESC_COLLAPSE_ALL_DISABLED = create(PATH_LCL_DISABLED, "collapseall.gif"); public static final ImageDescriptor DESC_LINK_WITH_EDITOR_DISABLED = create(PATH_LCL_DISABLED, "synced.gif"); public static final ImageDescriptor DESC_CALLEES_DISABLED = create(PATH_LCL_DISABLED, "ch_callees.gif"); public static final ImageDescriptor DESC_CALLERS_DISABLED = create(PATH_LCL_DISABLED, "ch_callers.gif"); public static final ImageDescriptor DESC_DEP_LOOP_DISABLED = create(PATH_LCL_DISABLED, "dep_loop.gif"); public static final ImageDescriptor DESC_FLAT_LAYOUT_DISABLED = create(PATH_LCL_DISABLED, "flatLayout.gif"); public static final ImageDescriptor DESC_HIERARCHICAL_LAYOUT_DISABLED = create(PATH_LCL_DISABLED, "hierarchicalLayout.gif"); public static final ImageDescriptor DESC_HISTORY_LIST_DISABLED = create(PATH_LCL_DISABLED, "history_list.gif"); public static final ImageDescriptor DESC_DCLEAR = create(PATH_LCL_DISABLED, "clear.gif"); public static final ImageDescriptor DESC_FILTER_DISABLED = create(PATH_LCL_DISABLED, "filter_ps.gif"); 238 public static final ImageDescriptor DESC_RUN_EXC = create(PATH_OBJ, "run_exc.gif"); public static final ImageDescriptor DESC_DEBUG_EXC = create(PATH_OBJ, "debug_exc.gif"); public static final ImageDescriptor DESC_PROFILE_EXC = create(PATH_OBJ, "profile_exc.gif"); 242 243 246 public static final ImageDescriptor DESC_NEWPPRJ_WIZ = create(PATH_WIZBAN, "newpprj_wiz.png"); public static final ImageDescriptor DESC_NEWFRAGPRJ_WIZ = create(PATH_WIZBAN, "newfprj_wiz.png"); public static final ImageDescriptor DESC_DEFCON_WIZ = create(PATH_WIZBAN, "defcon_wiz.png"); public static final ImageDescriptor DESC_TARGET_WIZ = create(PATH_WIZBAN, "target_wiz.png"); public static final ImageDescriptor DESC_NEWEX_WIZ = create(PATH_WIZBAN, "newex_wiz.png"); public static final ImageDescriptor DESC_NEWEXP_WIZ = create(PATH_WIZBAN, "newexp_wiz.png"); public static final ImageDescriptor DESC_NEWEXPRJ_WIZ = create(PATH_WIZBAN, "newexprj_wiz.png"); public static final ImageDescriptor DESC_NEWFTRPRJ_WIZ = create(PATH_WIZBAN, "newftrprj_wiz.png"); public static final ImageDescriptor DESC_NEWFTRPTCH_WIZ = create(PATH_WIZBAN, "newefix_wizban.png"); public static final ImageDescriptor DESC_NEWSITEPRJ_WIZ = create(PATH_WIZBAN, "newsiteprj_wiz.png"); public static final ImageDescriptor DESC_FILESYSTEM_WIZARD = create(PATH_WIZBAN, "newfolder_wiz.png"); public static final ImageDescriptor DESC_CONVJPPRJ_WIZ = create(PATH_WIZBAN, "convjpprj_wiz.png"); public static final ImageDescriptor DESC_EXT_POINT_SCHEMA_WIZ = create(PATH_WIZBAN, "schema_wiz.png"); public static final ImageDescriptor DESC_PLUGIN_IMPORT_WIZ = create(PATH_WIZBAN, "imp_extplug_wiz.png"); public static final ImageDescriptor DESC_PLUGIN_EXPORT_WIZ = create(PATH_WIZBAN, "exp_deployplug_wiz.png"); public static final ImageDescriptor DESC_FEATURE_IMPORT_WIZ = create(PATH_WIZBAN, "imp_extfeat_wiz.png"); public static final ImageDescriptor DESC_FEATURE_EXPORT_WIZ = create(PATH_WIZBAN, "exp_deployfeat_wiz.png"); public static final ImageDescriptor DESC_MIGRATE_30_WIZ = create(PATH_WIZBAN, "migrate_30_wiz.png"); public static final ImageDescriptor DESC_PRODUCT_WIZ = create(PATH_WIZBAN, "product_wiz.png"); public static final ImageDescriptor DESC_CHEATSHEET_WIZ = create(PATH_WIZBAN, "new_cheatsheet_wiz.png"); public static final ImageDescriptor DESC_PRODUCT_EXPORT_WIZ = create(PATH_WIZBAN, "exp_product.png"); public static final ImageDescriptor DESC_JAR_TO_PLUGIN_WIZ = create(PATH_WIZBAN, "jarToPlugin_wiz.png"); public static final ImageDescriptor DESC_EXTSTR_WIZ = create(PATH_WIZBAN, "extstr_wiz.png"); public static final ImageDescriptor DESC_XHTML_CONVERT_WIZ = create(PATH_WIZBAN, "xhtml_wiz.png"); public static final ImageDescriptor DESC_ORGANIZE_MANIFESTS = create(PATH_WIZBAN, "cleanmanifest_wiz.png"); 274 public static final ImageDescriptor DESC_ARGUMENT_TAB = create(PATH_VIEW, "variable_tab.gif"); private static ImageDescriptor create(String prefix, String name) { 276 return ImageDescriptor.createFromURL(makeImageURL(prefix, name)); 277 } 278 public static Image get(String key) { 279 if (PLUGIN_REGISTRY==null) initialize(); 280 return PLUGIN_REGISTRY.get(key); 281 } 282 283 284 private static final void initialize() { 285 PLUGIN_REGISTRY = new ImageRegistry(); 286 manage(IMG_ATT_CLASS_OBJ,DESC_ATT_CLASS_OBJ); 287 manage(IMG_ATT_FILE_OBJ, DESC_ATT_FILE_OBJ); 288 manage(IMG_ATT_IMPL_OBJ, DESC_ATT_IMPL_OBJ); 289 manage(IMG_ATT_REQ_OBJ, DESC_ATT_REQ_OBJ); 290 manage(IMG_GENERIC_XML_OBJ, DESC_GENERIC_XML_OBJ); 291 manage(OBJ_DESC_GENERATE_CLASS, DESC_GENERATE_CLASS); 292 manage(OBJ_DESC_GENERATE_INTERFACE, DESC_GENERATE_INTERFACE); 293 manage(OBJ_DESC_PACKAGE, DESC_PACKAGE_OBJ); 294 } 295 296 private static URL makeImageURL(String prefix, String name) { 297 String path = "$nl$/" + prefix + name; return FileLocator.find(PDEPlugin.getDefault().getBundle(), new Path(path), null); 299 } 300 301 public static Image manage(String key, ImageDescriptor desc) { 302 Image image = desc.createImage(); 303 PLUGIN_REGISTRY.put(key, image); 304 return image; 305 } 306 } 307 | Popular Tags |