Class TemplateModelEditorPart

  • All Implemented Interfaces:
    org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.emf.edit.domain.IEditingDomainProvider, org.eclipse.ui.ide.IGotoMarker, 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 TemplateModelEditorPart
    extends GenericEditor
    EditorPart for the Template Model Editor.
    Author:
    Eugen Neufeld
    • Constructor Detail

      • TemplateModelEditorPart

        public TemplateModelEditorPart()
    • 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 GenericEditor
        Throws:
        org.eclipse.ui.PartInitException
      • loadResource

        protected org.eclipse.emf.ecore.resource.ResourceSet loadResource​(org.eclipse.ui.IEditorInput editorInput)
                                                                   throws org.eclipse.ui.PartInitException
        Description copied from class: GenericEditor
        Creates a resource set and loads all required resources for the editor input.
        Overrides:
        loadResource in class GenericEditor
        Parameters:
        editorInput - the editor input
        Returns:
        the resource set
        Throws:
        org.eclipse.ui.PartInitException - if the resource could not be loaded
      • refreshTreeAfterResourceChange

        protected void refreshTreeAfterResourceChange()
        Description copied from class: GenericEditor
        Called after a resource change to refresh the tree master detail of the editor. By default only the tree is refreshed. If the tree's input is not this editor's resource but only derived from it, this method should be overridden to reset the tree's input.
        Overrides:
        refreshTreeAfterResourceChange in class GenericEditor
      • modifyEditorInput

        protected java.lang.Object modifyEditorInput​(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
        Description copied from class: GenericEditor
        Allows to modify the input object for the editor.
        Overrides:
        modifyEditorInput in class GenericEditor
        Parameters:
        resourceSet - the resourceSet which is the default editor input
        Returns:
        the object to set as the input
      • dispose

        public void dispose()
        Specified by:
        dispose in interface org.eclipse.ui.IWorkbenchPart
        Overrides:
        dispose in class GenericEditor
      • getTemplate

        public VTViewTemplate getTemplate()
        Gives access to the template model which is the input of the editor.
        Returns:
        the VTViewTemplate
      • reveal

        public void reveal​(org.eclipse.emf.ecore.EObject objectToReveal)
        The given element will be revealed in the tree of the editor.
        Overrides:
        reveal in class GenericEditor
        Parameters:
        objectToReveal - the object to reveal
      • enableValidation

        protected boolean enableValidation()
        Overrides:
        enableValidation in class GenericEditor
        Returns:
        whether a diagnostic cache should be managed.