org.eclipse.internal.xpand2.codeassist
Class KeywordProposalComputer

java.lang.Object
  extended by 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

Constructor Summary
KeywordProposalComputer()
           
 
Method Summary
 java.util.List<java.lang.Object> computeProposals(java.lang.String txt, ExecutionContext ctx, ProposalFactory factory)
           
protected  java.lang.String getInsertionSuffix(java.lang.String keyword)
          Returns the character to insert after a specific keyword.
protected  java.lang.String getPrefix(java.lang.String txt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeywordProposalComputer

public KeywordProposalComputer()
Method Detail

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