Class SaveableNonExistingInputAwareXtextDocumentProvider

  • All Implemented Interfaces:
    org.eclipse.ui.editors.text.IStorageDocumentProvider, org.eclipse.ui.texteditor.IDocumentProvider, org.eclipse.ui.texteditor.IDocumentProviderExtension, org.eclipse.ui.texteditor.IDocumentProviderExtension2, org.eclipse.ui.texteditor.IDocumentProviderExtension3, org.eclipse.ui.texteditor.IDocumentProviderExtension4, org.eclipse.ui.texteditor.IDocumentProviderExtension5

    public class SaveableNonExistingInputAwareXtextDocumentProvider
    extends NonExistingInputAwareXtextDocumentProvider
    Saveable extension of NonExistingFileAwareXtextDocumentProvider.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.xtext.ui.editor.model.XtextDocumentProvider

        org.eclipse.xtext.ui.editor.model.XtextDocumentProvider.UnchangedElementListener, org.eclipse.xtext.ui.editor.model.XtextDocumentProvider.URIInfo
      • Nested classes/interfaces inherited from class org.eclipse.ui.editors.text.FileDocumentProvider

        org.eclipse.ui.editors.text.FileDocumentProvider.FileInfo, org.eclipse.ui.editors.text.FileDocumentProvider.FileSynchronizer, org.eclipse.ui.editors.text.FileDocumentProvider.SafeChange
      • Nested classes/interfaces inherited from class org.eclipse.ui.editors.text.StorageDocumentProvider

        org.eclipse.ui.editors.text.StorageDocumentProvider.StorageInfo
      • Nested classes/interfaces inherited from class org.eclipse.ui.texteditor.AbstractDocumentProvider

        org.eclipse.ui.texteditor.AbstractDocumentProvider.DocumentProviderOperation, org.eclipse.ui.texteditor.AbstractDocumentProvider.ElementInfo
    • Field Summary

      • Fields inherited from class org.eclipse.ui.editors.text.StorageDocumentProvider

        DEFAULT_FILE_SIZE
      • Fields inherited from class org.eclipse.ui.texteditor.AbstractDocumentProvider

        PR10806_UC5_ENABLED, PR14469_ENABLED, STATUS_ERROR, STATUS_OK
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.eclipse.jface.text.source.IAnnotationModel createAnnotationModel​(Object element)  
      protected void doSaveDocument​(org.eclipse.core.runtime.IProgressMonitor monitor, Object element, org.eclipse.jface.text.IDocument document, boolean overwrite)

      If file editor input is non-existing, then delegates saving to it.
      • Methods inherited from class org.eclipse.xtext.ui.editor.model.XtextDocumentProvider

        addUnchangedElementListeners, createDocument, createElementInfo, createEmptyDocument, disposeElementInfo, doSynchronize, doUpdateStateCache, getEncoding, getModificationStamp, getResourceForEditorInputFactory, getStorage2UriMapper, getWorkspaceExternalEncoding, getWorkspaceOrDefaultEncoding, handleCoreException, isDeleted, isModifiable, isReadOnly, isSynchronized, isWorkspaceExternalEditorInput, loadResource, registerAnnotationInfoProcessor, removeUnchangedElementListeners, setDocumentResource, setResourceForEditorInputFactory, updateCache
      • Methods inherited from class org.eclipse.ui.editors.text.FileDocumentProvider

        cacheEncodingState, checkSynchronizationState, computeModificationStamp, doResetDocument, doValidateState, getContentType, getElementInfo, getOperationRunner, getPersistedEncoding, getRefreshRule, getResetRule, getSaveRule, getSynchronizationStamp, getSynchronizeRule, getValidateStateRule, handleElementContentChanged, handleElementDeleted, handleElementMoved, persistEncoding, readUTF8BOM, refreshFile, refreshFile, setDocumentContent
      • Methods inherited from class org.eclipse.ui.editors.text.StorageDocumentProvider

        getDefaultEncoding, isNotSynchronizedException, setDocumentContent, setDocumentContent, setEncoding, setupDocument, updateCache
      • Methods inherited from class org.eclipse.ui.texteditor.AbstractDocumentProvider

        aboutToChange, addElementStateListener, canSaveDocument, changed, connect, connected, disconnect, disconnected, executeOperation, fireElementContentAboutToBeReplaced, fireElementContentReplaced, fireElementDeleted, fireElementDirtyStateChanged, fireElementMoved, fireElementStateChangeFailed, fireElementStateChanging, fireElementStateValidationChanged, getAnnotationModel, getConnectedElements, getDocument, getProgressMonitor, getStatus, invalidatesState, isStateValidated, mustSaveDocument, removeElementStateListener, resetDocument, saveDocument, setCanSaveDocument, setProgressMonitor, synchronize, updateStateCache, validateState
    • Constructor Detail

      • SaveableNonExistingInputAwareXtextDocumentProvider

        public SaveableNonExistingInputAwareXtextDocumentProvider()
    • Method Detail

      • doSaveDocument

        protected void doSaveDocument​(org.eclipse.core.runtime.IProgressMonitor monitor,
                                      Object element,
                                      org.eclipse.jface.text.IDocument document,
                                      boolean overwrite)
                               throws org.eclipse.core.runtime.CoreException

        If file editor input is non-existing, then delegates saving to it.
        Overrides:
        doSaveDocument in class org.eclipse.xtext.ui.editor.model.XtextDocumentProvider
        Throws:
        org.eclipse.core.runtime.CoreException
      • createAnnotationModel

        protected org.eclipse.jface.text.source.IAnnotationModel createAnnotationModel​(Object element)
                                                                                throws org.eclipse.core.runtime.CoreException
        Overrides:
        createAnnotationModel in class org.eclipse.xtext.ui.editor.model.XtextDocumentProvider
        Throws:
        org.eclipse.core.runtime.CoreException