Package com._1c.g5.v8.dt.erd.ui.handlers
Class AbstractDiagramHandler
- java.lang.Object
- 
- org.eclipse.core.commands.common.EventManager
- 
- org.eclipse.core.commands.AbstractHandler
- 
- com._1c.g5.v8.dt.erd.ui.handlers.AbstractDiagramHandler
 
 
 
- 
- All Implemented Interfaces:
- org.eclipse.core.commands.IHandler,- org.eclipse.core.commands.IHandler2
 - Direct Known Subclasses:
- AddEntitiesHandler,- AddToGroupHandler,- BuildConnectedHandler,- BuildDiagramHandler,- DeleteEntitiesHandler,- DropEntitiesHandler,- FindOnDiagramHandler,- GroupEntitiesHandler,- ShowConnectedHandler,- UngroupEntitiesHandler
 
 public abstract class AbstractDiagramHandler extends org.eclipse.core.commands.AbstractHandlerMain class for diagram handlers. Contains basic methods.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classAbstractDiagramHandler.DiagramBuilderInstance of this class builds new diagram.protected static classAbstractDiagramHandler.DiagramRefresherInstance of this class refreshes diagram on given tab.protected static classAbstractDiagramHandler.NotUndoableEventInstance of this class sendsNotUndoableOperationto given in constructor editor operation manager.
 - 
Field SummaryFields Modifier and Type Field Description protected IBmModelManagerbmModelManagerBm model manager.protected com._1c.g5.v8.dt.diagram.framework.core.IConvertersService<MdObject>convertersServiceConverters service that converts md objects.protected DiagramConfigurationExtractorextractorConfiguration extractor.protected IV8ProjectManagerprojectManagerV8 project manager.protected IResourceLookupresourceLookupResource lookup.
 - 
Constructor SummaryConstructors Constructor Description AbstractDiagramHandler()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaskForNewTab(ErdEditor editor)Asks user if new tab should be opened.protected Collection<MdObject>convertToMdObjects(Collection<? extends IErdEntity> entities)Converts given entities to mdObjects.Objectexecute(org.eclipse.core.commands.ExecutionEvent event)protected voidfillLiterals()Fills extractor literals.protected Collection<MdObject>getConfigurationObjects(Configuration configuration)Returns configuration subsystems if there any.protected Collection<MdObject>getConfigurationSubsystems(Configuration configuration)Returns subsystems from givenconfiguration.protected ErdDiagramControllergetController(DiagramTabItem tab, org.eclipse.core.runtime.IProgressMonitor progressMonitor)Returns diagram controller from given tab.protected booleanisProjectSelected(IStructuredSelection selection)Returnstrueif selection contains project.protected List<MdObject>lookForMdObjects(IStructuredSelection selection)Looks for MdObjects in given selection.protected abstract voidprocessMdObjects(Collection<MdObject> mdObjects, ErdEditor editor)Processes given md objects.protected voidshowNoSelectedObjectsMessage()Shows message about no MdObjects selected to user.- 
Methods inherited from class org.eclipse.core.commands.AbstractHandleraddHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
 
- 
 
- 
- 
- 
Field Detail- 
convertersService@Inject protected com._1c.g5.v8.dt.diagram.framework.core.IConvertersService<MdObject> convertersService Converters service that converts md objects. Notnull.
 - 
projectManager@Inject protected IV8ProjectManager projectManager V8 project manager. Notnull.
 - 
extractor@Inject protected DiagramConfigurationExtractor extractor Configuration extractor. Notnull.
 - 
resourceLookup@Inject protected IResourceLookup resourceLookup Resource lookup. Notnull.
 - 
bmModelManager@Inject protected IBmModelManager bmModelManager Bm model manager. Notnull.
 
- 
 - 
Method Detail- 
executepublic Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException - Throws:
- org.eclipse.core.commands.ExecutionException
 
 - 
processMdObjectsprotected abstract void processMdObjects(Collection<MdObject> mdObjects, ErdEditor editor) Processes given md objects. Realization varies.- Parameters:
- mdObjects- - objects to process. Can't be- null.
- editor- - context editor. Can't be- null.
 
 - 
showNoSelectedObjectsMessageprotected void showNoSelectedObjectsMessage() Shows message about no MdObjects selected to user.
 - 
isProjectSelectedprotected boolean isProjectSelected(IStructuredSelection selection) Returnstrueif selection contains project.- Parameters:
- selection- - selection. Can't be- null.
- Returns:
- trueif selection contains project.
 
 - 
askForNewTabprotected void askForNewTab(ErdEditor editor) Asks user if new tab should be opened. If user accepts opens new tab.- Parameters:
- editor- - editor to get tabs. Can't be- null.
 
 - 
lookForMdObjectsprotected List<MdObject> lookForMdObjects(IStructuredSelection selection) Looks for MdObjects in given selection.- Parameters:
- selection- - selection. Can't be- null.
- Returns:
- found MdObjects. Can't return null.
 
 - 
getControllerprotected ErdDiagramController getController(DiagramTabItem tab, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Returns diagram controller from given tab.- Parameters:
- tab- - tab to get controller from. Can't be- null.
- progressMonitor- - monitor to report progress. Can be- null.
- Returns:
- diagram controller from given tab. Can't return null.
 
 - 
convertToMdObjectsprotected Collection<MdObject> convertToMdObjects(Collection<? extends IErdEntity> entities) Converts given entities to mdObjects.- Parameters:
- entities- - entities to convert. Can't be- null.
- Returns:
- converted entities. Can't return null.
 
 - 
fillLiteralsprotected void fillLiterals() Fills extractor literals.
 - 
getConfigurationObjectsprotected Collection<MdObject> getConfigurationObjects(Configuration configuration) Returns configuration subsystems if there any. Else returns all configuration objects.- Parameters:
- configuration- - configuration. Can't be- null.
- Returns:
- objects from given configuration. Can't return null.
 
 - 
getConfigurationSubsystemsprotected Collection<MdObject> getConfigurationSubsystems(Configuration configuration) Returns subsystems from givenconfiguration.- Parameters:
- configuration- - configuration. Can't be- null.
- Returns:
- subsystems from given configuration. Can't return null.
 
 
- 
 
-