Package com._1c.g5.v8.dt.erd.ui.handlers
Class DropEntitiesHandler
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.core.commands.AbstractHandler
-
- com._1c.g5.v8.dt.erd.ui.handlers.AbstractDiagramHandler
-
- com._1c.g5.v8.dt.erd.ui.handlers.DropEntitiesHandler
-
- All Implemented Interfaces:
IDropEntitiesHandler,org.eclipse.core.commands.IHandler,org.eclipse.core.commands.IHandler2
public class DropEntitiesHandler extends AbstractDiagramHandler implements IDropEntitiesHandler
Handler for drop entities action. Adds dropped entities to diagram. If all entities already on diagram, finds and selects first entity in list.
How to use- set drop event via
setDropEvent(DropTargetEvent) - execute via
execute(ErdEditor)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.erd.ui.handlers.AbstractDiagramHandler
AbstractDiagramHandler.DiagramBuilder, AbstractDiagramHandler.DiagramRefresher, AbstractDiagramHandler.NotUndoableEvent
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.erd.ui.handlers.AbstractDiagramHandler
bmModelManager, convertersService, extractor, projectManager, resourceLookup
-
-
Constructor Summary
Constructors Constructor Description DropEntitiesHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(ErdEditor editor)Executes drop action.Objectexecute(org.eclipse.core.commands.ExecutionEvent event)protected voidprocessMdObjects(Collection<MdObject> mdObjects, ErdEditor editor)Processes given md objects.voidsetDropEvent(org.eclipse.swt.dnd.DropTargetEvent dropEvent)Sets drop event.-
Methods inherited from class com._1c.g5.v8.dt.erd.ui.handlers.AbstractDiagramHandler
askForNewTab, convertToMdObjects, fillLiterals, getConfigurationObjects, getConfigurationSubsystems, getController, isProjectSelected, lookForMdObjects, showNoSelectedObjectsMessage
-
Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
-
-
-
-
Method Detail
-
setDropEvent
public void setDropEvent(org.eclipse.swt.dnd.DropTargetEvent dropEvent)
Description copied from interface:IDropEntitiesHandlerSets drop event.- Specified by:
setDropEventin interfaceIDropEntitiesHandler- Parameters:
dropEvent- the dropEvent to set. Can't benull.
-
execute
public void execute(ErdEditor editor)
Description copied from interface:IDropEntitiesHandlerExecutes drop action.- Specified by:
executein interfaceIDropEntitiesHandler- Parameters:
editor- - editor to execute action. Can't benull.
-
execute
public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException
- Specified by:
executein interfaceorg.eclipse.core.commands.IHandler- Overrides:
executein classAbstractDiagramHandler- Throws:
org.eclipse.core.commands.ExecutionException
-
processMdObjects
protected void processMdObjects(Collection<MdObject> mdObjects, ErdEditor editor)
Description copied from class:AbstractDiagramHandlerProcesses given md objects. Realization varies.- Specified by:
processMdObjectsin classAbstractDiagramHandler- Parameters:
mdObjects- - objects to process. Can't benull.editor- - context editor. Can't benull.
-
-