Class NonExistingFileEditorInput

  • All Implemented Interfaces:
    org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.editors.text.ILocationProvider, org.eclipse.ui.IEditorInput, org.eclipse.ui.IStorageEditorInput

    public class NonExistingFileEditorInput
    extends org.eclipse.core.runtime.PlatformObject
    implements org.eclipse.ui.IEditorInput, org.eclipse.ui.editors.text.ILocationProvider, org.eclipse.ui.IStorageEditorInput
    FileEditorInput implementation with file, that does not actually exist in file system.
    See Also:
    NonExistingFileAwareXtextDocumentProvider
    • Method Detail

      • exists

        public boolean exists()

        Non existing file are always not exist.
        Specified by:
        exists in interface org.eclipse.ui.IEditorInput
      • getImageDescriptor

        public org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
        Specified by:
        getImageDescriptor in interface org.eclipse.ui.IEditorInput
      • getName

        public String getName()
        Specified by:
        getName in interface org.eclipse.ui.IEditorInput
      • getPersistable

        public org.eclipse.ui.IPersistableElement getPersistable()
        Specified by:
        getPersistable in interface org.eclipse.ui.IEditorInput
      • getToolTipText

        public String getToolTipText()
        Specified by:
        getToolTipText in interface org.eclipse.ui.IEditorInput
      • getPath

        public org.eclipse.core.runtime.IPath getPath​(Object element)
        Specified by:
        getPath in interface org.eclipse.ui.editors.text.ILocationProvider
      • getStorage

        public org.eclipse.core.resources.IStorage getStorage()
                                                       throws org.eclipse.core.runtime.CoreException
        Specified by:
        getStorage in interface org.eclipse.ui.IStorageEditorInput
        Throws:
        org.eclipse.core.runtime.CoreException
      • getAdapter

        public Object getAdapter​(Class adapter)
        Specified by:
        getAdapter in interface org.eclipse.core.runtime.IAdaptable
        Overrides:
        getAdapter in class org.eclipse.core.runtime.PlatformObject
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • saveText

        public void saveText​(String text)
        Save actual input text. NonExistingFileAwareXtextDocumentProvider will invoke this method to save document content. Default implementation does nothing.
        Subclasses may override for their own purpose.
        Parameters:
        text - text to save.