01: /*
02: * Copyright 2006 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
07: * BI Platform. The Initial Developer is Pentaho Corporation.
08: *
09: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11: * the license for the specific language governing your rights and limitations.
12: */
13: package org.pentaho.designstudio.editors.actionsequence;
14:
15: import org.eclipse.jface.resource.ImageDescriptor;
16: import org.eclipse.ui.plugin.AbstractUIPlugin;
17: import org.osgi.framework.BundleContext;
18:
19: /**
20: * The main plugin class to be used in the desktop.
21: */
22: public class ActionSequenceEditorPlugin extends AbstractUIPlugin {
23:
24: //The shared instance.
25: private static ActionSequenceEditorPlugin plugin;
26:
27: /**
28: * The constructor.
29: */
30: public ActionSequenceEditorPlugin() {
31: plugin = this ;
32: }
33:
34: /**
35: * This method is called upon plug-in activation
36: */
37: public void start(BundleContext context) throws Exception {
38: super .start(context);
39: }
40:
41: /**
42: * This method is called when the plug-in is stopped
43: */
44: public void stop(BundleContext context) throws Exception {
45: super .stop(context);
46: plugin = null;
47: }
48:
49: /**
50: * Returns the shared instance.
51: */
52: public static ActionSequenceEditorPlugin getDefault() {
53: return plugin;
54: }
55:
56: /**
57: * Returns an image descriptor for the image file at the given
58: * plug-in relative path.
59: *
60: * @param path the path
61: * @return the image descriptor
62: */
63: public static ImageDescriptor getImageDescriptor(String path) {
64: return AbstractUIPlugin
65: .imageDescriptorFromPlugin(
66: "org.pentaho.designstudio.editors.actionsequence", path); //$NON-NLS-1$
67: }
68: }
|