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
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
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
Executes drop action.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
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
Constructor Details
-
DropEntitiesHandler
public DropEntitiesHandler()
-
-
Method Details
-
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
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
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
.
-