Class FsSourceFile

java.lang.Object
org.eclipse.core.runtime.PlatformObject
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IElement, IElementImpl, IElementImplExtension, ISourceElementImpl, ISourceFileImpl, ISourceFileImplExtension, IElementImplSupport, IModelManager.Provider, ISourceElementImplSupport, ISourceFileImplSupport, ISourceElement, ISourceFile

public abstract class FsSourceFile extends SourceFile
Provides a skeletal implementation of ISourceFileImplExtension for source files that have an underlying IFileStore. This class is just an implementation convenience. Clients might as well implement a source file by extending SourceFile or implementing ("mixing in") ISourceFileImplSupport directly if extending this class is not possible/desirable for some reason.
Since:
1.3
See Also:
  • Constructor Details

    • FsSourceFile

      public FsSourceFile(IElement parent, org.eclipse.core.filesystem.IFileStore fileStore)
      Constructs a handle for a source file with the given parent element and the given underlying IFileStore.
      Parameters:
      parent - the parent of the element, or null if the element has no parent
      fileStore - the underlying IFileStore (not null)
  • Method Details

    • getFileStore_

      public final org.eclipse.core.filesystem.IFileStore getFileStore_()
      Description copied from interface: ISourceFileImpl
      Returns the corresponding IFileStore, or null if this source file has no corresponding file store.

      This implementation returns the file store corresponding to the location URI, if any.

      Returns:
      the corresponding IFileStore, or null if this source file has no corresponding file store
    • getFileObject_

      public final Object getFileObject_()
      Description copied from interface: ISourceFileImplSupport
      Returns the underlying file object, if any. The relationship between a source file and its underlying file object does not change.

      This implementation returns the underlying IFile, if any. If there is no underlying IFile, this implementation returns the corresponding IFileStore (if any), on the assumption that the relationship between this source file and the file store does not change.

      Returns:
      the underlying file object, or null if none
      See Also:
    • getLocationUri_

      public final URI getLocationUri_()
      Description copied from interface: IElementImpl
      Returns a file system location for this element. The resulting URI is suitable to passing to EFS.getStore(URI). Returns null if no location can be determined.
      Returns:
      a file system location for this element, or null if no location can be determined