Class MoveCommentOperation

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

    public class MoveCommentOperation
    extends com._1c.g5.v8.dt.diagram.framework.ui.operations.AbstractDiagramOperation
    Instance of this class represents "Move Comment" operation.
    • Constructor Summary

      Constructors 
      Constructor Description
      MoveCommentOperation​(Collection<EntityCommentFigure> comments, org.eclipse.draw2d.geometry.Point startLocation, org.eclipse.draw2d.geometry.Point endLocation, boolean isExecuted)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canExecute()  
      boolean canRedo()  
      boolean canUndo()  
      org.eclipse.core.runtime.IStatus execute​(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info)  
      String getLabel()  
      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 com._1c.g5.v8.dt.diagram.framework.ui.operations.AbstractDiagramOperation

        addContext, dispose, getContexts, hasContext, removeContext
    • Constructor Detail

      • MoveCommentOperation

        public MoveCommentOperation​(Collection<EntityCommentFigure> comments,
                                    org.eclipse.draw2d.geometry.Point startLocation,
                                    org.eclipse.draw2d.geometry.Point endLocation,
                                    boolean isExecuted)
        Constructor.
        Parameters:
        comments - - moved comments. Can't be null.
        startLocation - - start location. Can't be null.
        endLocation - - end location. 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