org.bluecove.Ver2.1.1/src/org/bluecove/ver2_1_1/Activator.java
changeset 150 ad6de1d951ad
parent 149 265af99a2402
child 151 1b175992ea1c
equal deleted inserted replaced
149:265af99a2402 150:ad6de1d951ad
     1 package org.bluecove.ver2_1_1;
       
     2 
       
     3 import org.eclipse.core.runtime.Plugin;
       
     4 import org.osgi.framework.BundleContext;
       
     5 
       
     6 /**
       
     7  * The activator class controls the plug-in life cycle
       
     8  */
       
     9 public class Activator extends Plugin {
       
    10 
       
    11 	// The plug-in ID
       
    12 	public static final String PLUGIN_ID = "org.bluecove.v2_1_1";
       
    13 
       
    14 	// The shared instance
       
    15 	private static Activator plugin;
       
    16 	
       
    17 	/**
       
    18 	 * The constructor
       
    19 	 */
       
    20 	public Activator() {
       
    21 	}
       
    22 
       
    23 	/*
       
    24 	 * (non-Javadoc)
       
    25 	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
       
    26 	 */
       
    27 	public void start(BundleContext context) throws Exception {
       
    28 		super.start(context);
       
    29 		plugin = this;
       
    30 	}
       
    31 
       
    32 	/*
       
    33 	 * (non-Javadoc)
       
    34 	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
       
    35 	 */
       
    36 	public void stop(BundleContext context) throws Exception {
       
    37 		plugin = null;
       
    38 		super.stop(context);
       
    39 	}
       
    40 
       
    41 	/**
       
    42 	 * Returns the shared instance
       
    43 	 *
       
    44 	 * @return the shared instance
       
    45 	 */
       
    46 	public static Activator getDefault() {
       
    47 		return plugin;
       
    48 	}
       
    49 
       
    50 }