Package com._1c.g5.v8.dt.erd.ui.handlers
Class BuildConnectedHandler
- 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.BuildConnectedHandler
-
- All Implemented Interfaces:
org.eclipse.core.commands.IHandler
,org.eclipse.core.commands.IHandler2
- Direct Known Subclasses:
BuildReferencedToHandler
,BuildReferensedFromHandler
public class BuildConnectedHandler extends AbstractDiagramHandler
Handler for "Build connected" button. Builds diagram with selected item and items connected with it.
-
-
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 BuildConnectedHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
askAndRelayout(ErdActionsManager actionsManager)
Asks user for applying relayout action.protected void
askForNewTab(ErdEditor editor)
Asks user if new tab should be opened.protected Collection<IErdEntity>
getConnectedEntities(Collection<IErdEntity> projectEntities, Collection<IErdEntity> selectedEntities, org.eclipse.core.runtime.SubMonitor subMonitor)
Returns entities connected to selected entities.protected Collection<IErdEntity>
getConnectedEntities(Collection<MdObject> mdObjects, IErdDiagramController controller, org.eclipse.core.runtime.SubMonitor subMonitor)
Returns entities connected to given md objects.protected String
getJobTitle()
Returns job title.void
processEntities(Collection<IErdEntity> entities, DiagramTabItem tab)
Build entities connected to given entities.protected void
processMdObjects(Collection<MdObject> mdObjects, ErdEditor editor)
Processes given md objects.protected void
showNoConnectedMessage()
Shows no connected entities message-
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
-
processEntities
public void processEntities(Collection<IErdEntity> entities, DiagramTabItem tab)
Build entities connected to given entities.- Parameters:
entities
- - entities. Can't benull
.tab
- - tab to process entities. Can't benull
.
-
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
.
-
getConnectedEntities
protected Collection<IErdEntity> getConnectedEntities(Collection<MdObject> mdObjects, IErdDiagramController controller, org.eclipse.core.runtime.SubMonitor subMonitor)
Returns entities connected to given md objects.- Parameters:
mdObjects
- - md objects. Can't benull
.controller
- - diagram controller. Can't benull
.subMonitor
- - monitor to report progress. Can benull
.- Returns:
- entities connected to given md objects. Can't return
null
.
-
getConnectedEntities
protected Collection<IErdEntity> getConnectedEntities(Collection<IErdEntity> projectEntities, Collection<IErdEntity> selectedEntities, org.eclipse.core.runtime.SubMonitor subMonitor)
Returns entities connected to selected entities.Entities may be connected in different ways. For example, entities that refers to selected or entities, that selected refers to.
- Parameters:
projectEntities
- - all entities from selected project. Can't benull
.selectedEntities
- - selcted entities. Can't benull
.subMonitor
- - monitor to report progress. Can't benull
.- Returns:
- entities connected to selected entities. Can't return
null
.
-
getJobTitle
protected String getJobTitle()
Returns job title.- Returns:
- job title. Can't be
null
.
-
showNoConnectedMessage
protected void showNoConnectedMessage()
Shows no connected entities message
-
askAndRelayout
protected void askAndRelayout(ErdActionsManager actionsManager)
Asks user for applying relayout action.- Parameters:
actionsManager
- - actiona manager to get actions. Can't benull
.
-
-