org.eclipse.internal.xpand2.codeassist
Class KeywordProposalComputer
java.lang.Object
org.eclipse.internal.xpand2.codeassist.KeywordProposalComputer
- All Implemented Interfaces:
- ProposalComputer
public class KeywordProposalComputer
- extends java.lang.Object
- implements ProposalComputer
Responsible for proposals of Xpand keywords.
- Since:
- 4.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KeywordProposalComputer
public KeywordProposalComputer()
computeProposals
public java.util.List<java.lang.Object> computeProposals(java.lang.String txt,
ExecutionContext ctx,
ProposalFactory factory)
- Specified by:
computeProposals
in interface ProposalComputer
getPrefix
protected java.lang.String getPrefix(java.lang.String txt)
- Parameters:
txt
- Some text
- Returns:
- The capital letters (A-Z) at the end of txt
- Since:
- 2.0
getInsertionSuffix
protected java.lang.String getInsertionSuffix(java.lang.String keyword)
- Returns the character to insert after a specific keyword.
For all closing keywords (ENDFOREACH, ENDDEFINE) this will be the closing bracket.
The same for REM, since it does not contain anything.
For all other keywords a space character will be returned.
- Parameters:
keyword
- Xpand keyword
- Returns:
- Whitespace or Xpand closing bracket
- Since:
- 2.0
- See Also:
XpandTokens