public class ContentAssistContext
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ContentAssistContext.Builder |
static interface |
ContentAssistContext.Factory |
Modifier | Constructor and Description |
---|---|
protected |
ContentAssistContext()
Protected contructor to allow subclassing.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected ContentAssistContext()
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()
FQNPrefixMatcher
public int getReplaceContextLength()
public XtextResource getResource()
null
.