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

  • All Implemented Interfaces:
    IDtEditor<M>, IGotoSelection, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IEditorPart, org.eclipse.ui.ISaveablePart, org.eclipse.ui.IShowEditorInput, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IShowInSource, org.eclipse.ui.part.IWorkbenchPartOrientation
    Direct Known Subclasses:
    AbstractAefBoundDtEditor, AllRolesEditor

    public abstract class DtEditor<M extends org.eclipse.emf.ecore.EObject>
    extends org.eclipse.ui.part.EditorPart
    implements IDtEditor<M>
    Base class for all DT plain editors.
    • Constructor Detail

      • DtEditor

        public DtEditor()
    • Method Detail

      • createPartControl

        public final 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
      • dispose

        public void dispose()
        Specified by:
        dispose in interface org.eclipse.ui.IWorkbenchPart
        Overrides:
        dispose 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
        Specified by:
        doSave in class org.eclipse.ui.part.EditorPart
      • doSaveAs

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

        public <T> T getAdapter​(Class<T> adapter)
        Specified by:
        getAdapter in interface org.eclipse.core.runtime.IAdaptable
        Overrides:
        getAdapter in class org.eclipse.ui.part.WorkbenchPart
      • 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
      • getModel

        public M getModel()
        Specified by:
        getModel in interface IDtEditor<M extends org.eclipse.emf.ecore.EObject>
        Returns:
        the sessioned model being edited.
      • 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.
      • 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
      • 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)
      • 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
        Specified by:
        init in class org.eclipse.ui.part.EditorPart
        Throws:
        org.eclipse.ui.PartInitException
      • isDirty

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

        public boolean isSaveAsAllowed()
        Specified by:
        isSaveAsAllowed in interface org.eclipse.ui.ISaveablePart
        Specified by:
        isSaveAsAllowed in class org.eclipse.ui.part.EditorPart
      • 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.
      • setFocus

        public void setFocus()
        Specified by:
        setFocus in interface org.eclipse.ui.IWorkbenchPart
        Specified by:
        setFocus in class org.eclipse.ui.part.WorkbenchPart
      • 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
      • getShowInContext

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

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

        protected abstract void createControls​(org.eclipse.ui.forms.IManagedForm managedForm)
        Creates editor controls.
        Parameters:
        managedForm - the managed form, cannot be null.
      • getToolkit

        protected org.eclipse.ui.forms.widgets.FormToolkit getToolkit()
        Returns the form toolkit
        Returns:
        the form toolkit or null if createControls(IManagedForm) was not invoked for this instance of the editor.