]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.client.rcp/src/org/argeo/slc/client/rcp/SlcRcpPlugin.java
Remove old license headers
[gpl/argeo-slc.git] / org.argeo.slc.client.rcp / src / org / argeo / slc / client / rcp / SlcRcpPlugin.java
1 package org.argeo.slc.client.rcp;
2
3 import org.eclipse.jface.resource.ImageDescriptor;
4 import org.eclipse.jface.resource.ImageRegistry;
5 import org.eclipse.ui.plugin.AbstractUIPlugin;
6 import org.osgi.framework.BundleContext;
7
8 /**
9 * The activator class controls the plug-in life cycle
10 */
11 public class SlcRcpPlugin extends AbstractUIPlugin {
12 public static final String PLUGIN_ID = "org.argeo.slc.client.rcp";
13 private static SlcRcpPlugin plugin;
14
15 public void start(BundleContext context) throws Exception {
16 super.start(context);
17 plugin = this;
18 }
19
20 public void stop(BundleContext context) throws Exception {
21 plugin = null;
22 super.stop(context);
23 }
24
25 public static SlcRcpPlugin getDefault() {
26 return plugin;
27 }
28
29 @Override
30 protected void initializeImageRegistry(ImageRegistry reg) {
31 // TODO make it configurable
32 reg.put("argeoTrayIcon",
33 getImageDescriptor("icons/argeo-trayIcon-256.png"));
34 }
35
36 public static ImageDescriptor getImageDescriptor(String path) {
37 return imageDescriptorFromPlugin(PLUGIN_ID, path);
38 }
39 }