Package org.aspectj.org.eclipse.jdt.internal.core

Examples of org.aspectj.org.eclipse.jdt.internal.core.SimpleDelta


    int newKind = newDelta.getKind();
    if (newKind == IJavaElementDelta.CHANGED) {
      addAffectedChildren(newDelta);
      return;
    }
    SimpleDelta existingDelta = (SimpleDelta)this.changes.get(importContainer);
    if (existingDelta != null) {
      switch (newKind) {
        case IJavaElementDelta.ADDED:
          if (existingDelta.getKind() == IJavaElementDelta.REMOVED) {
            // REMOVED then ADDED
            this.changes.remove(importContainer);
          }
          break;
        case IJavaElementDelta.REMOVED:
          if (existingDelta.getKind() == IJavaElementDelta.ADDED) {
            // ADDED then REMOVED
            this.changes.remove(importContainer);
          }
          break;
          // CHANGED handled above
      }
    } else {
      SimpleDelta delta = new SimpleDelta();
      switch (newKind) {
        case IJavaElementDelta.ADDED:
          delta.added();
          break;
        case IJavaElementDelta.REMOVED:
          delta.removed();
          break;
      }
      this.changes.put(importContainer, delta);
    }
  }
View Full Code Here


      this.changes.put(importContainer, delta);
    }
  }

  private void addChange(IImportDeclaration importDecl, IJavaElementDelta newDelta) {
    SimpleDelta existingDelta = (SimpleDelta)this.changes.get(importDecl);
    int newKind = newDelta.getKind();
    if (existingDelta != null) {
      switch (newKind) {
        case IJavaElementDelta.ADDED:
          if (existingDelta.getKind() == IJavaElementDelta.REMOVED) {
            // REMOVED then ADDED
            this.changes.remove(importDecl);
          }
          break;
        case IJavaElementDelta.REMOVED:
          if (existingDelta.getKind() == IJavaElementDelta.ADDED) {
            // ADDED then REMOVED
            this.changes.remove(importDecl);
          }
          break;
        // CHANGED cannot happen for import declaration
      }
    } else {
      SimpleDelta delta = new SimpleDelta();
      switch (newKind) {
        case IJavaElementDelta.ADDED:
          delta.added();
          break;
        case IJavaElementDelta.REMOVED:
          delta.removed();
          break;
      }
      this.changes.put(importDecl, delta);
    }
  }
View Full Code Here

  /*
   * Adds a change for the given type and the types it defines.
   */
  private void addChange(IType type, IJavaElementDelta newDelta) throws JavaModelException {
     int newKind = newDelta.getKind();
    SimpleDelta existingDelta = (SimpleDelta)this.changes.get(type);
    switch (newKind) {
      case IJavaElementDelta.ADDED:
        addTypeAddition(type, existingDelta);
        ArrayList allTypes = new ArrayList();
        getAllTypesFromElement(type, allTypes);
View Full Code Here

      // check whether the type addition affects the hierarchy
      String typeName = type.getElementName();
      if (this.hierarchy.hasSupertype(typeName)
          || this.hierarchy.subtypesIncludeSupertypeOf(type)
          || this.hierarchy.missingTypes.contains(typeName)) {
        SimpleDelta delta = new SimpleDelta();
        delta.added();
        this.changes.put(type, delta);
      }
    }
  }
View Full Code Here

          // ADDED then CHANGED: leave it as ADDED
          // REMOVED then CHANGED: should not happen
      }
    } else {
      // check whether the type change affects the hierarchy
      SimpleDelta typeDelta = null;
      if ((newFlags & IJavaElementDelta.F_SUPER_TYPES) != 0
          && this.hierarchy.includesTypeOrSupertype(type)) {
        typeDelta = new SimpleDelta();
        typeDelta.superTypes();
      }
      if ((newFlags & IJavaElementDelta.F_MODIFIERS) != 0
          && (this.hierarchy.hasSupertype(type.getElementName())
            || type.equals(this.hierarchy.focusType))) {
        if (typeDelta == null) {
          typeDelta = new SimpleDelta();
        }
        typeDelta.modifiers();
      }
      if (typeDelta != null) {
        this.changes.put(type, typeDelta);
      }
    }
View Full Code Here

          // REMOVED then REMOVED: should not happen
      }
    } else {
      // check whether the type removal affects the hierarchy
      if (this.hierarchy.contains(type)) {
        SimpleDelta typeDelta = new SimpleDelta();
        typeDelta.removed();
        this.changes.put(type, typeDelta);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.core.SimpleDelta

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.