Examples of CustomFieldOption


Examples of com.google.api.ads.dfp.v201306.CustomFieldOption

      // Set the ID of the drop-down custom field to create options for.
      Long customFieldId = Long.parseLong("INSERT_DROP_DOWN_CUSTOM_FIELD_ID_HERE");

      // Create custom field options.
      CustomFieldOption customFieldOption1 = new CustomFieldOption();
      customFieldOption1.setDisplayName("Approved");
      customFieldOption1.setCustomFieldId(customFieldId);

      CustomFieldOption customFieldOption2 = new CustomFieldOption();
      customFieldOption2.setDisplayName("Unapproved");
      customFieldOption2.setCustomFieldId(customFieldId);

      // Add custom field options.
      CustomFieldOption[] customFieldOptions =
          customFieldService.createCustomFieldOptions(new CustomFieldOption[] {customFieldOption1,
              customFieldOption2});
View Full Code Here

Examples of com.google.api.ads.dfp.v201308.CustomFieldOption

      // Set the ID of the drop-down custom field to create options for.
      Long customFieldId = Long.parseLong("INSERT_DROP_DOWN_CUSTOM_FIELD_ID_HERE");

      // Create custom field options.
      CustomFieldOption customFieldOption1 = new CustomFieldOption();
      customFieldOption1.setDisplayName("Approved");
      customFieldOption1.setCustomFieldId(customFieldId);

      CustomFieldOption customFieldOption2 = new CustomFieldOption();
      customFieldOption2.setDisplayName("Unapproved");
      customFieldOption2.setCustomFieldId(customFieldId);

      // Add custom field options.
      CustomFieldOption[] customFieldOptions =
          customFieldService.createCustomFieldOptions(new CustomFieldOption[] {customFieldOption1,
              customFieldOption2});
View Full Code Here

Examples of com.google.api.ads.dfp.v201311.CustomFieldOption

      // Set the ID of the drop-down custom field to create options for.
      Long customFieldId = Long.parseLong("INSERT_DROP_DOWN_CUSTOM_FIELD_ID_HERE");

      // Create custom field options.
      CustomFieldOption customFieldOption1 = new CustomFieldOption();
      customFieldOption1.setDisplayName("Approved");
      customFieldOption1.setCustomFieldId(customFieldId);

      CustomFieldOption customFieldOption2 = new CustomFieldOption();
      customFieldOption2.setDisplayName("Unapproved");
      customFieldOption2.setCustomFieldId(customFieldId);

      // Add custom field options.
      CustomFieldOption[] customFieldOptions =
          customFieldService.createCustomFieldOptions(new CustomFieldOption[] {customFieldOption1,
              customFieldOption2});
View Full Code Here

Examples of com.google.eclipse.protobuf.protobuf.CustomFieldOption

  //
  // enum PhoneType {
  //   HOME = 0 [(active) = true];
  // }
  @Test public void should_provide_fields_for_custom_field_option() {
    CustomFieldOption option = xtext.find("active", ")", CustomFieldOption.class);
    IScope scope = scopeProvider.scope_OptionSource_target(option.getSource(), reference);
    assertThat(descriptionsIn(scope), containAll("active", ".active"));
  }
View Full Code Here

Examples of com.google.eclipse.protobuf.protobuf.CustomFieldOption

  //   repeated group membership = 1 [(code) = 68] {
  //     required int64 groupId = 2;
  //   }
  // }
  @Test public void should_provide_fields_for_custom_option() {
    CustomFieldOption option = xtext.find("code", ")", CustomFieldOption.class);
    IScope scope = scopeProvider.scope_OptionSource_target(option.getSource(), reference);
    assertThat(descriptionsIn(scope), containAll("code", "proto.code", "google.proto.code", "com.google.proto.code",
                                                 ".com.google.proto.code",
                                                 "info", "proto.info", "google.proto.info", "com.google.proto.info",
                                                 ".com.google.proto.info"));
  }
View Full Code Here

Examples of com.google.eclipse.protobuf.protobuf.CustomFieldOption

  //
  // message Person {
  //   optional boolean active = 1 [(encoding) = 'UTF-8'];
  // }
  @Test public void should_return_source_of_field_option() {
    CustomFieldOption option = xtext.find("encoding", ")", CustomFieldOption.class);
    MessageField field = (MessageField) options.sourceOf(option);
    assertThat(field.getName(), equalTo("encoding"));
  }
View Full Code Here

Examples of com.google.eclipse.protobuf.protobuf.CustomFieldOption

  //
  // message Person {
  //   optional boolean active = 1 [(custom).count = 6];
  // }
  @Test public void should_return_source_of_field_in_field_option() {
    CustomFieldOption option = xtext.find("custom", ").", CustomFieldOption.class);
    MessageField field = (MessageField) options.sourceOf(option);
    assertThat(field.getName(), equalTo("count"));
  }
View Full Code Here

Examples of com.google.eclipse.protobuf.protobuf.CustomFieldOption

  //
  // message Test {
  //   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

Examples of com.google.eclipse.protobuf.protobuf.CustomFieldOption

  //
  // message Person {
  //   optional bool active = 1 [(type).(active) = true];
  // }
  @Test public void should_provide_message_fields_for_first_field_in_field_custom_option() {
    CustomFieldOption option = xtext.find("type", ")", CustomFieldOption.class);
    ExtensionOptionField codeOptionField = (ExtensionOptionField) option.getFields().get(0);
    IScope scope = scopeProvider.scope_OptionField_target(codeOptionField, reference);
    assertThat(descriptionsIn(scope), containAll("active", "com.google.proto.active", ".com.google.proto.active"));
  }
View Full Code Here

Examples of com.google.eclipse.protobuf.protobuf.CustomFieldOption

  //
  // message Person {
  //   optional boolean active = 1 [(type).code = 68];
  // }
  @Test public void should_provide_message_fields_for_first_field_in_field_custom_option() {
    CustomFieldOption option = xtext.find("type", ")", CustomFieldOption.class);
    MessageOptionField codeOptionField = (MessageOptionField) option.getFields().get(0);
    IScope scope = scopeProvider.scope_OptionField_target(codeOptionField, reference);
    Message typeMessage = xtext.find("Type", " {", Message.class);
    assertThat(descriptionsIn(scope), containAllFieldsIn(typeMessage));
  }
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.