Package org.eclipse.ltk.core.refactoring
Class FileStatusContext
- java.lang.Object
-
- org.eclipse.ltk.core.refactoring.RefactoringStatusContext
-
- org.eclipse.ltk.core.refactoring.FileStatusContext
-
public class FileStatusContext extends RefactoringStatusContext
A file context can be used to annotate aRefactoringStatusEntrywith detailed information about a problem detected in anIFile.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
Constructors Constructor Description FileStatusContext(IFile file, IRegion region)Creates an status entry context for the given file and source region.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetCorrespondingElement()Returns the element that corresponds directly to this context, ornullif there is no corresponding element.IFilegetFile()Returns the context's file.IRegiongetTextRegion()Returns the context's source region-
Methods inherited from class org.eclipse.ltk.core.refactoring.RefactoringStatusContext
toString
-
-
-
-
Constructor Detail
-
FileStatusContext
public FileStatusContext(IFile file, IRegion region)
Creates an status entry context for the given file and source region.- Parameters:
file- the file that has caused the problem. Must not benullregion- the source region of the problem inside the given file ornullif now source region is known
-
-
Method Detail
-
getFile
public IFile getFile()
Returns the context's file.- Returns:
- the context's file
-
getTextRegion
public IRegion getTextRegion()
Returns the context's source region- Returns:
- the context's source region or
nullif no source region has been set
-
getCorrespondingElement
public Object getCorrespondingElement()
Description copied from class:RefactoringStatusContextReturns the element that corresponds directly to this context, ornullif there is no corresponding element.For example, the corresponding element of a context for a problem detected in an
IResourcewould be the resource itself.- Specified by:
getCorrespondingElementin classRefactoringStatusContext- Returns:
- the corresponding element
-
-