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

  • All Implemented Interfaces:
    IDtEditor<M>, IDtGranularEditorEmbeddedEditorPage<M>, IDtGranularEditorPage<M>, IGotoSelection, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.forms.editor.IFormPage, 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:
    FormEditorModulePage

    public class DtGranularEditorXtextEditorPage<M extends org.eclipse.emf.ecore.EObject>
    extends DtGranularEditorEmbeddedEditorPage<M>
    Base class for Xtext editors.
    • Constructor Detail

      • DtGranularEditorXtextEditorPage

        protected DtGranularEditorXtextEditorPage​(String id,
                                                  String title,
                                                  org.eclipse.emf.ecore.EStructuralFeature embeddedFeature)
        Instantiates a new DT granular editor Xtext editor page.
        Parameters:
        id - page ID.
        title - page title.
        embeddedFeature - feature to obtain model to edit.
      • DtGranularEditorXtextEditorPage

        protected DtGranularEditorXtextEditorPage​(String id,
                                                  String title)
        Instantiates a new DT granular editor Xtext editor page if feature to obtain model to edit unknown.
        Parameters:
        id - page ID, cannot be null
        title - page title, cannot be null
    • Method Detail

      • 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 DtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
      • createEmbeddedEditorInput

        public org.eclipse.ui.IEditorInput createEmbeddedEditorInput()
        Returns:
        input for embedded editor.
      • createEmbeddedEditor

        public org.eclipse.ui.IEditorPart createEmbeddedEditor()
        Returns:
        embedded editor's IEditorInput.
      • showEditorInput

        public void showEditorInput​(IDtEditorInput<M> editorInput)
        Shows the editor input. Override logic because we do not need set new active seletion for xtext editor, new selection will be setted to embedded editor here
        Specified by:
        showEditorInput in interface IDtEditor<M extends org.eclipse.emf.ecore.EObject>
        Overrides:
        showEditorInput in class DtGranularEditorPage<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)
      • getShowInContext

        public org.eclipse.ui.part.ShowInContext getShowInContext()
        Specified by:
        getShowInContext in interface org.eclipse.ui.part.IShowInSource
        Overrides:
        getShowInContext in class DtGranularEditorPage<M extends org.eclipse.emf.ecore.EObject>
      • createEditorSite

        protected org.eclipse.ui.IEditorSite createEditorSite​(org.eclipse.ui.IEditorPart embeddedEditor)
        Description copied from class: DtGranularEditorEmbeddedEditorPage
        Create embedded editor editor site.

        Default implementation delegates execution to parent DT granular editor, sub-classes can override.

        Overrides:
        createEditorSite in class DtGranularEditorEmbeddedEditorPage<M extends org.eclipse.emf.ecore.EObject>
        Parameters:
        embeddedEditor - this embedded editor, cannot be null
        Returns:
        newly created editor site, never null
      • setEmbeddedFeature

        protected void setEmbeddedFeature​(org.eclipse.emf.ecore.EReference embeddedFeature)
        Sets embedded feature to obtain model to edit.
        Parameters:
        embeddedFeature - the feature to obtain model to edit, cannot be null