1 package org.apache.axis.tool.codegen.eclipse.plugin; 2 3 import org.eclipse.jface.resource.ImageDescriptor; 4 import org.eclipse.ui.plugin.*; 5 import org.osgi.framework.BundleContext; 6 import java.util.*; 7 8 11 public class CodegenWizardPlugin extends AbstractUIPlugin { 12 private static CodegenWizardPlugin plugin; 14 private ResourceBundle resourceBundle; 16 private static ImageDescriptor wizardImageDescriptor; 17 18 21 public CodegenWizardPlugin() { 22 super(); 23 plugin = this; 24 try { 25 resourceBundle = ResourceBundle.getBundle("org.apache.axis.tool.codegen.resource.Codegen"); 26 } catch (MissingResourceException x) { 27 resourceBundle = null; 28 } 29 } 30 31 34 public void start(BundleContext context) throws Exception { 35 super.start(context); 36 } 37 38 41 public void stop(BundleContext context) throws Exception { 42 super.stop(context); 43 } 44 45 48 public static CodegenWizardPlugin getDefault() { 49 return plugin; 50 } 51 52 56 public static String getResourceString(String key) { 57 ResourceBundle bundle = CodegenWizardPlugin.getDefault().getResourceBundle(); 58 try { 59 return (bundle != null) ? bundle.getString(key) : key; 60 } catch (MissingResourceException e) { 61 return key; 62 } 63 } 64 65 68 public ResourceBundle getResourceBundle() { 69 return resourceBundle; 70 } 71 72 public static ImageDescriptor getWizardImageDescriptor(){ 73 if (wizardImageDescriptor==null){ 74 wizardImageDescriptor =CodegenWizardPlugin.imageDescriptorFromPlugin("Axis2_Codegen_Wizard","icons/asf-feather.gif"); 75 } 76 return wizardImageDescriptor; 77 } 78 79 } 80 | Popular Tags |