Package org.eclipse.ltk.core.refactoring
Class FileStatusContext
java.lang.Object
org.eclipse.ltk.core.refactoring.RefactoringStatusContext
org.eclipse.ltk.core.refactoring.FileStatusContext
A file context can be used to annotate a
RefactoringStatusEntry
with
detailed information about a problem detected in an IFile
.
Note: this class is not intended to be extended by clients.
- Since:
- 3.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
ConstructorDescriptionFileStatusContext
(IFile file, IRegion region) Creates an status entry context for the given file and source region. -
Method Summary
Modifier and TypeMethodDescriptionReturns the element that corresponds directly to this context, ornull
if there is no corresponding element.getFile()
Returns the context's file.Returns the context's source regionMethods inherited from class org.eclipse.ltk.core.refactoring.RefactoringStatusContext
toString
-
Constructor Details
-
FileStatusContext
Creates an status entry context for the given file and source region.- Parameters:
file
- the file that has caused the problem. Must not benull
region
- the source region of the problem inside the given file ornull
if now source region is known
-
-
Method Details
-
getFile
Returns the context's file.- Returns:
- the context's file
-
getTextRegion
Returns the context's source region- Returns:
- the context's source region or
null
if no source region has been set
-
getCorrespondingElement
Description copied from class:RefactoringStatusContext
Returns the element that corresponds directly to this context, ornull
if there is no corresponding element.For example, the corresponding element of a context for a problem detected in an
IResource
would be the resource itself.- Specified by:
getCorrespondingElement
in classRefactoringStatusContext
- Returns:
- the corresponding element
-