View Javadoc

1   /*
2    * This file is a part of CAST project.
3    * (c) Copyright 2007, AGH University of Science & Technology
4    * All rights reserved. Check the documentation for licensing terms.
5    * https://caribou.iisg.agh.edu.pl/trac/cast
6    */
7   package pl.edu.agh.cast.zestalgorithms;
8   
9   import org.eclipse.core.runtime.Plugin;
10  import org.osgi.framework.BundleContext;
11  
12  /**
13   * The activator class controls the plug-in life cycle
14   * 
15   * @author Paweł Koperek <pkoperek@gmail.com>
16   * @author Mateusz Kupisz <mkupisz@gmail.com>
17   */
18  public class Activator extends Plugin {
19  
20  	// The plug-in ID
21  	public static final String PLUGIN_ID = "pl.edu.agh.cast.zest"; //$NON-NLS-1$
22  
23  	// The shared instance
24  	private static Activator plugin;
25  
26  	/**
27  	 * The constructor
28  	 */
29  	public Activator() {
30  		plugin = this;
31  	}
32  
33  	/*
34  	 * (non-Javadoc)
35  	 * 
36  	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
37  	 */
38  	@Override
39  	public void start(BundleContext context) throws Exception {
40  		super.start(context);
41  	}
42  
43  	/*
44  	 * (non-Javadoc)
45  	 * 
46  	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
47  	 */
48  	@Override
49  	public void stop(BundleContext context) throws Exception {
50  		plugin = null;
51  		super.stop(context);
52  	}
53  
54  	/**
55  	 * Returns the shared instance
56  	 * 
57  	 * @return the shared instance
58  	 */
59  	public static Activator getDefault() {
60  		return plugin;
61  	}
62  
63  }