Package com.google.dart.engine.error

Examples of com.google.dart.engine.error.AnalysisErrorWithProperties


   * @param node the node specifying the location of the error
   * @param arguments the arguments to the error, used to compose the error message
   */
  public AnalysisErrorWithProperties newErrorWithProperties(ErrorCode errorCode, AstNode node,
      Object... arguments) {
    return new AnalysisErrorWithProperties(
        source,
        node.getOffset(),
        node.getLength(),
        errorCode,
        arguments);
View Full Code Here


        newStrMember = prefix + "'" + missingOverridesArray[i].getDisplayName() + "'";
      }
      stringMembersArrayListSet.add(newStrMember);
    }
    String[] stringMembersArray = stringMembersArrayListSet.toArray(new String[stringMembersArrayListSet.size()]);
    AnalysisErrorWithProperties analysisError;
    if (stringMembersArray.length == 1) {
      analysisError = errorReporter.newErrorWithProperties(
          StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
          classNameNode,
          stringMembersArray[0]);
    } else if (stringMembersArray.length == 2) {
      analysisError = errorReporter.newErrorWithProperties(
          StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
          classNameNode,
          stringMembersArray[0],
          stringMembersArray[1]);
    } else if (stringMembersArray.length == 3) {
      analysisError = errorReporter.newErrorWithProperties(
          StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE,
          classNameNode,
          stringMembersArray[0],
          stringMembersArray[1],
          stringMembersArray[2]);
    } else if (stringMembersArray.length == 4) {
      analysisError = errorReporter.newErrorWithProperties(
          StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR,
          classNameNode,
          stringMembersArray[0],
          stringMembersArray[1],
          stringMembersArray[2],
          stringMembersArray[3]);
    } else {
      analysisError = errorReporter.newErrorWithProperties(
          StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS,
          classNameNode,
          stringMembersArray[0],
          stringMembersArray[1],
          stringMembersArray[2],
          stringMembersArray[3],
          stringMembersArray.length - 4);
    }
    analysisError.setProperty(ErrorProperty.UNIMPLEMENTED_METHODS, missingOverridesArray);
    errorReporter.reportError(analysisError);
    return true;
  }
View Full Code Here

TOP

Related Classes of com.google.dart.engine.error.AnalysisErrorWithProperties

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.