public class OCLSyntaxHelper<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> extends 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,
String txt,
int position) |
protected Choice |
createChoice(String name,
String description,
ChoiceKind kind,
Object element) |
protected List<Choice> |
getChoices(OCLExpression<C> expression,
ConstraintKind constraintType)
returns the syntax help choices applicable for the passed OCLExpression
|
protected String |
getDescription(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 List<Choice> |
getPropertyChoices(C eClass)
returns the choices list of structural features for the passed eclass
|
List<Choice> |
getSyntaxHelp(ConstraintKind constraintType,
String txt)
Gets syntax help choices for the specified
context
classifier or operation. |
static String |
initialLower(String name)
Gets the name of a named
element with its initial character
in lower case. |
protected boolean |
isOclIsInState(IToken token) |
protected List<Choice> getPropertyChoices(C eClass)
eClass - the eclass to get features fromprotected Choice createChoice(String name, String description, ChoiceKind kind, Object element)
public static String initialLower(String name)
element with its initial character
in lower case.elem - a named elementprotected 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 completingChoices;
could be emptyprotected String getDescription(Object namedElement)
namedElement - a named element presented to the user as a choicepublic List<Choice> getSyntaxHelp(ConstraintKind constraintType, String txt)
context
classifier or operation.getSyntaxHelp in interface OCLSyntaxHelperconstraintType - the kind of constraint for which to get completion
suggestionstxt - the string we got from client that contains the ocl expressioncontext - the context classifier or operation to use for the ocl
expression parsingChoices representing the syntax help choices
for the user; could be emptyprotected OCLSyntaxHelper.ASTVisitor createASTVisitor(ConstraintKind constraintType, String txt, int position)
protected boolean isOclIsInState(IToken token)
Copyright © 2015 Open eHealth Foundation. All rights reserved.