Package com.google.eclipse.protobuf.protobuf

Examples of com.google.eclipse.protobuf.protobuf.ComplexType


  private void highlightPropertyType(MessageField field, IHighlightedPositionAcceptor acceptor) {
    TypeLink link = field.getType();
    if (!(link instanceof ComplexTypeLink)) {
      return;
    }
    ComplexType type = ((ComplexTypeLink) link).getTarget();
    if (type instanceof Message) {
      highlightFirstFeature(field, MESSAGE_FIELD__TYPE, acceptor, MESSAGE_ID);
      return;
    }
    if (type instanceof Enum) {
View Full Code Here


  public String typeNameOf(MessageField field) {
    ScalarType scalarType = scalarTypeOf(field);
    if (scalarType != null) {
      return scalarType.getName();
    }
    ComplexType complexType = typeOf(field);
    if (complexType != null) {
      return complexType.getName();
    }
    return null;
  }
View Full Code Here

  public Enum enumTypeOf(MessageField field) {
    return fieldType(field, Enum.class);
  }

  private <T extends ComplexType> T fieldType(MessageField field, Class<T> targetType) {
    ComplexType type = typeOf(field);
    if (targetType.isInstance(type)) {
      return targetType.cast(type);
    }
    return null;
  }
View Full Code Here

    TypeLink link = field.getType();
    if (link instanceof ScalarTypeLink) {
      return ((ScalarTypeLink) link).getTarget().getName();
    }
    if (link instanceof ComplexTypeLink) {
      ComplexType type = ((ComplexTypeLink) link).getTarget();
      return type == null ? null : type.getName();
    }
    return link.toString();
  }
View Full Code Here

TOP

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

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.