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
Method Summary
|
int
|
getLength
()
Returns the length of the selection at the invocation offset. |
int
|
getOffset
()
Returns the offset where quick assist was invoked. |
ISourceViewer
|
getSourceViewer
()
Returns the viewer for this context. |
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
TextInvocationContext
public TextInvocationContext(
ISourceViewer sourceViewer,
int offset,
int length)
getOffset
public int getOffset()
-
Description copied from interface:
IQuickAssistInvocationContext
- Returns the offset where quick assist was invoked.
-
-
Specified by:
-
getOffset
in interface
IQuickAssistInvocationContext
-
-
Returns:
- the invocation offset or
-1
if unknown
getLength
public int getLength()
-
Description copied from interface:
IQuickAssistInvocationContext
- Returns the length of the selection at the invocation offset.
-
-
Specified by:
-
getLength
in interface
IQuickAssistInvocationContext
-
-
Returns:
- the length of the current selection or
-1
if none or unknown
getSourceViewer
public
ISourceViewer getSourceViewer()
-
Description copied from interface:
IQuickAssistInvocationContext
- Returns the viewer for this context.
-
-
Specified by:
-
getSourceViewer
in interface
IQuickAssistInvocationContext
-
-
Returns:
- the viewer or
null
if not available
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.