Class 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  
      • Fields inherited from class org.eclipse.core.runtime.Plugin

        PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
    • 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 instance
      EUnitHistory 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 path
      org.eclipse.debug.core.ILaunch getLastLaunch()
      Returns the last Ant launch that has been performed, or null 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 configuration launchConfig.
      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
      • Methods inherited from class org.eclipse.core.runtime.Plugin

        find, find, getBundle, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • EUnitPlugin

        public EUnitPlugin()
    • Method Detail

      • start

        public void start​(org.osgi.framework.BundleContext context)
                   throws java.lang.Exception
        Specified by:
        start in interface org.osgi.framework.BundleActivator
        Overrides:
        start in class org.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 interface org.osgi.framework.BundleActivator
        Overrides:
        stop in class org.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 interface EpsilonPlugin
      • 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, or null if none has been performed yet.
      • launchesRemoved

        public void launchesRemoved​(org.eclipse.debug.core.ILaunch[] launches)
        Specified by:
        launchesRemoved in interface org.eclipse.debug.core.ILaunchesListener
      • launchesAdded

        public void launchesAdded​(org.eclipse.debug.core.ILaunch[] launches)
        Specified by:
        launchesAdded in interface org.eclipse.debug.core.ILaunchesListener
      • launchesChanged

        public void launchesChanged​(org.eclipse.debug.core.ILaunch[] launches)
        Specified by:
        launchesChanged in interface org.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 configuration launchConfig.
      • setLastView

        public void setLastView​(EUnitRunnerView lastView)
        Updates the reference to the last view opened by the user. By default, it is a null reference. This method should only be called by the constructor of the EUnitRunnerView 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, returns null.