public class OCLSyntaxHelper<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> extends java.lang.Object implements OCLSyntaxHelper
Modifier and Type | Class and Description |
---|---|
protected class |
OCLSyntaxHelper.ASTVisitor |
Constructor and Description |
---|
OCLSyntaxHelper(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env) |
Modifier and Type | Method and Description |
---|---|
protected OCLSyntaxHelper.ASTVisitor |
createASTVisitor(ConstraintKind constraintType,
java.lang.String txt,
int position) |
protected Choice |
createChoice(java.lang.String name,
java.lang.String description,
ChoiceKind kind,
java.lang.Object element) |
protected java.util.List<Choice> |
getChoices(OCLExpression<C> expression,
ConstraintKind constraintType)
returns the syntax help choices applicable for the passed OCLExpression
|
protected java.lang.String |
getDescription(java.lang.Object namedElement)
Gets the most appropriate description available of the specified
named element.
|
protected Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
getEnvironment() |
protected java.util.List<Choice> |
getPropertyChoices(C eClass)
returns the choices list of structural features for the passed eclass
|
java.util.List<Choice> |
getSyntaxHelp(ConstraintKind constraintType,
java.lang.String txt)
Gets syntax help choices for the specified
context
classifier or operation. |
static java.lang.String |
initialLower(java.lang.String name)
Gets the name of a named
elem ent with its initial character
in lower case. |
protected boolean |
isOclIsInState(lpg.runtime.IToken token) |
protected java.util.List<Choice> getPropertyChoices(C eClass)
eClass
- the eclass to get features fromprotected Choice createChoice(java.lang.String name, java.lang.String description, ChoiceKind kind, java.lang.Object element)
public static java.lang.String initialLower(java.lang.String name)
elem
ent with its initial character
in lower case.name
- a named elementprotected java.util.List<Choice> getChoices(OCLExpression<C> expression, ConstraintKind constraintType)
expression
- the AST node to check and return relevant syntax
help choices for.constraintType
- the type of constraint that we are completingChoice
s;
could be emptyprotected java.lang.String getDescription(java.lang.Object namedElement)
namedElement
- a named element presented to the user as a choicepublic java.util.List<Choice> getSyntaxHelp(ConstraintKind constraintType, java.lang.String txt)
context
classifier or operation.getSyntaxHelp
in interface OCLSyntaxHelper
constraintType
- the kind of constraint for which to get completion
suggestionstxt
- the string we got from client that contains the ocl expressionChoice
s representing the syntax help choices
for the user; could be emptyprotected OCLSyntaxHelper.ASTVisitor createASTVisitor(ConstraintKind constraintType, java.lang.String txt, int position)
protected boolean isOclIsInState(lpg.runtime.IToken token)