public interface ISourceFileExtension extends ISourceFile
ISourceFile
with a number of default methods.
This interface is not intended to be referenced for purposes other than extension.
Modifier and Type | Method and Description |
---|---|
default IBuffer |
getBuffer()
Returns a buffer opened for this source file.
|
default org.eclipse.core.resources.IFile |
getFile()
Returns the underlying
IFile , or null
if this source file has no underlying file in the workspace. |
default boolean |
isWorkingCopy()
Returns whether this source file is a working copy.
|
default boolean |
needsReconciling()
Returns whether this source file needs reconciling.
|
default void |
reconcile(org.eclipse.core.runtime.IProgressMonitor monitor)
Reconciles this source file.
|
default org.eclipse.core.resources.IFile getFile()
IFile
, or null
if this source file has no underlying file in the workspace.
This is a handle-only method.IFile
, or null
if this source file has no underlying file in the workspacedefault boolean isWorkingCopy()
true
if this source file is a working copy,
and false
otherwisedefault boolean needsReconciling()
true
if this source file needs reconciling,
and false
otherwisedefault void reconcile(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
monitor
- a progress monitor, or null
if progress reporting is not desired. The caller must not rely on
IProgressMonitor.done()
having been called by the receiverorg.eclipse.core.runtime.CoreException
- if the working copy could not be reconciledorg.eclipse.core.runtime.OperationCanceledException
- if this method is canceleddefault IBuffer getBuffer() throws org.eclipse.core.runtime.CoreException
The client takes (potentially shared) ownership of the returned buffer and is responsible for releasing it when finished. The buffer will be disposed only after it is released by every owner. The buffer must not be accessed by clients which do not own it.
A new object may be returned, even for the same underlying buffer, each time this method is invoked. For working copies, the relationship between the source file and the underlying working copy buffer does not change over the lifetime of a working copy.
null
)org.eclipse.core.runtime.CoreException
- if this source file does not exist or if an
exception occurs while accessing its corresponding resourceCopyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0