Search in sources :

Example 6 with FunctionDescriptor

use of org.csstudio.autocomplete.parser.FunctionDescriptor in project yamcs-studio by yamcs.

the class FormulaContentParser method handlePV.

private void handlePV(ExprPV pv) {
    String name = pv.getName();
    if (!name.endsWith("'")) {
        String value = name.substring(1);
        int startIndex = contentToParse.length() - value.length() + 1;
        currentToken = new FunctionDescriptor();
        currentToken.setValue(value);
        currentToken.setStartIndex(startIndex);
        currentToken.setContentType(ContentType.PV);
        currentToken.setReplay(true);
    }
}
Also used : FunctionDescriptor(org.csstudio.autocomplete.parser.FunctionDescriptor)

Aggregations

FunctionDescriptor (org.csstudio.autocomplete.parser.FunctionDescriptor)6 AutoCompleteResult (org.csstudio.autocomplete.AutoCompleteResult)2 Proposal (org.csstudio.autocomplete.proposals.Proposal)2 Matcher (java.util.regex.Matcher)1 Pattern (java.util.regex.Pattern)1 Expr (org.csstudio.autocomplete.parser.engine.expr.Expr)1 FormulaFunction (org.diirt.datasource.formula.FormulaFunction)1 FormulaFunctionSet (org.diirt.datasource.formula.FormulaFunctionSet)1