Examples of OptionSource


Examples of com.google.eclipse.protobuf.protobuf.OptionSource

   * this method will return the <code>{@link IndexedElement}</code> "myOption" is pointing to.
   * @param option the given option.
   * @return the {@code Property} the given option is referring to, or {@code null} if it cannot be found.
   */
  public IndexedElement rootSourceOf(AbstractOption option) {
    OptionSource source = modelObjects.valueOfFeature(option, "source", OptionSource.class);
    return source == null ? null : source.getTarget();
  }
View Full Code Here

Examples of org.rhq.core.clientapi.descriptor.configuration.OptionSource

            parsePropertyOptions(property, simpleProperty.getPropertyOptions());
        }

        if (simpleProperty.getOptionSource() != 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()));
            }
            String expression = source.getExpression();
            if (expression == null || expression.isEmpty())
                throw new IllegalArgumentException("Expression must not be empty");
            if (expression.length() > 400)
                throw new IllegalArgumentException("Expression must be less than 400 chars long");
            optionsSource.setExpression(expression);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.