Package org.eclipse.epsilon.eunit.dt
Class EUnitPlugin
- java.lang.Object
-
- org.eclipse.core.runtime.Plugin
-
- org.eclipse.ui.plugin.AbstractUIPlugin
-
- org.eclipse.epsilon.eunit.dt.EUnitPlugin
-
- All Implemented Interfaces:
org.eclipse.debug.core.ILaunchesListener
,EpsilonPlugin
,org.osgi.framework.BundleActivator
public class EUnitPlugin extends org.eclipse.ui.plugin.AbstractUIPlugin implements EpsilonPlugin, org.eclipse.debug.core.ILaunchesListener
The activator class controls the plug-in life cycle.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PLUGIN_ID
-
Constructor Summary
Constructors Constructor Description EUnitPlugin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.graphics.Image
createImage(java.lang.String path)
static EUnitPlugin
getDefault()
Returns the shared instanceEUnitHistory
getHistory()
Returns the history of all EUnit launches since Eclipse was started.org.eclipse.swt.graphics.Image
getIconImage(java.lang.String iconPath)
Produces an Image object from its path inside the plugin.static org.eclipse.jface.resource.ImageDescriptor
getImageDescriptor(java.lang.String path)
Returns an image descriptor for the image file at the given plug-in relative pathorg.eclipse.debug.core.ILaunch
getLastLaunch()
Returns the last Ant launch that has been performed, ornull
if none has been performed yet.EUnitRunnerView
getLastView()
Obtains the reference to the last EUnit view opened by the user.java.util.List
getSelectedOperations(org.eclipse.debug.core.ILaunch launch)
Returns the list of the operations to be run in a launch.void
launchesAdded(org.eclipse.debug.core.ILaunch[] launches)
void
launchesChanged(org.eclipse.debug.core.ILaunch[] launches)
void
launchesRemoved(org.eclipse.debug.core.ILaunch[] launches)
void
logException(java.lang.Exception e)
Logs an exception as an error in the Error Log view.void
setLastView(EUnitRunnerView lastView)
Updates the reference to the last view opened by the user.void
setSelectedOperations(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy launchConfig, java.util.List selOps)
Sets the list of operations to be run in the launch with configurationlaunchConfig
.void
start(org.osgi.framework.BundleContext context)
void
stop(org.osgi.framework.BundleContext context)
-
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeDefaultPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, startup
-
-
-
-
Field Detail
-
PLUGIN_ID
public static final java.lang.String PLUGIN_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
start
public void start(org.osgi.framework.BundleContext context) throws java.lang.Exception
- Specified by:
start
in interfaceorg.osgi.framework.BundleActivator
- Overrides:
start
in classorg.eclipse.ui.plugin.AbstractUIPlugin
- Throws:
java.lang.Exception
-
stop
public void stop(org.osgi.framework.BundleContext context) throws java.lang.Exception
- Specified by:
stop
in interfaceorg.osgi.framework.BundleActivator
- Overrides:
stop
in classorg.eclipse.ui.plugin.AbstractUIPlugin
- Throws:
java.lang.Exception
-
getDefault
public static EUnitPlugin getDefault()
Returns the shared instance- Returns:
- the shared instance
-
getImageDescriptor
public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String path)
Returns an image descriptor for the image file at the given plug-in relative path- Parameters:
path
- the path- Returns:
- the image descriptor
-
createImage
public org.eclipse.swt.graphics.Image createImage(java.lang.String path)
- Specified by:
createImage
in interfaceEpsilonPlugin
-
getIconImage
public org.eclipse.swt.graphics.Image getIconImage(java.lang.String iconPath)
Produces an Image object from its path inside the plugin.
-
logException
public void logException(java.lang.Exception e)
Logs an exception as an error in the Error Log view.- Parameters:
e
- Exception to be logged.
-
getLastLaunch
public org.eclipse.debug.core.ILaunch getLastLaunch()
Returns the last Ant launch that has been performed, ornull
if none has been performed yet.
-
launchesRemoved
public void launchesRemoved(org.eclipse.debug.core.ILaunch[] launches)
- Specified by:
launchesRemoved
in interfaceorg.eclipse.debug.core.ILaunchesListener
-
launchesAdded
public void launchesAdded(org.eclipse.debug.core.ILaunch[] launches)
- Specified by:
launchesAdded
in interfaceorg.eclipse.debug.core.ILaunchesListener
-
launchesChanged
public void launchesChanged(org.eclipse.debug.core.ILaunch[] launches)
- Specified by:
launchesChanged
in interfaceorg.eclipse.debug.core.ILaunchesListener
-
getHistory
public EUnitHistory getHistory()
Returns the history of all EUnit launches since Eclipse was started.
-
getSelectedOperations
public java.util.List getSelectedOperations(org.eclipse.debug.core.ILaunch launch)
Returns the list of the operations to be run in a launch.
-
setSelectedOperations
public void setSelectedOperations(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy launchConfig, java.util.List selOps)
Sets the list of operations to be run in the launch with configurationlaunchConfig
.
-
setLastView
public void setLastView(EUnitRunnerView lastView)
Updates the reference to the last view opened by the user. By default, it is anull
reference. This method should only be called by the constructor of theEUnitRunnerView
class.
-
getLastView
public EUnitRunnerView getLastView()
Obtains the reference to the last EUnit view opened by the user. If the EUnit view has not been opened yet since Eclipse was started, returnsnull
.
-
-