| package org.eclipse.epf.export.msp; |
| |
| import java.util.Date; |
| |
| import org.osgi.framework.BundleContext; |
| |
| import org.eclipse.epf.common.plugin.AbstractPlugin; |
| |
| /** |
| * The main plugin class to be used in the desktop. |
| * |
| * @author Bing Xu |
| * @since 1.0 |
| */ |
| public class MspPlugin extends AbstractPlugin { |
| |
| //The shared instance. |
| private static MspPlugin plugin; |
| |
| // The date and time when this plug-in was started. |
| private Date startTime; |
| |
| /** |
| * The constructor. |
| */ |
| public MspPlugin() { |
| super(); |
| plugin = this; |
| } |
| |
| /** |
| * This method is called upon plug-in activation |
| */ |
| public void start(BundleContext context) throws Exception { |
| super.start(context); |
| startTime = new Date(); |
| } |
| |
| /** |
| * This method is called when the plug-in is stopped |
| */ |
| public void stop(BundleContext context) throws Exception { |
| super.stop(context); |
| plugin = null; |
| } |
| |
| /** |
| * Returns the shared instance. |
| */ |
| public static MspPlugin getDefault() { |
| return plugin; |
| } |
| |
| /** |
| * Returns the date and time when this plug-in was started. |
| */ |
| public Date getStartTime() { |
| return startTime; |
| } |
| } |