1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 /***
19 * <p>Title: WSMO Studio</p>
20 * <p>Description: Semantic Web Service Editor</p>
21 * <p>Copyright: Copyright (c) 2004-2007</p>
22 * <p>Company: Ontotext Lab. / SIRMA </p>
23 */
24
25 package org.semanticgov.ui;
26
27 import org.eclipse.jface.resource.ImageDescriptor;
28 import org.eclipse.swt.graphics.Image;
29 import org.eclipse.ui.plugin.AbstractUIPlugin;
30 import org.osgi.framework.BundleContext;
31
32 /***
33 * The activator class controls the plug-in life cycle
34 */
35 public class Activator extends AbstractUIPlugin {
36
37
38 public static final String PLUGIN_ID = "org.semanticgov.ui";
39
40
41 private static Activator plugin;
42 private static ImageDescriptor logo;
43 private static Image wsdlIcon, clearIcon, repoIcon, reloadIcon, propsIcon;
44
45 /***
46 * The constructor
47 */
48 public Activator() {
49 plugin = this;
50 logo = imageDescriptorFromPlugin(PLUGIN_ID, "img/logo.gif");
51 ImageDescriptor wsdlIDescr = imageDescriptorFromPlugin(PLUGIN_ID, "icons/wsdl16.gif");
52 if (wsdlIDescr != null) {
53 wsdlIcon = wsdlIDescr.createImage();
54 }
55 wsdlIDescr = imageDescriptorFromPlugin(PLUGIN_ID, "icons/clear.png");
56 if (wsdlIDescr != null) {
57 clearIcon = wsdlIDescr.createImage();
58 }
59 wsdlIDescr = imageDescriptorFromPlugin(PLUGIN_ID, "icons/rep.gif");
60 if (wsdlIDescr != null) {
61 repoIcon = wsdlIDescr.createImage();
62 }
63 wsdlIDescr = imageDescriptorFromPlugin(PLUGIN_ID, "icons/reload.png");
64 if (wsdlIDescr != null) {
65 reloadIcon = wsdlIDescr.createImage();
66 }
67 wsdlIDescr = imageDescriptorFromPlugin(PLUGIN_ID, "icons/properties.gif");
68 if (wsdlIDescr != null) {
69 propsIcon = wsdlIDescr.createImage();
70 }
71 }
72
73
74
75
76
77 public void start(BundleContext context) throws Exception {
78 super.start(context);
79 }
80
81
82
83
84
85 public void stop(BundleContext context) throws Exception {
86 plugin = null;
87 super.stop(context);
88 }
89
90 /***
91 * Returns the shared instance
92 *
93 * @return the shared instance
94 */
95 public static Activator getDefault() {
96 return plugin;
97 }
98
99 public static ImageDescriptor getSGLogo() {
100 return logo;
101 }
102
103 public static Image getWSDLLogo() {
104 return wsdlIcon;
105 }
106
107 public static Image getClearIcon() {
108 return clearIcon;
109 }
110 public static Image getRepositoryIcon() {
111 return repoIcon;
112 }
113 public static Image getReloadIcon() {
114 return reloadIcon;
115 }
116 public static Image getPropertiesIcon() {
117 return propsIcon;
118 }
119
120 }
121
122
123
124
125
126
127