|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.xtext.ui.editor.contentassist.ContentAssistContext
public class ContentAssistContext
Abstraction of a commonly used set of attributes related to the current content assist request.
| Nested Class Summary | |
|---|---|
static class |
ContentAssistContext.Builder
|
static interface |
ContentAssistContext.Factory
|
| Constructor Summary | |
|---|---|
protected |
ContentAssistContext()
Protected contructor to allow subclassing. |
| Method Summary | |
|---|---|
ContentAssistContext.Builder |
copy()
Use this context as prototype for a new mutable builder. |
org.eclipse.emf.ecore.EObject |
getCurrentModel()
The model that covers the completion offset and has a grammar element assigned that has the expected grammar element at the given offset in its call hierarchy. |
INode |
getCurrentNode()
The current node which is part of the current completion offset. |
IXtextDocument |
getDocument()
The actual document. |
com.google.common.collect.ImmutableList<AbstractElement> |
getFirstSetGrammarElements()
The grammar elements that may occur at the given offset. |
INode |
getLastCompleteNode()
The last non-hidden node before the offset that is considered to be complete. |
PrefixMatcher |
getMatcher()
The matching algorithm to choose proposals according to the completion prefix. |
int |
getOffset()
The completion offset in the text viewer. |
java.lang.String |
getPrefix()
The prefix string that is used to match the validity of proposals. |
org.eclipse.emf.ecore.EObject |
getPreviousModel()
The model element that is valid for the position left of the completion offset. |
int |
getReplaceContextLength()
The length of the region left to the completion offset that is part of the replace region. |
org.eclipse.jface.text.Region |
getReplaceRegion()
The region in the document that will be replaced by a new completion proposal. |
XtextResource |
getResource()
The resource. |
org.eclipse.emf.ecore.EObject |
getRootModel()
The root model in the resource. |
ICompositeNode |
getRootNode()
The root node in the resource. |
java.lang.String |
getSelectedText()
The currently selected text. |
org.eclipse.jface.text.ITextViewer |
getViewer()
The actual text viewer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ContentAssistContext()
| Method Detail |
|---|
public ContentAssistContext.Builder copy()
public java.lang.String getPrefix()
null.
public org.eclipse.emf.ecore.EObject getRootModel()
null.
public ICompositeNode getRootNode()
null.
public INode getCurrentNode()
public int getOffset()
public org.eclipse.jface.text.ITextViewer getViewer()
public IXtextDocument getDocument()
public INode getLastCompleteNode()
public org.eclipse.emf.ecore.EObject getCurrentModel()
getPreviousModel()public org.eclipse.emf.ecore.EObject getPreviousModel()
getCurrentModel(),
it may provide addition information.
getCurrentModel()public org.eclipse.jface.text.Region getReplaceRegion()
public java.lang.String getSelectedText()
public com.google.common.collect.ImmutableList<AbstractElement> getFirstSetGrammarElements()
public PrefixMatcher getMatcher()
FQNPrefixMatcherpublic int getReplaceContextLength()
public XtextResource getResource()
null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||