Class CompositeOperation

  • All Implemented Interfaces:
    org.eclipse.core.commands.operations.IUndoableOperation

    public class CompositeOperation
    extends BaseOperation
    Composite operation
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addOperation​(org.eclipse.core.commands.operations.IUndoableOperation operation)
      Add operation for execution.
      org.eclipse.core.runtime.IStatus execute​(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info)  
      org.eclipse.core.runtime.IStatus redo​(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info)  
      org.eclipse.core.runtime.IStatus undo​(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info)  
      • Methods inherited from class org.eclipse.core.commands.operations.AbstractOperation

        addContext, canExecute, canRedo, canUndo, dispose, getContexts, getLabel, hasContext, removeContext, setLabel, toString
    • Constructor Detail

      • CompositeOperation

        public CompositeOperation​(String label,
                                  org.eclipse.core.commands.operations.IUndoContext undoContext,
                                  SheetAccessor sheet)
        Creates new instance of CompositeOperation. In case of using this constructor, selection will not be swapped while performing undo/redo.
        Parameters:
        label - operation label, must not be null
        undoContext - undo context, may be null
        sheet - SheetAccessor, must not be null
      • CompositeOperation

        public CompositeOperation​(String label,
                                  org.eclipse.core.commands.operations.IUndoContext undoContext,
                                  SheetAccessor sheet,
                                  MoxelControl control)
        Creates new instance of CompositeOperation. In case of using this constructor, selection will be swapped while performing undo/redo.
        Parameters:
        label - operation label, must not be null
        undoContext - undo context, may be null
        sheet - SheetAccessor, must not be null
        control - MoxelControl, may be null. In case of non-null value selection will be swapped while performing undo/redo
    • Method Detail

      • addOperation

        public void addOperation​(org.eclipse.core.commands.operations.IUndoableOperation operation)
        Add operation for execution.
        Parameters:
        operation - operation to be added
      • execute

        public org.eclipse.core.runtime.IStatus execute​(org.eclipse.core.runtime.IProgressMonitor monitor,
                                                        org.eclipse.core.runtime.IAdaptable info)
                                                 throws org.eclipse.core.commands.ExecutionException
        Specified by:
        execute in interface org.eclipse.core.commands.operations.IUndoableOperation
        Specified by:
        execute in class org.eclipse.core.commands.operations.AbstractOperation
        Throws:
        org.eclipse.core.commands.ExecutionException
      • redo

        public org.eclipse.core.runtime.IStatus redo​(org.eclipse.core.runtime.IProgressMonitor monitor,
                                                     org.eclipse.core.runtime.IAdaptable info)
                                              throws org.eclipse.core.commands.ExecutionException
        Specified by:
        redo in interface org.eclipse.core.commands.operations.IUndoableOperation
        Specified by:
        redo in class org.eclipse.core.commands.operations.AbstractOperation
        Throws:
        org.eclipse.core.commands.ExecutionException
      • undo

        public org.eclipse.core.runtime.IStatus undo​(org.eclipse.core.runtime.IProgressMonitor monitor,
                                                     org.eclipse.core.runtime.IAdaptable info)
                                              throws org.eclipse.core.commands.ExecutionException
        Specified by:
        undo in interface org.eclipse.core.commands.operations.IUndoableOperation
        Specified by:
        undo in class org.eclipse.core.commands.operations.AbstractOperation
        Throws:
        org.eclipse.core.commands.ExecutionException