public abstract class FsSourceFile extends SourceFile
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.BaseSourceFile
,
WorkspaceSourceFile
ISourceFileImplSupport.NotifyingReconcileOperation, ISourceFileImplSupport.ReconcileOperation
IElementImplExtension.CloseHint
SOURCE_AST, SOURCE_CONTENTS, SOURCE_SNAPSHOT
NEW_ELEMENTS, NO_BODY
CLOSE_HINT, FORCE_OPEN
WORKING_COPY_BUFFER, WORKING_COPY_CALLBACK, WORKING_COPY_CONTEXT
Constructor and Description |
---|
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 . |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getFileObject_()
Returns the underlying file object, if any.
|
org.eclipse.core.filesystem.IFileStore |
getFileStore_()
Returns the corresponding
IFileStore , or null
if this source file has no corresponding file store. |
java.net.URI |
getLocationUri_()
Returns a file system location for this element.
|
equals, getName_, getParent_, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
acquireExistingWorkingCopy_, becomeWorkingCopy_, buildSourceStructure_, buildStructure_, close_, defaultEquals_, defaultHashCode_, fileExists_, getBuffer_, getFileBuffer_, getFileSnapshotProvider_, getReconcileOperation_, getWorkingCopyContext_, isWorkingCopy_, needsReconciling_, newWorkingCopyContext_, openParent_, reconcile_, releaseWorkingCopy_, toStringName_, validateExistence_, workingCopyModeChanged_
checkInRange, getSourceElementAt_, getSourceElementAt_, getSourceElementInfo_
canEqual_, exists_, findBody_, getChildrenFromBody_, getElementManager_, getModel_, isOpenable_, newDoesNotExistException_, open_, peekAtBody_, remove_, removing_, toString_, toStringAncestors_, toStringBody_, toStringChildren_
close_, getBody_, getBody_, getChildren_
getModelManager_
getFile_
public FsSourceFile(IElement parent, org.eclipse.core.filesystem.IFileStore fileStore)
IFileStore
.parent
- the parent of the element,
or null
if the element has no parentfileStore
- the underlying IFileStore
(not null
)public final org.eclipse.core.filesystem.IFileStore getFileStore_()
ISourceFileImpl
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.
IFileStore
, or null
if this source file has no corresponding file storepublic final java.lang.Object getFileObject_()
ISourceFileImplSupport
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.
null
if noneISourceFileImpl.getFile_()
,
ISourceFileImpl.getFileStore_()
public final java.net.URI getLocationUri_()
IElementImpl
EFS.getStore(URI)
. Returns
null
if no location can be determined.null
if no location can be determinedCopyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0