/** * Evaluates the title expression in the null context and returns the result. * * @return Returns an empty string or the title expression. */ private String getTitle() { IModelObject element = xidget.getConfig(); IExpression titleExpr = Xlate.childGet(element, "title", Xlate.get(element, "title", (IExpression) null)); if (titleExpr != null) return titleExpr.evaluateString(); return ""; }
/** * Returns the flags of the pattern. * * @param context The context of the evaluation. */ private int getFlags(IContext context) throws ExpressionException { IExpression arg3 = getArgument(3); if (arg3 == null) return 0; int result = 0; String flags = arg3.evaluateString(context); if (flags.contains("s")) result |= Pattern.DOTALL; if (flags.contains("m")) result |= Pattern.MULTILINE; if (flags.contains("i")) result |= Pattern.CASE_INSENSITIVE; if (flags.contains("x")) result |= Pattern.COMMENTS; return result; }
public void notifyRemove(IExpression expression, IContext context, List<IModelObject> nodes) { node = expression.queryFirst(context); ISliderWidgetFeature feature = xidget.getFeature(ISliderWidgetFeature.class); feature.setPrecision(Xlate.get(node, 1)); }
public static void main(String[] args) throws Exception { IExpression expr = XPath.createExpression("replace( 'abcabc', '(a)(.+)(a)', '$1$3')"); System.out.println("->" + expr.evaluateString(null)); }