Package com._1c.g5.v8.dt.erd.ui.handlers
Class FindOnDiagramHandler
- 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.FindOnDiagramHandler
-
- All Implemented Interfaces:
org.eclipse.core.commands.IHandler
,org.eclipse.core.commands.IHandler2
public class FindOnDiagramHandler extends AbstractDiagramHandler
Handler for "Find on diagram" button.
-
-
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 FindOnDiagramHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
askForNewTab(ErdEditor editor)
Asks user if new tab should be opened.void
find(DiagramTabItem tab, MdObject mdObject, boolean showNotFoundMessage)
Finds given mdObject on diagram.protected void
processMdObjects(Collection<MdObject> mdObjects, ErdEditor editor)
Processes given md objects.void
show(DiagramTabItem tab, MdObject mdObject)
Moves viewport's view location to given associated with given mdObject entity location.-
Methods inherited from class com._1c.g5.v8.dt.erd.ui.handlers.AbstractDiagramHandler
convertToMdObjects, execute, 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
-
show
public void show(DiagramTabItem tab, MdObject mdObject)
Moves viewport's view location to given associated with given mdObject entity location.- Parameters:
tab
- - tab to search in. Can't benull
.mdObject
- - mdObject to show. Can't benull
.
-
find
public void find(DiagramTabItem tab, MdObject mdObject, boolean showNotFoundMessage)
Finds given mdObject on diagram. Select's only given mdObject. Clears other selection. If given mdObject can't be found on diagram, shows error message.- Parameters:
tab
- - tab to search in. Can't benull
.mdObject
- - mdObject to find, can't benull
.showNotFoundMessage
- -true
if not found message should be shown.
-
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
.
-
askForNewTab
protected void askForNewTab(ErdEditor editor)
Description copied from class:AbstractDiagramHandler
Asks user if new tab should be opened. If user accepts opens new tab.- Overrides:
askForNewTab
in classAbstractDiagramHandler
- Parameters:
editor
- - editor to get tabs. Can't benull
.
-
-