public abstract class WorkspaceSourceFile extends SourceFile
ISourceFileImpl
for source files
residing in the workspace. Such files always have an underlying IFile
.
This class is just an implementation convenience. Clients might as well
implement a workspace source file by extending SourceFile
or
implementing ("mixing in") ISourceFileImplSupport
directly
if extending this class is not possible/desirable for some reason.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 |
---|
WorkspaceSourceFile(IElement parent,
org.eclipse.core.resources.IFile file)
Constructs a handle for a source file with the given parent element and
the given underlying
IFile . |
Modifier and Type | Method and Description |
---|---|
org.eclipse.core.resources.IFile |
getFile_()
Returns the underlying
IFile . |
org.eclipse.core.resources.IResource |
getResource_()
Returns the innermost resource enclosing this element, or
null
if this element is not enclosed in a workspace resource. |
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_
public WorkspaceSourceFile(IElement parent, org.eclipse.core.resources.IFile file)
IFile
.parent
- the parent of the element,
or null
if the element has no parentfile
- the underlying IFile
(not null
)public final org.eclipse.core.resources.IResource getResource_()
IElementImpl
null
if this element is not enclosed in a workspace resource.
This is a handle-only method.
Note that it is safe to call this method and test the return value
for null
even when org.eclipse.core.resources
bundle is not available.
null
if this element is not enclosed in a workspace resourcepublic final org.eclipse.core.resources.IFile getFile_()
IFile
. This is a handle-only method.IFile
(never null
)