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 void
execute(ErdEditor editor)
Executes drop action.Object
execute(org.eclipse.core.commands.ExecutionEvent event)
protected void
processMdObjects(Collection<MdObject> mdObjects, ErdEditor editor)
Processes given md objects.void
setDropEvent(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:IDropEntitiesHandler
Sets drop event.- Specified by:
setDropEvent
in interfaceIDropEntitiesHandler
- Parameters:
dropEvent
- the dropEvent to set. Can't benull
.
-
execute
public void execute(ErdEditor editor)
Description copied from interface:IDropEntitiesHandler
Executes drop action.- Specified by:
execute
in 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:
execute
in interfaceorg.eclipse.core.commands.IHandler
- Overrides:
execute
in classAbstractDiagramHandler
- Throws:
org.eclipse.core.commands.ExecutionException
-
processMdObjects
protected void processMdObjects(Collection<MdObject> mdObjects, ErdEditor editor)
Description copied from class:AbstractDiagramHandler
Processes given md objects. Realization varies.- Specified by:
processMdObjects
in classAbstractDiagramHandler
- Parameters:
mdObjects
- - objects to process. Can't benull
.editor
- - context editor. Can't benull
.
-
-