Class AbstractWorkspaceHandler

  • All Implemented Interfaces:
    org.eclipse.core.commands.IHandler, org.eclipse.core.commands.IHandler2
    Direct Known Subclasses:
    CheckinHandler, UpdateHandler

    public abstract class AbstractWorkspaceHandler
    extends org.eclipse.core.commands.AbstractHandler
    Abstract Handler for executing commands.
    Author:
    Eike Stepper
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractWorkspaceHandler​(java.lang.String jobName)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object execute​(org.eclipse.core.commands.ExecutionEvent event)
      protected abstract void execute​(org.eclipse.core.commands.ExecutionEvent event, org.eclipse.emf.cdo.workspace.CDOWorkspace workspace, org.eclipse.core.runtime.IProgressMonitor monitor)
      Execute the given event.
      java.lang.String getJobName()
      Get the display name of the current job.
      protected static void refreshDirtyState​(org.eclipse.core.commands.ExecutionEvent event)
      Refresh the dirty state of the CDOWorkspace.
      • Methods inherited from class org.eclipse.core.commands.AbstractHandler

        addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
      • Methods inherited from class org.eclipse.core.commands.common.EventManager

        addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
      • Methods inherited from class java.lang.Object

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

      • AbstractWorkspaceHandler

        public AbstractWorkspaceHandler​(java.lang.String jobName)
        Constructor.
        Parameters:
        jobName - display job name
    • Method Detail

      • getJobName

        public final java.lang.String getJobName()
        Get the display name of the current job.
        Returns:
        the name
      • execute

        public final java.lang.Object execute​(org.eclipse.core.commands.ExecutionEvent event)
                                       throws org.eclipse.core.commands.ExecutionException
        Throws:
        org.eclipse.core.commands.ExecutionException
        See Also:
        IHandler.execute(org.eclipse.core.commands.ExecutionEvent)
      • execute

        protected abstract void execute​(org.eclipse.core.commands.ExecutionEvent event,
                                        org.eclipse.emf.cdo.workspace.CDOWorkspace workspace,
                                        org.eclipse.core.runtime.IProgressMonitor monitor)
                                 throws org.eclipse.core.commands.ExecutionException
        Execute the given event.
        Parameters:
        event - the event
        workspace - the CDOWorkspace
        monitor - a progress monitor
        Throws:
        org.eclipse.core.commands.ExecutionException - if execution fails
      • refreshDirtyState

        protected static void refreshDirtyState​(org.eclipse.core.commands.ExecutionEvent event)
                                         throws org.eclipse.core.commands.ExecutionException
        Refresh the dirty state of the CDOWorkspace.
        Parameters:
        event - the event
        Throws:
        org.eclipse.core.commands.ExecutionException - if refresh fails