Class DtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected DtGranularEditorPage​(String id, String title)
      Instantiates a new DT granular editor page.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void activate()
      Performs necessary actions when this page is activated (i.
      protected void createFormContent​(org.eclipse.ui.forms.IManagedForm managedForm)  
      protected abstract void createPageControls​(org.eclipse.ui.forms.IManagedForm managedForm)
      Creates the controls of this page.
      protected org.eclipse.swt.widgets.Layout createPageLayout()  
      void deactivate()
      Performs necessary actions when this page is deactivated (i.
      void dispose()  
      protected org.eclipse.emf.ecore.EStructuralFeature getActiveFeature()
      Returns the active feature.
      protected ISelection getActiveSelection()
      Returns the active selection.
      IEditingContext getApiEditingContext()
      Returns the IEditingContext instance associated with the editor.
      protected org.eclipse.emf.ecore.EStructuralFeature getDefaultFeature()
      Returns the default pages feature.
      IBmEditingContext getEditingContext()  
      DtGranularEditor<M> getEditor()  
      IDtEditorInput<M> getEditorInput()  
      protected EditorPageDescriptor getEditorPageDescriptor()
      Returns editor page descriptor.
      protected EventGate getEventGate()
      Returns the event gate of this page.
      protected String getHelpContextId()
      Returns help context id to bind help to.
      M getModel()  
      protected String getPageTitle()
      Returns the page title.
      protected String getPageTitle​(org.eclipse.emf.ecore.EObject modelObject)
      Returns the page title based on the provided model object.
      static String getSectionID​(String pageID, String sectionName)
      This method create section ID
      org.eclipse.ui.part.ShowInContext getShowInContext()  
      protected Collection<String> getWaitingPartsId()
      Returns parts ids array to be waited before creating control.
      void gotoSelection​(ISelection selection)
      Sets selection to the editor
      void init​(org.eclipse.ui.IEditorSite site, IDtEditorInput<M> input)
      Initializes the editor.
      void initialize​(org.eclipse.ui.forms.editor.FormEditor editor)  
      protected void onEventGateClosed()
      Performs necessary actions when the event gate manager transitions into CLOSED state.
      protected String pathSeparetor()
      Returns granual editor page title path separator.
      protected void refresh()
      Fully refreshes the contents of the page as if it was just opened for the first time.
      void setActiveFeature​(org.eclipse.emf.ecore.EStructuralFeature feature)
      Sets the active feature of the editor.
      void setActiveSelection​(ISelection selection, DtEditorSelectionProcessingPolicy policy)
      Sets the active selection of the editor.
      void setDefaultFeature​(org.eclipse.emf.ecore.EStructuralFeature feature)
      Sets the default feature of the page.
      void setFocus()  
      void showEditorInput​(IDtEditorInput<M> editorInput)
      Shows the editor input.
      void showEditorInput​(org.eclipse.ui.IEditorInput editorInput)  
      protected boolean waitDerivedData()
      Waits when dependent derivid data of the editor will finish computation.
      protected boolean waitDerivedData​(org.eclipse.emf.ecore.EObject model)
      Waits when dependent derivid data of the editor will finish computation.
      • Methods inherited from class org.eclipse.ui.forms.editor.FormPage

        canLeaveThePage, createPartControl, doSave, doSaveAs, getId, getIndex, getManagedForm, getPartControl, getTitleImage, init, isActive, isDirty, isEditor, isSaveAsAllowed, selectReveal, setActive, setIndex
      • Methods inherited from class org.eclipse.ui.part.EditorPart

        checkSite, 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, 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.IEditorPart

        getEditorSite, init
      • Methods inherited from interface org.eclipse.ui.forms.editor.IFormPage

        canLeaveThePage, getId, getIndex, getManagedForm, getPartControl, isActive, isEditor, selectReveal, setActive, setIndex
      • Methods inherited from interface org.eclipse.ui.ISaveablePart

        doSave, doSaveAs, isDirty, isSaveAsAllowed, isSaveOnCloseNeeded
      • Methods inherited from interface org.eclipse.ui.IWorkbenchPart

        addPropertyListener, createPartControl, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
    • Field Detail

      • SECTION_ID_PATTERN

        protected static final String SECTION_ID_PATTERN
        The sections pattern.
        How usage: String.format(SECTION_ID_PATTERN, "PageID","sectionName")
        See Also:
        Constant Field Values
      • activeSelection

        protected ISelection activeSelection
        Active selection on the page
    • Constructor Detail

      • DtGranularEditorPage

        protected DtGranularEditorPage​(String id,
                                       String title)
        Instantiates a new DT granular editor page.
        Parameters:
        id - ID of this page.
        title - title of this page.
    • Method Detail

      • getSectionID

        public static String getSectionID​(String pageID,
                                          String sectionName)
        This method create section ID
        Parameters:
        pageID - the page id for which creating section, cannot be null
        sectionName - the section name, cannot be null
        Returns:
        the section id, cannot be null
      • initialize

        public void initialize​(org.eclipse.ui.forms.editor.FormEditor editor)
        Specified by:
        initialize in interface org.eclipse.ui.forms.editor.IFormPage
        Overrides:
        initialize in class org.eclipse.ui.forms.editor.FormPage
      • getEditor

        public DtGranularEditor<M> getEditor()
        Specified by:
        getEditor in interface org.eclipse.ui.forms.editor.IFormPage
        Overrides:
        getEditor in class org.eclipse.ui.forms.editor.FormPage
      • getEditorInput

        public IDtEditorInput<M> getEditorInput()
        Specified by:
        getEditorInput in interface IDtEditor<M extends org.eclipse.emf.ecore.EObject>
        Specified by:
        getEditorInput in interface org.eclipse.ui.IEditorPart
        Overrides:
        getEditorInput in class org.eclipse.ui.part.EditorPart
      • setDefaultFeature

        public void setDefaultFeature​(org.eclipse.emf.ecore.EStructuralFeature feature)
        Description copied from interface: IDtGranularEditorPage
        Sets the default feature of the page. Initial focus will be set to the corresponding field.
        Specified by:
        setDefaultFeature in interface IDtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        feature - feature to set.
      • setActiveFeature

        public void setActiveFeature​(org.eclipse.emf.ecore.EStructuralFeature feature)
        Description copied from interface: IDtEditor
        Sets the active feature of the editor.
        Specified by:
        setActiveFeature in interface IDtEditor<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        feature - the feature active at this moment, or null if there is no active feature.
      • setActiveSelection

        public void setActiveSelection​(ISelection selection,
                                       DtEditorSelectionProcessingPolicy policy)
        Description copied from interface: IDtEditor
        Sets the active selection of the editor.
        Specified by:
        setActiveSelection in interface IDtEditor<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        selection - selection active at this moment.
        policy - selection processing policy.
      • showEditorInput

        public void showEditorInput​(IDtEditorInput<M> editorInput)
        Description copied from interface: IDtEditor
        Shows the editor input.
        Specified by:
        showEditorInput in interface IDtEditor<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        editorInput - the editor input to show, cannot be null.
        See Also:
        IShowEditorInput.showEditorInput(org.eclipse.ui.IEditorInput)
      • showEditorInput

        public void showEditorInput​(org.eclipse.ui.IEditorInput editorInput)
        Specified by:
        showEditorInput in interface org.eclipse.ui.IShowEditorInput
      • init

        public void init​(org.eclipse.ui.IEditorSite site,
                         IDtEditorInput<M> input)
                  throws org.eclipse.ui.PartInitException
        Description copied from interface: IDtEditor
        Initializes the editor.
        Specified by:
        init in interface IDtEditor<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        site - the editor site, cannot be null.
        input - the editor input, cannot be null.
        Throws:
        org.eclipse.ui.PartInitException - if this editor was not initialized successfully
        See Also:
        IEditorPart.init(IEditorSite, org.eclipse.ui.IEditorInput)
      • getEditingContext

        public IBmEditingContext getEditingContext()
        Specified by:
        getEditingContext in interface IDtEditor<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        BM editing context associated with the editor.
      • getApiEditingContext

        public IEditingContext getApiEditingContext()
        Description copied from interface: IDtEditor
        Returns the IEditingContext instance associated with the editor.
        Specified by:
        getApiEditingContext in interface IDtEditor<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        the IEditingContext instance associated with the editor, can be null if the editor is not initialized or it is already disposed.
      • getModel

        public M getModel()
        Specified by:
        getModel in interface IDtEditor<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        the sessioned model being edited.
      • setFocus

        public void setFocus()
        Specified by:
        setFocus in interface org.eclipse.ui.IWorkbenchPart
        Overrides:
        setFocus in class org.eclipse.ui.forms.editor.FormPage
      • dispose

        public void dispose()
        Specified by:
        dispose in interface org.eclipse.ui.IWorkbenchPart
        Overrides:
        dispose in class org.eclipse.ui.forms.editor.FormPage
      • 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
      • getShowInContext

        public org.eclipse.ui.part.ShowInContext getShowInContext()
        Specified by:
        getShowInContext in interface org.eclipse.ui.part.IShowInSource
      • activate

        public void activate()
        Description copied from interface: IDtGranularEditorPage
        Performs necessary actions when this page is activated (i. e. becomes visible and active).
        Specified by:
        activate in interface IDtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
      • deactivate

        public void deactivate()
        Description copied from interface: IDtGranularEditorPage
        Performs necessary actions when this page is deactivated (i. e. ceases to be visible and active).
        Specified by:
        deactivate in interface IDtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
      • getActiveFeature

        protected org.eclipse.emf.ecore.EStructuralFeature getActiveFeature()
        Returns the active feature.
        Returns:
        the active feature or null.
      • getActiveSelection

        protected ISelection getActiveSelection()
        Returns the active selection.
        Returns:
        the active selection or null.
      • refresh

        protected void refresh()
        Fully refreshes the contents of the page as if it was just opened for the first time.
      • onEventGateClosed

        protected void onEventGateClosed()
        Performs necessary actions when the event gate manager transitions into CLOSED state.
      • waitDerivedData

        protected boolean waitDerivedData()
        Waits when dependent derivid data of the editor will finish computation.
        Returns:
        true if waiting of computation is finishing well, otherwise false.
      • waitDerivedData

        protected boolean waitDerivedData​(org.eclipse.emf.ecore.EObject model)
        Waits when dependent derivid data of the editor will finish computation.
        Parameters:
        model - the model object, cannot be null
        Returns:
        true if waiting of computation is finishing well, otherwise false.
      • createFormContent

        protected final void createFormContent​(org.eclipse.ui.forms.IManagedForm managedForm)
        Overrides:
        createFormContent in class org.eclipse.ui.forms.editor.FormPage
      • getHelpContextId

        protected String getHelpContextId()
        Returns help context id to bind help to.
        Returns:
        help context id or null if no help is needed
      • getWaitingPartsId

        protected Collection<String> getWaitingPartsId()
        Returns parts ids array to be waited before creating control. Override in successors.
        Returns:
        array of parts ids
      • getPageTitle

        protected String getPageTitle()
        Returns the page title.
        Returns:
        this page title, never null
      • getPageTitle

        protected String getPageTitle​(org.eclipse.emf.ecore.EObject modelObject)
        Returns the page title based on the provided model object.
        Parameters:
        modelObject - the model object, cannot be null
        Returns:
        the page title, never null
      • pathSeparetor

        protected String pathSeparetor()
        Returns granual editor page title path separator.
        Returns:
        granual editor page title path separator, never null
      • createPageLayout

        protected org.eclipse.swt.widgets.Layout createPageLayout()
        Returns:
        layout for this page.
      • createPageControls

        protected abstract void createPageControls​(org.eclipse.ui.forms.IManagedForm managedForm)
        Creates the controls of this page.
        Parameters:
        managedForm - managed form that will contain the controls.
      • getEventGate

        protected EventGate getEventGate()
        Returns the event gate of this page. It is created on first call.
        Returns:
        the event gate of the page
      • getEditorPageDescriptor

        protected EditorPageDescriptor getEditorPageDescriptor()
        Returns editor page descriptor.
        Returns:
        editorPageDescriptor, the editor page descriptor, can be null
      • getDefaultFeature

        protected org.eclipse.emf.ecore.EStructuralFeature getDefaultFeature()
        Returns the default pages feature.
        Returns:
        the default pages feature, or null if there is no default feature.