| 1 | package de.uka.ipd.sdq.sensorframework.dialogs; |
| 2 | import org.eclipse.core.runtime.Status; |
| 3 | import org.eclipse.ui.plugin.AbstractUIPlugin; |
| 4 | import org.osgi.framework.BundleContext; |
| 5 | |
| 6 | |
| 7 | public class SensorFrameworkDialogPlugin extends AbstractUIPlugin { |
| 8 | |
| 9 | private static SensorFrameworkDialogPlugin plugin = null; |
| 10 | |
| 11 | // The plug-in ID |
| 12 | public static final String PLUGIN_ID = "de.uka.ipd.sdq.sensorframework.dialogs"; |
| 13 | |
| 14 | public SensorFrameworkDialogPlugin() { |
| 15 | // TODO Auto-generated constructor stub |
| 16 | } |
| 17 | |
| 18 | /* (non-Javadoc) |
| 19 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) |
| 20 | */ |
| 21 | public void start(BundleContext context) throws Exception { |
| 22 | super.start(context); |
| 23 | plugin = this; |
| 24 | } |
| 25 | |
| 26 | /* (non-Javadoc) |
| 27 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) |
| 28 | */ |
| 29 | public void stop(BundleContext context) throws Exception { |
| 30 | plugin = null; |
| 31 | super.stop(context); |
| 32 | } |
| 33 | |
| 34 | public static void log(int severity, String message) { |
| 35 | plugin.getLog().log(new Status(severity,PLUGIN_ID,message)); |
| 36 | } |
| 37 | |
| 38 | } |