Examples of ImportElement


Examples of com.google.dart.engine.element.ImportElement

   *          hints to
   */
  public void generateUnusedImportHints(ErrorReporter errorReporter) {
    for (ImportDirective unusedImport : unusedImports) {
      // Check that the import isn't dart:core
      ImportElement importElement = unusedImport.getElement();
      if (importElement != null) {
        LibraryElement libraryElement = importElement.getImportedLibrary();
        if (libraryElement != null && libraryElement.isDartCore()) {
          continue;
        }
      }
      errorReporter.reportErrorForNode(HintCode.UNUSED_IMPORT, unusedImport.getUri());
View Full Code Here

Examples of com.google.dart.engine.element.ImportElement

   */
  private Namespace computeNamespace(ImportDirective importDirective) {
    Namespace namespace = namespaceMap.get(importDirective);
    if (namespace == null) {
      // If the namespace isn't in the namespaceMap, then compute and put it in the map
      ImportElement importElement = importDirective.getElement();
      if (importElement != null) {
        NamespaceBuilder builder = new NamespaceBuilder();
        namespace = builder.createImportNamespaceForDirective(importElement);
        namespaceMap.put(importDirective, namespace);
      }
View Full Code Here

Examples of com.google.dart.engine.element.ImportElement

  }

  @Override
  public Void visitImportDirective(ImportDirective node) {
    checkForDeprecatedMemberUse(node.getUriElement(), node);
    ImportElement importElement = node.getElement();
    if (importElement != null) {
      if (importElement.isDeferred()) {
        checkForLoadLibraryFunction(node, importElement);
      }
    }
    return super.visitImportDirective(node);
  }
View Full Code Here

Examples of com.google.dart.engine.element.ImportElement

    return super.visitFunctionTypeAlias(node);
  }

  @Override
  public Void visitImportDirective(ImportDirective node) {
    ImportElement element = node.getElement();
    if (element != null) {
      LibraryElement impLibrary = element.getImportedLibrary();
      recordLibraryReference(node, impLibrary);
    }
    return super.visitImportDirective(node);
  }
View Full Code Here

Examples of com.google.dart.engine.element.ImportElement

    }
    if (isIdentifierInPrefixedIdentifier(node)) {
      return;
    }
    Element element = node.getStaticElement();
    ImportElement importElement = internalGetImportElement(
        libraryElement,
        null,
        element,
        importElementsMap);
    if (importElement != null) {
View Full Code Here

Examples of com.google.dart.engine.element.ImportElement

    return prefix;
  }

  @Override
  public LibraryElement getUriElement() {
    ImportElement element = getElement();
    if (element == null) {
      return null;
    }
    return element.getImportedLibrary();
  }
View Full Code Here

Examples of com.google.dart.engine.element.ImportElement

    return super.visitIfStatement(node);
  }

  @Override
  public Void visitImportDirective(ImportDirective node) {
    ImportElement importElement = node.getElement();
    if (importElement != null) {
      checkForImportDuplicateLibraryName(node, importElement);
      checkForImportInternalLibrary(node, importElement);
    }
    return super.visitImportDirective(node);
View Full Code Here

Examples of com.google.dart.engine.element.ImportElement

  @Override
  public Void visitImportDirective(ImportDirective node) {
    String uri = getStringValue(node.getUri());
    if (uri != null) {
      LibraryElement library = enclosingUnit.getLibrary();
      ImportElement importElement = findImport(
          library.getImports(),
          enclosingUnit.getContext().getSourceFactory().resolveUri(enclosingUnit.getSource(), uri),
          node.getPrefix());
      processElement(importElement);
    }
View Full Code Here

Examples of com.google.dart.engine.element.ImportElement

          prefixNode.setStaticElement(prefixElement);
          break;
        }
      }
    }
    ImportElement importElement = node.getElement();
    if (importElement != null) {
      // The element is null when the URI is invalid
      LibraryElement library = importElement.getImportedLibrary();
      if (library != null) {
        resolveCombinators(library, node.getCombinators());
      }
      setMetadata(importElement, node);
    }
View Full Code Here

Examples of com.google.dart.engine.element.ImportElement

  @Override
  public Void visitImportDirective(ImportDirective node) {
    String uri = getStringValue(node.getUri());
    if (uri != null) {
      LibraryElement library = enclosingUnit.getLibrary();
      ImportElement importElement = findImport(
          library.getImports(),
          enclosingUnit.getContext().getSourceFactory().resolveUri(enclosingUnit.getSource(), uri),
          node.getPrefix());
      node.setElement(importElement);
    }
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.