PropertyOptionsSource.TargetType tt = pos.getTargetType(); String expression = pos.getExpression(); PropertyOptionsSource.ExpressionScope expressionScope = pos.getExpressionScope(); String filter = pos.getFilter(); Pattern filterPattern = null; if (filter != null)
PropertyOptionsSource optionsSource = new PropertyOptionsSource(); OptionSource source = simpleProperty.getOptionSource(); optionsSource.setTarget(source.getTarget().toString()); optionsSource.setLinkToTarget(source.isLinkToTarget()); if (source.getFilter() != null && source.getFilter().length() > 40) { throw new IllegalArgumentException("Filter expression must be less than 40 chars long"); optionsSource.setFilter(source.getFilter()); ExpressionScope expressionScope = source.getExpressionScope(); if (expressionScope != null) { optionsSource.setExpressionScope(PropertyOptionsSource.ExpressionScope.fromValue(expressionScope .value())); if (expression.length() > 400) throw new IllegalArgumentException("Expression must be less than 400 chars long"); optionsSource.setExpression(expression); property.setOptionsSource(optionsSource);