org.eclipse.xtext.ui.contentassist
Class XtextProposalProvider
java.lang.Object
org.eclipse.xtext.ui.editor.contentassist.AbstractContentProposalProvider
org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider
org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider
org.eclipse.xtext.ui.contentassist.AbstractXtextProposalProvider
org.eclipse.xtext.ui.contentassist.XtextProposalProvider
- All Implemented Interfaces:
- ICompletionProposalFactory, IContentProposalProvider
public class XtextProposalProvider
- extends AbstractXtextProposalProvider
see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#contentAssist on how to customize content assistant
Method Summary |
protected boolean |
appendReturnType(AbstractRule overrideMe,
Grammar grammar,
java.lang.StringBuilder newRuleFragment)
|
protected java.util.Map<java.lang.String,AbstractRule> |
collectExistingRules(Grammar grammar)
|
protected java.util.Set<AbstractRule> |
collectOverrideCandidates(Grammar grammar)
|
void |
complete_ParserRule(org.eclipse.emf.ecore.EObject model,
RuleCall ruleCall,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
|
void |
completeAction_Feature(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
|
void |
completeAssignment_Feature(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
Not a full featured solution for the computation of available structural features, but it is sufficient for some
interesting 80%. |
void |
completeGeneratedMetamodel_Alias(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
|
void |
completeGrammar_HiddenTokens(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
|
void |
completeGrammar_Name(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
|
protected void |
completeHiddenTokens(Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
Do not propose terminal fragments in hidden token sections. |
void |
completeParserRule_HiddenTokens(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
|
void |
completeParserRule_Name(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
|
void |
completeReferencedMetamodel_Alias(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
|
void |
completeReferencedMetamodel_EPackage(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
|
void |
completeRuleCall_Rule(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
Do not propose enum and parser rules inside of terminal rules,
do not propose terminal fragments in parser rules. |
void |
completeTypeRef_Classifier(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
|
protected void |
createOverrideProposal(AbstractRule overrideMe,
Grammar grammar,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
|
protected java.lang.String |
getDisplayString(org.eclipse.emf.ecore.EObject element,
java.lang.String proposal,
java.lang.String shortName)
|
protected org.eclipse.jface.viewers.StyledString |
getKeywordDisplayString(Keyword keyword)
|
protected com.google.common.base.Function<IEObjectDescription,org.eclipse.jface.text.contentassist.ICompletionProposal> |
getProposalFactory(java.lang.String ruleName,
ContentAssistContext contentAssistContext)
|
protected org.eclipse.jface.viewers.StyledString |
getStyledDisplayString(org.eclipse.emf.ecore.EObject element,
java.lang.String qualifiedName,
java.lang.String shortName)
|
protected org.eclipse.jface.viewers.StyledString |
getStyledDisplayString(IEObjectDescription description)
|
Methods inherited from class org.eclipse.xtext.ui.contentassist.AbstractXtextProposalProvider |
complete_AbstractMetamodelDeclaration, complete_AbstractNegatedToken, complete_AbstractRule, complete_AbstractTerminal, complete_AbstractToken, complete_AbstractTokenWithCardinality, complete_Action, complete_Alternatives, complete_AssignableAlternatives, complete_AssignableTerminal, complete_Assignment, complete_CharacterRange, complete_CrossReference, complete_CrossReferenceableTerminal, complete_EnumLiteralDeclaration, complete_EnumLiterals, complete_EnumRule, complete_EOF, complete_GeneratedMetamodel, complete_Grammar, complete_GrammarID, complete_Group, complete_Keyword, complete_NegatedToken, complete_ParenthesizedAssignableElement, complete_ParenthesizedElement, complete_ParenthesizedTerminalElement, complete_PredicatedGroup, complete_PredicatedKeyword, complete_PredicatedRuleCall, complete_ReferencedMetamodel, complete_RuleCall, complete_TerminalAlternatives, complete_TerminalGroup, complete_TerminalRule, complete_TerminalToken, complete_TerminalTokenElement, complete_TypeRef, complete_UnorderedGroup, complete_UntilToken, complete_Wildcard, completeAbstractTokenWithCardinality_Cardinality, completeAction_Operator, completeAction_Type, completeAlternatives_Elements, completeAssignableAlternatives_Elements, completeAssignment_Operator, completeAssignment_Predicated, completeAssignment_Terminal, completeCharacterRange_Right, completeCrossReference_Terminal, completeCrossReference_Type, completeEnumLiteralDeclaration_EnumLiteral, completeEnumLiteralDeclaration_Literal, completeEnumLiterals_Elements, completeEnumRule_Alternatives, completeEnumRule_Name, completeEnumRule_Type, completeGeneratedMetamodel_EPackage, completeGeneratedMetamodel_Name, completeGrammar_DefinesHiddenTokens, completeGrammar_MetamodelDeclarations, completeGrammar_Rules, completeGrammar_UsedGrammars, completeGroup_Elements, completeKeyword_Value, completeNegatedToken_Terminal, completeParserRule_Alternatives, completeParserRule_DefinesHiddenTokens, completeParserRule_Type, completePredicatedGroup_Elements, completePredicatedGroup_Predicated, completePredicatedKeyword_Predicated, completePredicatedKeyword_Value, completePredicatedRuleCall_Predicated, completePredicatedRuleCall_Rule, completeTerminalAlternatives_Elements, completeTerminalGroup_Elements, completeTerminalRule_Alternatives, completeTerminalRule_Fragment, completeTerminalRule_Name, completeTerminalRule_Type, completeTerminalToken_Cardinality, completeTypeRef_Metamodel, completeUnorderedGroup_Elements, completeUntilToken_Terminal |
Methods inherited from class org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider |
completeAssignment, completeKeyword, completeRuleCall, createProposals, getCrossReferenceProposalCreator, getHover, getScopeProvider, invokeMethod, lookupCrossReference, lookupCrossReference, lookupCrossReference, lookupCrossReference, lookupCrossReference, lookupCrossReference, setCrossReferenceProposalCreator, setScopeProvider |
Methods inherited from class org.eclipse.xtext.ui.editor.contentassist.AbstractContentProposalProvider |
createCompletionProposal, createCompletionProposal, createCompletionProposal, createCompletionProposal, createSelector, doCreateProposal, doCreateProposal, getConflictHelper, getImage, getLabelProvider, getPriorityHelper, getQualifiedNameConverter, getValueConverter, isValidProposal, setConflictHelper, setLabelProvider, setPriorityHelper, setValueConverter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XtextProposalProvider
public XtextProposalProvider()
completeGrammar_Name
public void completeGrammar_Name(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Overrides:
completeGrammar_Name
in class AbstractXtextProposalProvider
completeReferencedMetamodel_EPackage
public void completeReferencedMetamodel_EPackage(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Overrides:
completeReferencedMetamodel_EPackage
in class AbstractXtextProposalProvider
completeGeneratedMetamodel_Alias
public void completeGeneratedMetamodel_Alias(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Overrides:
completeGeneratedMetamodel_Alias
in class AbstractXtextProposalProvider
completeReferencedMetamodel_Alias
public void completeReferencedMetamodel_Alias(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Overrides:
completeReferencedMetamodel_Alias
in class AbstractXtextProposalProvider
getKeywordDisplayString
protected org.eclipse.jface.viewers.StyledString getKeywordDisplayString(Keyword keyword)
- Overrides:
getKeywordDisplayString
in class AbstractContentProposalProvider
getStyledDisplayString
protected org.eclipse.jface.viewers.StyledString getStyledDisplayString(org.eclipse.emf.ecore.EObject element,
java.lang.String qualifiedName,
java.lang.String shortName)
- Overrides:
getStyledDisplayString
in class AbstractContentProposalProvider
getStyledDisplayString
protected org.eclipse.jface.viewers.StyledString getStyledDisplayString(IEObjectDescription description)
- Overrides:
getStyledDisplayString
in class AbstractContentProposalProvider
getDisplayString
protected java.lang.String getDisplayString(org.eclipse.emf.ecore.EObject element,
java.lang.String proposal,
java.lang.String shortName)
- Overrides:
getDisplayString
in class AbstractContentProposalProvider
completeAssignment_Feature
public void completeAssignment_Feature(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Not a full featured solution for the computation of available structural features, but it is sufficient for some
interesting 80%.
- Overrides:
completeAssignment_Feature
in class AbstractXtextProposalProvider
completeAction_Feature
public void completeAction_Feature(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Overrides:
completeAction_Feature
in class AbstractXtextProposalProvider
completeTypeRef_Classifier
public void completeTypeRef_Classifier(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Overrides:
completeTypeRef_Classifier
in class AbstractXtextProposalProvider
complete_ParserRule
public void complete_ParserRule(org.eclipse.emf.ecore.EObject model,
RuleCall ruleCall,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Overrides:
complete_ParserRule
in class AbstractXtextProposalProvider
createOverrideProposal
protected void createOverrideProposal(AbstractRule overrideMe,
Grammar grammar,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
appendReturnType
protected boolean appendReturnType(AbstractRule overrideMe,
Grammar grammar,
java.lang.StringBuilder newRuleFragment)
collectOverrideCandidates
protected java.util.Set<AbstractRule> collectOverrideCandidates(Grammar grammar)
collectExistingRules
protected java.util.Map<java.lang.String,AbstractRule> collectExistingRules(Grammar grammar)
completeParserRule_Name
public void completeParserRule_Name(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Overrides:
completeParserRule_Name
in class AbstractXtextProposalProvider
completeParserRule_HiddenTokens
public void completeParserRule_HiddenTokens(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Overrides:
completeParserRule_HiddenTokens
in class AbstractXtextProposalProvider
completeGrammar_HiddenTokens
public void completeGrammar_HiddenTokens(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Overrides:
completeGrammar_HiddenTokens
in class AbstractXtextProposalProvider
completeHiddenTokens
protected void completeHiddenTokens(Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Do not propose terminal fragments in hidden token sections.
completeRuleCall_Rule
public void completeRuleCall_Rule(org.eclipse.emf.ecore.EObject model,
Assignment assignment,
ContentAssistContext context,
ICompletionProposalAcceptor acceptor)
- Do not propose enum and parser rules inside of terminal rules,
do not propose terminal fragments in parser rules.
- Overrides:
completeRuleCall_Rule
in class AbstractXtextProposalProvider
getProposalFactory
protected com.google.common.base.Function<IEObjectDescription,org.eclipse.jface.text.contentassist.ICompletionProposal> getProposalFactory(java.lang.String ruleName,
ContentAssistContext contentAssistContext)
- Overrides:
getProposalFactory
in class AbstractJavaBasedContentProposalProvider