public class TextInvocationContext extends Object implements IQuickAssistInvocationContext
Clients may extend this class to add additional context information.
Constructor and Description |
---|
TextInvocationContext(ISourceViewer sourceViewer,
int offset,
int length) |
Modifier and Type | Method and Description |
---|---|
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.
|
public TextInvocationContext(ISourceViewer sourceViewer, int offset, int length)
public int getOffset()
IQuickAssistInvocationContext
getOffset
in interface IQuickAssistInvocationContext
-1
if unknownpublic int getLength()
IQuickAssistInvocationContext
getLength
in interface IQuickAssistInvocationContext
-1
if none or unknownpublic ISourceViewer getSourceViewer()
IQuickAssistInvocationContext
getSourceViewer
in interface IQuickAssistInvocationContext
null
if not available
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.