Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/prov/ui/internal/sdk/ProvSDKUIActivator.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/prov/ui/internal/sdk/ProvSDKUIActivator.java71
1 files changed, 71 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/prov/ui/internal/sdk/ProvSDKUIActivator.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/prov/ui/internal/sdk/ProvSDKUIActivator.java
new file mode 100644
index 000000000..13bd46d9d
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/prov/ui/internal/sdk/ProvSDKUIActivator.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.prov.ui.internal.sdk;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Activator class for the admin UI.
+ */
+public class ProvSDKUIActivator extends AbstractUIPlugin {
+
+ private static ProvSDKUIActivator plugin;
+ private static BundleContext context;
+
+ public static final String PLUGIN_ID = "org.eclipse.equinox.prov.ui.sdk"; //$NON-NLS-1$
+
+ public static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * Returns the singleton plugin instance
+ *
+ * @return the instance
+ */
+ public static ProvSDKUIActivator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given plug-in
+ * relative path
+ *
+ * @param path
+ * the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ public ProvSDKUIActivator() {
+ // constructor
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ super.start(bundleContext);
+ plugin = this;
+ ProvSDKUIActivator.context = bundleContext;
+ }
+
+ public void stop(BundleContext bundleContext) throws Exception {
+ plugin = null;
+ super.stop(bundleContext);
+ }
+}

Back to the top