Package org.eclipse.php.internal.core.filenetwork

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


    boolean status(final List<String> toks) {
        if (standaloneNodes.size() > 0) {
            out.println("Standalone Nodes:");
            for (String nodeName : standaloneNodes.keySet()) {
                Node node = standaloneNodes.get(nodeName);
                for (String curi : node.getInstalledContributions()) {
                    for (String dc : node.getDeployedComposites(curi)) {
                        out.println("   " + nodeName + " " + dc);
                    }
                }
            }
            out.println();
        }
        if (nodes.size() > 0) {
            for (Node node : nodes.values()) {
                out.println("Domain: " + node.getDomainName());
                List<String> ics;
                if (toks.size() > 1) {
                    ics = new ArrayList<String>();
                    ics.add(toks.get(1));
                } else {
                    ics = node.getInstalledContributions();
                }

                for (String curi : ics) {
                    Contribution c = node.getInstalledContribution(curi);
                    List<String> dcs = node.getDeployedComposites(curi);
                    if (toks.size() > 2) {
                        dcs = new ArrayList<String>();
                        dcs.add(toks.get(2));
                    } else {
                        dcs = node.getDeployedComposites(curi);
                    }
                    for (String compositeUri : dcs) {
                        for (Artifact a : c.getArtifacts()) {
                            if (compositeUri.equals(a.getURI())) {
                                out.println("   " + curi
View Full Code Here


    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

    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

  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

    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

    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

    }
  }

  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

        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

          }
        } 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

    for (Way way : waysById.values()) {
     
      List<WayNode> origWayNodes = way.getWayNodes();
      List<OSMNode> wayNodes = new ArrayList<OSMNode>(origWayNodes.size());
      for (WayNode origWayNode : origWayNodes) {
        Node origNode = nodesById.get(origWayNode.getNodeId());
        if (origNode != null) {
          wayNodes.add(nodeMap.get(origNode));
        }
      }
     
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.core.filenetwork.ReferenceTree$Node

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.