Class BpSchemeEditor

  • All Implemented Interfaces:
    IGotoSelection, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IEditorPart, org.eclipse.ui.ISaveablePart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

    public class BpSchemeEditor
    extends com._1c.g5.v8.dt.diagram.framework.ui.editors.AbstractDiagramEditor
    implements IGotoSelection
    Editor for business-process scheme.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String EDITOR_ID  
      • Fields inherited from interface org.eclipse.ui.IEditorPart

        PROP_DIRTY, PROP_INPUT
      • Fields inherited from interface org.eclipse.ui.IWorkbenchPart

        PROP_TITLE
    • Constructor Summary

      Constructors 
      Constructor Description
      BpSchemeEditor()
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createPartControl​(org.eclipse.swt.widgets.Composite parent)  
      void dispose()  
      void doSave​(org.eclipse.core.runtime.IProgressMonitor monitor)  
      void doSaveAs()  
      void executeTask​(IBmTask<?> task)
      Executes given task at editor's local editing context.
      BpScheme getBpScheme()
      Returns BP scheme.
      org.eclipse.swt.graphics.Color getColor​(org.eclipse.swt.graphics.RGB rgb)
      Returns color from RGB.
      CreateElementsActions getCreateElementsActions()
      Returns create elements actions
      BpDiagramCore getDiagramCore()
      Returns associated with editor diagram core.
      IEditingLanguageManager getEditingLanguageManager()
      Returns editing language manager.
      org.eclipse.ui.IFileEditorInput getFileEditorInput()
      Returns file editor input.
      org.eclipse.swt.graphics.Font getFont​(org.eclipse.swt.graphics.FontData fontData)
      Returns font from given symbolicName and font data.
      IdGenerator getIdGenerator()
      Returns id generator.
      org.eclipse.swt.graphics.Image getImage​(String name)
      Returns image with given name.
      IBmLocalEditingContext getLocalEditingContext()
      Returns editor's local editing context.
      MdObject getParent()
      Returns diagram owner (Business process or template).
      IV8ProjectManager getProjectManager()
      Returns project manager.
      Version getRuntimeVersion()
      Returns scheme's project runtime version.
      void gotoSelection​(ISelection selection)
      Sets selection to the editor
      void init​(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)  
      boolean isDirty()  
      boolean isReadOnly()
      Returns true if editors input is read only.
      boolean isSaveAsAllowed()  
      void putImage​(String name, org.eclipse.swt.graphics.Image image)
      Puts image to image registry.
      void setFocus()  
      • Methods inherited from class com._1c.g5.v8.dt.diagram.framework.ui.editors.AbstractDiagramEditor

        getDiagramDocumentProvider, setDiagramDocumentProvider
      • Methods inherited from class org.eclipse.ui.part.EditorPart

        checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
      • Methods inherited from class org.eclipse.ui.part.WorkbenchPart

        addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
      • Methods inherited from class org.eclipse.core.commands.common.EventManager

        addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
      • Methods inherited from interface org.eclipse.core.runtime.IAdaptable

        getAdapter
      • Methods inherited from interface org.eclipse.ui.IWorkbenchPart

        addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
    • Constructor Detail

      • BpSchemeEditor

        public BpSchemeEditor()
        Constructor
    • Method Detail

      • init

        public void init​(org.eclipse.ui.IEditorSite site,
                         org.eclipse.ui.IEditorInput input)
                  throws org.eclipse.ui.PartInitException
        Specified by:
        init in interface org.eclipse.ui.IEditorPart
        Overrides:
        init in class com._1c.g5.v8.dt.diagram.framework.ui.editors.AbstractDiagramEditor
        Throws:
        org.eclipse.ui.PartInitException
      • createPartControl

        public void createPartControl​(org.eclipse.swt.widgets.Composite parent)
        Specified by:
        createPartControl in interface org.eclipse.ui.IWorkbenchPart
        Specified by:
        createPartControl in class org.eclipse.ui.part.WorkbenchPart
      • doSave

        public void doSave​(org.eclipse.core.runtime.IProgressMonitor monitor)
        Specified by:
        doSave in interface org.eclipse.ui.ISaveablePart
        Overrides:
        doSave in class com._1c.g5.v8.dt.diagram.framework.ui.editors.AbstractDiagramEditor
      • doSaveAs

        public void doSaveAs()
        Specified by:
        doSaveAs in interface org.eclipse.ui.ISaveablePart
        Specified by:
        doSaveAs in class org.eclipse.ui.part.EditorPart
      • isDirty

        public boolean isDirty()
        Specified by:
        isDirty in interface org.eclipse.ui.ISaveablePart
        Overrides:
        isDirty in class com._1c.g5.v8.dt.diagram.framework.ui.editors.AbstractDiagramEditor
      • isSaveAsAllowed

        public boolean isSaveAsAllowed()
        Specified by:
        isSaveAsAllowed in interface org.eclipse.ui.ISaveablePart
        Specified by:
        isSaveAsAllowed in class org.eclipse.ui.part.EditorPart
      • setFocus

        public void setFocus()
        Specified by:
        setFocus in interface org.eclipse.ui.IWorkbenchPart
        Specified by:
        setFocus in class org.eclipse.ui.part.WorkbenchPart
      • dispose

        public void dispose()
        Specified by:
        dispose in interface org.eclipse.ui.IWorkbenchPart
        Overrides:
        dispose in class org.eclipse.ui.part.WorkbenchPart
      • gotoSelection

        public void gotoSelection​(ISelection selection)
        Description copied from interface: IGotoSelection
        Sets selection to the editor
        Specified by:
        gotoSelection in interface IGotoSelection
        Parameters:
        selection - actual selection, can be null
      • getBpScheme

        public BpScheme getBpScheme()
        Returns BP scheme.
        Returns:
        the bp scheme. Can't return null.
      • getColor

        public org.eclipse.swt.graphics.Color getColor​(org.eclipse.swt.graphics.RGB rgb)
        Returns color from RGB.
        Parameters:
        rgb - - RGB. Can't be null.
        Returns:
        color. Can't return null.
      • getFont

        public org.eclipse.swt.graphics.Font getFont​(org.eclipse.swt.graphics.FontData fontData)
        Returns font from given symbolicName and font data.
        Parameters:
        fontData - - font data. Can't be null.
        Returns:
        font from given symbolicName and font data. Can't return null.
      • getImage

        public org.eclipse.swt.graphics.Image getImage​(String name)
        Returns image with given name.
        Parameters:
        name - - picture name. Can't be null.
        Returns:
        image with given name. Can return null.
      • putImage

        public void putImage​(String name,
                             org.eclipse.swt.graphics.Image image)
        Puts image to image registry.
        Parameters:
        name - - image name. Can't be null.
        image - - image to put. Can't be null.
      • getCreateElementsActions

        public CreateElementsActions getCreateElementsActions()
        Returns create elements actions
        Returns:
        create elements actions. Can't return null.
      • getParent

        public MdObject getParent()
        Returns diagram owner (Business process or template).
        Returns:
        diagram owner (Business process or template). Can return null.
      • getRuntimeVersion

        public Version getRuntimeVersion()
        Returns scheme's project runtime version.
        Returns:
        scheme's project runtime version. Can't return null.
      • executeTask

        public void executeTask​(IBmTask<?> task)
        Executes given task at editor's local editing context.
        Parameters:
        task - - task to execute. Can't be null.
      • getDiagramCore

        public BpDiagramCore getDiagramCore()
        Returns associated with editor diagram core.
        Returns:
        associated with editor diagram core. Can return null only before part control created.
      • getLocalEditingContext

        public IBmLocalEditingContext getLocalEditingContext()
        Returns editor's local editing context.
        Returns:
        the localEditingContext - local editing context. Can't return null.
      • getFileEditorInput

        public org.eclipse.ui.IFileEditorInput getFileEditorInput()
        Returns file editor input.
        Returns:
        file editor input. Can't be null.
      • getProjectManager

        public IV8ProjectManager getProjectManager()
        Returns project manager.
        Returns:
        project manager. Can't be null.
      • getEditingLanguageManager

        public IEditingLanguageManager getEditingLanguageManager()
        Returns editing language manager.
        Returns:
        editing language manager. Can't return null.
      • getIdGenerator

        public IdGenerator getIdGenerator()
        Returns id generator.
        Returns:
        id generator. Can't be null.
      • isReadOnly

        public boolean isReadOnly()
        Returns true if editors input is read only.
        Returns:
        true if editors input is read only.