Class AddToGroupOperation

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

    public class AddToGroupOperation
    extends AbstractDiagramEntitiesOperation
    Instance of this class represents "Add to group" operation.
    • Constructor Detail

      • AddToGroupOperation

        public AddToGroupOperation​(Collection<IErdEntity> entities,
                                   ErdEntityGroup group,
                                   IErdDiagramController controller,
                                   DiagramTabItem tab,
                                   boolean isExecuted)
        Constructor
        Parameters:
        entities - - entities to add to group. Can't be null.
        group - - group to add entities to. Can't be null.
        controller - - controller which contains given group. Can't be null.
        tab - - tab which contains given group. Can't be null.
        isExecuted - - true if operation already executed.
    • Method Detail

      • canExecute

        public boolean canExecute()
      • canRedo

        public boolean canRedo()
      • canUndo

        public boolean canUndo()
      • 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
        Throws:
        org.eclipse.core.commands.ExecutionException
      • getLabel

        public String getLabel()
      • 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
        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
        Throws:
        org.eclipse.core.commands.ExecutionException