Class DropEntitiesOperation
- java.lang.Object
-
- com._1c.g5.v8.dt.diagram.framework.ui.operations.AbstractDiagramOperation
-
- com._1c.g5.v8.dt.erd.ui.editors.operations.AbstractDiagramEntitiesOperation
-
- com._1c.g5.v8.dt.erd.ui.editors.operations.DropEntitiesOperation
-
- All Implemented Interfaces:
org.eclipse.core.commands.operations.IUndoableOperation
public class DropEntitiesOperation extends AbstractDiagramEntitiesOperation
Instance of this class represents "Drop entities" operation.
-
-
Constructor Summary
Constructors Constructor Description DropEntitiesOperation(Collection<IErdEntity> entities, com._1c.g5.v8.dt.diagram.framework.model.Point dropLocation, IErdDiagramController controller, DiagramTabItem tab, boolean isExecuted)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addEntities(IErdDiagramController controller, Collection<? extends IErdEntity> entities, DiagramTabItem tab, boolean refresh)
Adds given entities to given controller and refreshes given tab ifneedRefresh
istrue
.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.erd.ui.editors.operations.AbstractDiagramEntitiesOperation
refreshRelations, removeEntities, savePositions, setPositions
-
-
-
-
Constructor Detail
-
DropEntitiesOperation
public DropEntitiesOperation(Collection<IErdEntity> entities, com._1c.g5.v8.dt.diagram.framework.model.Point dropLocation, IErdDiagramController controller, DiagramTabItem tab, boolean isExecuted)
Constructor- Parameters:
entities
- - dropped entities. Can't benull
.dropLocation
- - drop location. Can't benull
.controller
- - controller to add entities to. Can't benull
.tab
- - tab to add entities to. Can't benull
.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
-
addEntities
protected void addEntities(IErdDiagramController controller, Collection<? extends IErdEntity> entities, DiagramTabItem tab, boolean refresh)
Description copied from class:AbstractDiagramEntitiesOperation
Adds given entities to given controller and refreshes given tab ifneedRefresh
istrue
.- Overrides:
addEntities
in classAbstractDiagramEntitiesOperation
- Parameters:
controller
- - controller. Can't benull
entities
- - entities to add. Can't benull
.tab
- - tab where entities will be added. Can't benull
.refresh
- -true
if tab should be refreshed.
-
-