Package org.eclipse.cdt.internal.core.dom.rewrite

Examples of org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationMap


  }

  public void pushScope(final IASTNode node) {
    final List<ASTModification> newMods = new ArrayList<ASTModification>();
    for (final ASTModification peekMod : scopeStack.peek()) {
      final ASTModificationMap nestedMods = modStore.getNestedModifications(peekMod);
      if (nestedMods != null) {
        newMods.addAll(nestedMods.getModificationsForNode(node));
      }
    }

    if (!newMods.isEmpty()) {
      scopeStack.addFirst(newMods);
View Full Code Here


      scopeStack.addFirst(newMods);
    }
  }

  private List<ASTModification> getNestedModifikationsForNode(final IASTNode node) {
    final ASTModificationMap rootModifications = modStore.getRootModifications();
    if (rootModifications == null) {
      return Collections.emptyList();
    }
    return rootModifications.getModificationsForNode(node);
  }
View Full Code Here

    if (aktModList == null) {
      return getNestedModifiedNodes();
    }
    final Collection<IASTNode> nodes = new ArrayList<IASTNode>();
    for (final ASTModification modification : aktModList) {
      final ASTModificationMap nestedModifications = modStore.getNestedModifications(modification);
      if (nestedModifications != null) {
        nodes.addAll(nestedModifications.getModifiedNodes());
      }
    }
    return Collections.unmodifiableCollection(nodes);
  }
View Full Code Here

    }
    return Collections.unmodifiableCollection(nodes);
  }

  private Collection<IASTNode> getNestedModifiedNodes() {
    final ASTModificationMap rootModifications = modStore.getRootModifications();
    if (rootModifications == null) {
      return Collections.emptyList();
    }
    return rootModifications.getModifiedNodes();
  }
View Full Code Here

    if (aktModList == null) {
      return getNestedModifikationsForNode(node);
    }
    final List<ASTModification> modForNodeList = new ArrayList<ASTModification>();
    for (final ASTModification modification : aktModList) {
      final ASTModificationMap nestedModifications = modStore.getNestedModifications(modification);
      if (nestedModifications != null) {
        modForNodeList.addAll(nestedModifications.getModificationsForNode(node));
      }
    }
    return Collections.unmodifiableList(modForNodeList);
  }
View Full Code Here

    subchange.setEdit(rootEdit);
    change.add(subchange);
  }

  private void classifyModifications() {
    final ASTModificationMap rootModifications = modificationStore.getRootModifications();
    if (rootModifications == null) {
      return;
    }

    for (final IASTNode node : rootModifications.getModifiedNodes()) {
      final List<ASTModification> modifications = rootModifications.getModificationsForNode(node);
      for (final ASTModification modification : modifications) {
        Map<ModificationKind, List<ASTModification>> map = classifiedModifications.get(node);
        if (map == null) {
          map = new TreeMap<ModificationKind, List<ASTModification>>();
          classifiedModifications.put(node, map);
View Full Code Here

TOP

Related Classes of org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationMap

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.