Class AbstractEditor

  • All Implemented Interfaces:
    org.eclipse.ui.texteditor.ITextEditorExtension2

    public class AbstractEditor
    extends java.lang.Object
    implements org.eclipse.ui.texteditor.ITextEditorExtension2
    • Field Detail

      • wPart

        private org.eclipse.ui.IWorkbenchPart wPart
      • multipage

        private boolean multipage
    • Constructor Detail

      • AbstractEditor

        public AbstractEditor​(@Nullable org.eclipse.ui.IWorkbenchPart editorPart)
        Proxy for different editor types
      • AbstractEditor

        private AbstractEditor()
    • Method Detail

      • isMultiPage

        public boolean isMultiPage()
      • getDocumentProvider

        public @Nullable org.eclipse.ui.texteditor.IDocumentProvider getDocumentProvider()
        Returns:
        may return null
      • getInput

        public @Nullable org.eclipse.ui.IEditorInput getInput()
        Returns:
        may return null
      • getIFile

        public @Nullable org.eclipse.core.resources.IFile getIFile()
        Returns:
        may return null
      • getFile

        public @Nullable java.io.File getFile()
      • getContentType

        public @Nullable java.lang.String getContentType()
        See Also:
        ITypedElement.getType()
      • getTitle

        public @NonNull java.lang.String getTitle()
      • getURI

        private @Nullable java.net.URI getURI()
        Returns:
        may return null
      • computeEncoding

        public @NonNull java.lang.String computeEncoding()
      • getSelectionProvider

        public @Nullable org.eclipse.jface.viewers.ISelectionProvider getSelectionProvider()
      • getDocument

        public @Nullable org.eclipse.jface.text.IDocument getDocument()
      • getSelection

        public @Nullable org.eclipse.jface.text.ITextSelection getSelection()
      • getSelectedText

        public @Nullable java.lang.String getSelectedText()
      • selectAndReveal

        public void selectAndReveal​(int lineNumber)
      • isDirty

        public boolean isDirty()
      • getAdapterFromPart

        private <T> @Nullable T getAdapterFromPart​(java.lang.Class<T> clazz)
      • doSave

        public void doSave​(org.eclipse.core.runtime.IProgressMonitor moni)
      • isEditorInputModifiable

        public boolean isEditorInputModifiable()
        Specified by:
        isEditorInputModifiable in interface org.eclipse.ui.texteditor.ITextEditorExtension2
      • validateEditorInputState

        public boolean validateEditorInputState()
        Specified by:
        validateEditorInputState in interface org.eclipse.ui.texteditor.ITextEditorExtension2
      • stopSequentialRewriteMode

        public void stopSequentialRewriteMode​(org.eclipse.jface.text.DocumentRewriteSession session)
        Sets the sequential rewrite mode of the viewer's document.
      • startSequentialRewriteMode

        public @Nullable org.eclipse.jface.text.DocumentRewriteSession startSequentialRewriteMode​(boolean normalized)
        Starts the sequential rewrite mode of the viewer's document.
        Parameters:
        normalized - true if the rewrite is performed from the start to the end of the document
      • dispose

        public void dispose()
        clean reference to wrapped "real" editor object
      • isDisposed

        public boolean isDisposed()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getPart

        public @Nullable org.eclipse.ui.IWorkbenchPart getPart()
      • getText

        public @Nullable java.lang.String getText()