Package com.google.eclipse.protobuf.protobuf

Examples of com.google.eclipse.protobuf.protobuf.ComplexValue


  //     value: { name: "Error" },
  //   };
  // }
  @Test public void should_support_comma_after_each_option_field() {
    CustomOption option = xtext.find("values", ")", CustomOption.class);
    ComplexValue value = (ComplexValue) option.getValue();
    List<ValueField> fields = value.getFields();
    assertThat(fields.size(), equalTo(3));
  }
View Full Code Here


  //   optional string name = 1 [(fileopt) = {}];
  // }
  @Test public void should_allow_empty_braces_as_value() {
    CustomFieldOption option = xtext.find("fileopt", ")", CustomFieldOption.class);
    Value value = option.getValue();
    ComplexValue complexValue = value instanceof ComplexValue ? (ComplexValue) value : null;
    assertTrue(complexValue != null && complexValue.getFields().isEmpty());
  }
View Full Code Here

  }

  @Override public void completeSimpleValueField_Name(EObject model, Assignment assignment,
      ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    if (model instanceof ComplexValue) {
      ComplexValue value = (ComplexValue) model;
      proposeAndAccept(scopeProvider().potentialNormalFieldNames(value), "%s:", null, context, acceptor);
      proposeAndAccept(scopeProvider().potentialExtensionFieldNames(value), "[%s]:", "[%s]", context, acceptor);
    }
  }
View Full Code Here

  public IScope scope_FieldName_target(FieldName name, EReference r) {
    return createScope(findSources(name));
  }

  private Collection<IEObjectDescription> findSources(FieldName name) {
    ComplexValue value = container(name);
    if (value == null) {
      return emptySet();
    }
    if (name instanceof NormalFieldName) {
      return potentialNormalFieldNames(value);
View Full Code Here

TOP

Related Classes of com.google.eclipse.protobuf.protobuf.ComplexValue

Copyright © 2018 www.massapicom. 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.