]> git.argeo.org Git - gpl/argeo-slc.git/blob - eclipse/plugins/org.argeo.slc.client.rcp/src/main/java/org/argeo/slc/client/rcp/ClientRcpPlugin.java
d59018d3e8ca83e85f27c8c1cc254d356a6c3212
[gpl/argeo-slc.git] / eclipse / plugins / org.argeo.slc.client.rcp / src / main / java / org / argeo / slc / client / rcp / ClientRcpPlugin.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 ClientRcpPlugin extends AbstractUIPlugin {
12 public static final String PLUGIN_ID = "org.argeo.slc.client.rcp";
13 private static ClientRcpPlugin 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 ClientRcpPlugin 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 }