Package org.eclipse.jface.text.source
Class TextInvocationContext
- java.lang.Object
-
- org.eclipse.jface.text.source.TextInvocationContext
-
- All Implemented Interfaces:
IQuickAssistInvocationContext
public class TextInvocationContext extends Object implements IQuickAssistInvocationContext
Text quick assist invocation context.Clients may extend this class to add additional context information.
- Since:
- 3.3
-
-
Constructor Summary
Constructors Constructor Description TextInvocationContext(ISourceViewer sourceViewer, int offset, int length)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLength()Returns the length of the selection at the invocation offset.intgetOffset()Returns the offset where quick assist was invoked.ISourceViewergetSourceViewer()Returns the viewer for this context.
-
-
-
Constructor Detail
-
TextInvocationContext
public TextInvocationContext(ISourceViewer sourceViewer, int offset, int length)
-
-
Method Detail
-
getOffset
public int getOffset()
Description copied from interface:IQuickAssistInvocationContextReturns the offset where quick assist was invoked.- Specified by:
getOffsetin interfaceIQuickAssistInvocationContext- Returns:
- the invocation offset or
-1if unknown
-
getLength
public int getLength()
Description copied from interface:IQuickAssistInvocationContextReturns the length of the selection at the invocation offset.- Specified by:
getLengthin interfaceIQuickAssistInvocationContext- Returns:
- the length of the current selection or
-1if none or unknown
-
getSourceViewer
public ISourceViewer getSourceViewer()
Description copied from interface:IQuickAssistInvocationContextReturns the viewer for this context.- Specified by:
getSourceViewerin interfaceIQuickAssistInvocationContext- Returns:
- the viewer or
nullif not available
-
-