Class MoxelEditor

  • All Implemented Interfaces:
    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
    Direct Known Subclasses:
    MoxelDcsEditor

    public class MoxelEditor
    extends org.eclipse.ui.part.EditorPart
    • Field Detail

      • undoContext

        protected org.eclipse.core.commands.operations.IUndoContext undoContext
        Контекст отката.
      • document

        protected org.eclipse.emf.ecore.EObject document
    • Constructor Detail

      • MoxelEditor

        public MoxelEditor()
    • Method Detail

      • setNeedHighlighting

        public void setNeedHighlighting​(boolean value)
        Set cells highlighting flag.
        Parameters:
        value - cells highlighting flag value.
      • isCellsHighlightingEnabled

        public boolean isCellsHighlightingEnabled()
        Check if cells' highlighting is enabled.
        Returns:
        true if cells' highlighting is enabled, false otherwise.
      • getEditorMode

        public MoxelEditorMode getEditorMode()
        Get curent editor mode.
        Returns:
        current editor mode, never null
      • 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
      • getInternalViewer

        public MoxelViewer getInternalViewer()
        Returns:
        the viewer
      • doSaveAs

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

        public MoxelControl getMoxelControl()
        Получить элемент управления.
      • getUndoContext

        public org.eclipse.core.commands.operations.IUndoContext getUndoContext()
        Получить контекст отката.
      • getAction

        public org.eclipse.jface.action.IAction getAction​(String actionID)
      • createContextMenu

        protected void createContextMenu()
        Создать контекстное меню.
      • createResource

        protected org.eclipse.emf.ecore.resource.Resource createResource​(org.eclipse.emf.common.util.URI uri)
        Create resource by URI.
        Parameters:
        uri - URI
        Returns:
        Resource
      • updateLanguageSettings

        protected void updateLanguageSettings()
        Updates document's language settings.