Package com._1c.g5.v8.dt.erd.ui.handlers
Class BuildDiagramHandler
- 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.BuildDiagramHandler
-
- All Implemented Interfaces:
org.eclipse.core.commands.IHandler
,org.eclipse.core.commands.IHandler2
public class BuildDiagramHandler extends AbstractDiagramHandler
Handler for "Build Diagram" button. Builds new diagram from selected items.
-
-
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 BuildDiagramHandler()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBuildListener(IBuildDiagramListener listener)
Adds build listener.void
build(Collection<IErdEntity> entities, DiagramTabItem parentDiagram, DiagramTabItem tabToBuildIn)
Builds diagram in active tab from given objects.void
build(Collection<MdObject> mdObjects, ErdEditor editor)
Builds givenmbObjects
in active tab.void
buildSync(Collection<IErdEntity> entities, DiagramTabItem parentDiagram, DiagramTabItem tabToBuildIn, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Builds diagram in active tab from given objects.IBmModelManager
getBmModelManager()
Returns bm model manager.DiagramConfigurationExtractor
getDiagramConfigurationExtractor()
Returns diaram configuration extractor.IV8ProjectManager
getProjectManager()
Returns project manager.IResourceLookup
getResourceLookup()
Returns resource lookup.protected void
processMdObjects(Collection<MdObject> mdObjects, ErdEditor editor)
Processes given md objects.void
refreshDiagram(DiagramTabItem tab, ErdOperationManager operationManager)
Refreshes given tab.void
refreshRelations(DiagramTabItem tab)
Refreshes relations on given tab.void
removeBuildListener(IBuildDiagramListener listener)
Removes build listener.-
Methods inherited from class com._1c.g5.v8.dt.erd.ui.handlers.AbstractDiagramHandler
askForNewTab, 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
-
getDiagramConfigurationExtractor
public DiagramConfigurationExtractor getDiagramConfigurationExtractor()
Returns diaram configuration extractor.- Returns:
- diaram configuration extractor. Can't return
null
.
-
getResourceLookup
public IResourceLookup getResourceLookup()
Returns resource lookup.- Returns:
- resource lookup. Can't return
null
.
-
getProjectManager
public IV8ProjectManager getProjectManager()
Returns project manager.- Returns:
- project manager. Can't return
null
.
-
getBmModelManager
public IBmModelManager getBmModelManager()
Returns bm model manager.- Returns:
- bm model manager. Can't return
null
.
-
refreshDiagram
public void refreshDiagram(DiagramTabItem tab, ErdOperationManager operationManager)
Refreshes given tab.- Parameters:
tab
- - tab to refresh. Can't benull
.operationManager
- - operation manager to execute operations. Can't benull
.
-
refreshRelations
public void refreshRelations(DiagramTabItem tab)
Refreshes relations on given tab.- Parameters:
tab
- - tab to refresh. Can't benull
.
-
build
public void build(Collection<MdObject> mdObjects, ErdEditor editor)
Builds givenmbObjects
in active tab.- Parameters:
mdObjects
- - objects to build. Can't benull
.editor
- - context editor. Can't benull
.
-
build
public void build(Collection<IErdEntity> entities, DiagramTabItem parentDiagram, DiagramTabItem tabToBuildIn)
Builds diagram in active tab from given objects.- Parameters:
entities
- - objects which will be on diagram. Can't benull
.parentDiagram
- - tab to take project name. Can benull
.tabToBuildIn
- - tab to build new diagram. Can't benull
.
-
buildSync
public void buildSync(Collection<IErdEntity> entities, DiagramTabItem parentDiagram, DiagramTabItem tabToBuildIn, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Builds diagram in active tab from given objects.
Mehtod returns when diagram builded.- Parameters:
entities
- - objects which will be on diagram. Can't benull
.parentDiagram
- - tab to take project name. Can benull
.tabToBuildIn
- - tab to build new diagram. Can't benull
.progressMonitor
- - progress monitor to report progress. Can benull
.
-
addBuildListener
public void addBuildListener(IBuildDiagramListener listener)
Adds build listener.- Parameters:
listener
- - build listener. Can't benull
.
-
removeBuildListener
public void removeBuildListener(IBuildDiagramListener listener)
Removes build listener.- Parameters:
listener
- - build listener. 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
.
-
-