Examples of ReferenceTree


Examples of com.sun.source.doctree.ReferenceTree

        return super.visitSince(tree, ignore);
    }

    @Override
    public Void visitThrows(ThrowsTree tree, Void ignore) {
        ReferenceTree exName = tree.getExceptionName();
        Element ex = env.trees.getElement(new DocTreePath(getCurrentPath(), exName));
        if (ex == null) {
            env.messages.error(REFERENCE, tree, "dc.ref.not.found");
        } else if (isThrowable(ex.asType())) {
            switch (env.currElement.getKind()) {
View Full Code Here

Examples of com.sun.source.doctree.ReferenceTree

            env.messages.error(SYNTAX, tree, "dc.tag.unknown", tagName);
    }

    @Override
    public Void visitValue(ValueTree tree, Void ignore) {
        ReferenceTree ref = tree.getReference();
        if (ref == null || ref.getSignature().isEmpty()) {
            if (!isConstant(env.currElement))
                env.messages.error(REFERENCE, tree, "dc.value.not.allowed.here");
        } else {
            Element e = env.trees.getElement(new DocTreePath(getCurrentPath(), ref));
            if (!isConstant(e))
View Full Code Here

Examples of org.eclipse.php.internal.core.filenetwork.ReferenceTree

    return "/" + PROJECT + "/" + projectRelativePath;
  }

  public void testReferencingFiles() throws Exception {
    ISourceModule sourceModule = getSourceModule(getFilePath("test1/a.php"));
    ReferenceTree tree = FileNetworkUtility.buildReferencingFilesTree(
        sourceModule, null);
    assertContents(getSavedHierarchy("test1"), tree.toString());
  }
View Full Code Here

Examples of org.eclipse.php.internal.core.filenetwork.ReferenceTree

    assertContents(getSavedHierarchy("test1"), tree.toString());
  }

  public void testReferencedFiles() throws Exception {
    ISourceModule sourceModule = getSourceModule(getFilePath("test2/a.php"));
    ReferenceTree tree = FileNetworkUtility.buildReferencedFilesTree(
        sourceModule, null);
    assertContents(getSavedHierarchy("test2"), tree.toString());
  }
View Full Code Here

Examples of org.eclipse.php.internal.core.filenetwork.ReferenceTree

  public void testCachedReferencedFiles() throws Exception {
    ISourceModule sourceModule = getSourceModule(getFilePath("test2/a.php"));
    HashMap<ISourceModule, Node> cache = new HashMap<ISourceModule, Node>();

    ReferenceTree tree = FileNetworkUtility.buildReferencedFilesTree(
        sourceModule, cache, null);
    tree = FileNetworkUtility.buildReferencedFilesTree(sourceModule, cache,
        null);
    assertContents(getSavedHierarchy("test2"), tree.toString());
  }
View Full Code Here

Examples of org.eclipse.php.internal.core.filenetwork.ReferenceTree

    final ISourceModule sourceModule = (ISourceModule) DLTKCore
        .create(file);
    perfMonitor.execute("PerformanceTests.testReferencingfiles" + "_"
        + fileName, new Operation() {
      public void run() throws Exception {
        ReferenceTree tree = FileNetworkUtility
            .buildReferencingFilesTree(sourceModule, null);
        System.out.println(tree.toString());
      }
    }, 1, 10);
  }
View Full Code Here

Examples of org.eclipse.php.internal.core.filenetwork.ReferenceTree

    final ISourceModule sourceModule = (ISourceModule) DLTKCore
        .create(file);
    perfMonitor.execute("PerformanceTests.testReferencedfiles" + "_"
        + fileName, new Operation() {
      public void run() throws Exception {
        ReferenceTree tree = FileNetworkUtility
            .buildReferencedFilesTree(sourceModule, null);
        System.out.println(tree.toString());
      }
    }, 1, 10);
  }
View Full Code Here

Examples of org.eclipse.php.internal.core.filenetwork.ReferenceTree

    }
  }

  private IDLTKSearchScope createSearchScopeWithReferencedFiles(
      ISourceModule sourceModule) {
    ReferenceTree tree = FileNetworkUtility.buildReferencedFilesTree(
        sourceModule, null);
    Set<ISourceModule> list = new HashSet<ISourceModule>();
    list.add(sourceModule);
    if (tree != null && tree.getRoot() != null) {
      Collection<Node> allIncludedNodes = tree.getRoot().getChildren();
      if (allIncludedNodes != null) {
        getNodeChildren(tree.getRoot(), list);
      }
    }
    return BasicSearchEngine.createSearchScope(
        list.toArray(new ISourceModule[list.size()]),
        DLTKLanguageManager.getLanguageToolkit(sourceModule));
View Full Code Here

Examples of org.eclipse.php.internal.core.filenetwork.ReferenceTree

        if (sourceModule.equals(element.getOpenable())) {
          filteredElements.add(element);
        }
      }
      if (filteredElements.size() == 0) {
        ReferenceTree referenceTree;
        if (cache != null) {
          referenceTree = cache.getFileHierarchy(sourceModule,
              monitor);
        } else {
          // Filter by includes network
          referenceTree = FileNetworkUtility
              .buildReferencedFilesTree(sourceModule, monitor);
        }
        for (T element : elements) {
          if (LanguageModelInitializer
              .isLanguageModelElement(element)
              || referenceTree.find(((ModelElement) element)
                  .getSourceModule())) {
            filteredElements.add(element);
          }
        }
      }
View Full Code Here

Examples of org.eclipse.php.internal.core.filenetwork.ReferenceTree

          }
        } catch (ModelException e) {
        }
      }
      if (filteredElements.size() == 0) {
        ReferenceTree referenceTree;
        if (cache != null) {
          referenceTree = cache.getFileHierarchy(sourceModule,
              monitor);
        } else {
          // Filter by includes network
          referenceTree = FileNetworkUtility
              .buildReferencedFilesTree(sourceModule, monitor);
        }
        for (T element : elements) {
          if (LanguageModelInitializer
              .isLanguageModelElement(element)
              || referenceTree.find(((ModelElement) element)
                  .getSourceModule())) {
            try {
              if ((isNs
                  && PHPFlags.isNamespace(((IType) element)
                      .getFlags()) || !isNs
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.