Package org.eclipse.jdt.internal.core.dom.rewrite.RewriteEventStore

Examples of org.eclipse.jdt.internal.core.dom.rewrite.RewriteEventStore.PropertyLocation


  private  void markAsMoveOrCopyTarget(ASTNode node, ASTNode newChild) {
    ASTNode source = (ASTNode)this.clonedNodes.get(newChild);
    if(source != null) {
      if(this.cloneDepth == 0) {
        PropertyLocation propertyLocation = this.eventStore.getPropertyLocation(source, RewriteEventStore.ORIGINAL);
        CopySourceInfo sourceInfo =
          this.eventStore.markAsCopySource(
            propertyLocation.getParent(),
            propertyLocation.getProperty(),
            source,
            false);
        this.nodeStore.markAsCopyTarget(newChild, sourceInfo);
      }
    } else if((newChild.getFlags() & ASTNode.ORIGINAL) != 0) {
      PropertyLocation propertyLocation = this.eventStore.getPropertyLocation(newChild, RewriteEventStore.ORIGINAL);
      CopySourceInfo sourceInfo =
        this.eventStore.markAsCopySource(
          propertyLocation.getParent(),
          propertyLocation.getProperty(),
          newChild,
          true);
      this.nodeStore.markAsCopyTarget(newChild, sourceInfo);
    }
  }
View Full Code Here


    }

    StructuralPropertyDescriptor property;
    ASTNode parent;
    if (RewriteEventStore.isNewNode(node)) { // remove a new node, bug 164862
      PropertyLocation location= this.eventStore.getPropertyLocation(node, RewriteEventStore.NEW);
      if (location != null) {
        property= location.getProperty();
        parent= location.getParent();
      } else {
        throw new IllegalArgumentException("Node is not part of the rewriter's AST"); //$NON-NLS-1$
      }
    } else {
      property= node.getLocationInParent();
View Full Code Here

    }

    StructuralPropertyDescriptor property;
    ASTNode parent;
    if (RewriteEventStore.isNewNode(node)) { // replace a new node, bug 164862
      PropertyLocation location= this.eventStore.getPropertyLocation(node, RewriteEventStore.NEW);
      if (location != null) {
        property= location.getProperty();
        parent= location.getParent();
      } else {
        throw new IllegalArgumentException("Node is not part of the rewriter's AST"); //$NON-NLS-1$
      }
    } else {
      property= node.getLocationInParent();
View Full Code Here

    }

    StructuralPropertyDescriptor property;
    ASTNode parent;
    if (RewriteEventStore.isNewNode(node)) { // remove a new node, bug 164862
      PropertyLocation location= this.eventStore.getPropertyLocation(node, RewriteEventStore.NEW);
      if (location != null) {
        property= location.getProperty();
        parent= location.getParent();
      } else {
        throw new IllegalArgumentException("Node is not part of the rewriter's AST"); //$NON-NLS-1$
      }
    } else {
      property= node.getLocationInParent();
View Full Code Here

    }

    StructuralPropertyDescriptor property;
    ASTNode parent;
    if (RewriteEventStore.isNewNode(node)) { // replace a new node, bug 164862
      PropertyLocation location= this.eventStore.getPropertyLocation(node, RewriteEventStore.NEW);
      if (location != null) {
        property= location.getProperty();
        parent= location.getParent();
      } else {
        throw new IllegalArgumentException("Node is not part of the rewriter's AST"); //$NON-NLS-1$
      }
    } else {
      property= node.getLocationInParent();
View Full Code Here

    }
   
    ASTNode source = (ASTNode)this.clonedNodes.get(newChild);
    if(source != null) {
      if(this.cloneDepth == 0) {
        PropertyLocation propertyLocation = this.eventStore.getPropertyLocation(source, RewriteEventStore.ORIGINAL);
        CopySourceInfo sourceInfo =
          this.eventStore.markAsCopySource(
            propertyLocation.getParent(),
            propertyLocation.getProperty(),
            source,
            false);
        this.nodeStore.markAsCopyTarget(newChild, sourceInfo);
      }
    } else if((newChild.getFlags() & ASTNode.ORIGINAL) != 0) {
      PropertyLocation propertyLocation = this.eventStore.getPropertyLocation(newChild, RewriteEventStore.ORIGINAL);
      CopySourceInfo sourceInfo =
        this.eventStore.markAsCopySource(
          propertyLocation.getParent(),
          propertyLocation.getProperty(),
          newChild,
          true);
      this.nodeStore.markAsCopyTarget(newChild, sourceInfo);
    }
  }
View Full Code Here

    }

    StructuralPropertyDescriptor property;
    ASTNode parent;
    if (RewriteEventStore.isNewNode(node)) { // remove a new node, bug 164862
      PropertyLocation location= this.eventStore.getPropertyLocation(node, RewriteEventStore.NEW);
      if (location != null) {
        property= location.getProperty();
        parent= location.getParent();
      } else {
        throw new IllegalArgumentException("Node is not part of the rewriter's AST"); //$NON-NLS-1$
      }
    } else {
      property= node.getLocationInParent();
View Full Code Here

    }

    StructuralPropertyDescriptor property;
    ASTNode parent;
    if (RewriteEventStore.isNewNode(node)) { // replace a new node, bug 164862
      PropertyLocation location= this.eventStore.getPropertyLocation(node, RewriteEventStore.NEW);
      if (location != null) {
        property= location.getProperty();
        parent= location.getParent();
      } else {
        throw new IllegalArgumentException("Node is not part of the rewriter's AST"); //$NON-NLS-1$
      }
    } else {
      property= node.getLocationInParent();
View Full Code Here

    }
   
    ASTNode source = (ASTNode)this.clonedNodes.get(newChild);
    if(source != null) {
      if(this.cloneDepth == 0) {
        PropertyLocation propertyLocation = this.eventStore.getPropertyLocation(source, RewriteEventStore.ORIGINAL);
        CopySourceInfo sourceInfo =
          this.eventStore.markAsCopySource(
            propertyLocation.getParent(),
            propertyLocation.getProperty(),
            source,
            false);
        this.nodeStore.markAsCopyTarget(newChild, sourceInfo);
      }
    } else if((newChild.getFlags() & ASTNode.ORIGINAL) != 0) {
      PropertyLocation propertyLocation = this.eventStore.getPropertyLocation(newChild, RewriteEventStore.ORIGINAL);
      CopySourceInfo sourceInfo =
        this.eventStore.markAsCopySource(
          propertyLocation.getParent(),
          propertyLocation.getProperty(),
          newChild,
          true);
      this.nodeStore.markAsCopyTarget(newChild, sourceInfo);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.core.dom.rewrite.RewriteEventStore.PropertyLocation

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.