1 package org.simantics.image.ui.internal;
\r
3 import org.eclipse.jface.resource.ImageDescriptor;
\r
4 import org.eclipse.ui.plugin.AbstractUIPlugin;
\r
5 import org.osgi.framework.Bundle;
\r
6 import org.osgi.framework.BundleContext;
\r
9 * The activator class controls the plug-in life cycle
\r
11 public class Activator extends AbstractUIPlugin {
\r
14 public static final String PLUGIN_ID = "org.simantics.image"; //$NON-NLS-1$
\r
16 // The shared instance
\r
17 private static Activator plugin;
\r
19 public static ImageDescriptor IMAGE_ICON;
\r
20 public static ImageDescriptor IMAGES_ICON;
\r
21 public static ImageDescriptor ADD_IMAGE_ICON;
\r
26 public Activator() {
\r
31 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
\r
33 public void start(BundleContext context) throws Exception {
\r
34 super.start(context);
\r
37 Bundle bundle = context.getBundle();
\r
39 IMAGE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/image.png"));
\r
40 IMAGES_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/images.png"));
\r
41 ADD_IMAGE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/add_image.png"));
\r
46 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
\r
48 public void stop(BundleContext context) throws Exception {
\r
50 super.stop(context);
\r
54 * Returns the shared instance
\r
56 * @return the shared instance
\r
58 public static Activator getDefault() {
\r