Klasse JavaElementDelta

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.SimpleDelta
org.aspectj.org.eclipse.jdt.internal.core.JavaElementDelta
Alle implementierten Schnittstellen:
IJavaElementDelta

public class JavaElementDelta extends SimpleDelta implements IJavaElementDelta
Siehe auch:
  • Felddetails

    • ignoreFromTests

      public boolean ignoreFromTests
  • Konstruktordetails

    • JavaElementDelta

      public JavaElementDelta(IJavaElement element)
      Creates the root delta. To create the nested delta hierarchies use the following convenience methods. The root delta can be created at any level (for example: project, package root, package fragment...).
      • added(IJavaElement)
      • changed(IJavaElement)
      • moved(IJavaElement, IJavaElement)
      • removed(IJavaElement)
      • renamed(IJavaElement, IJavaElement)
  • Methodendetails

    • addAffectedChild

      protected void addAffectedChild(JavaElementDelta child)
      Adds the child delta to the collection of affected children. If the child is already in the collection, walk down the hierarchy.
    • added

      public void added(IJavaElement element)
      Creates the nested deltas resulting from an add operation. Convenience method for creating add deltas. The constructor should be used to create the root delta and then an add operation should call this method.
    • added

      public void added(IJavaElement element, int flags)
    • addNewChild

      protected void addNewChild(JavaElementDelta child)
      Adds the new child delta to the collection of affected children.
    • addResourceDelta

      protected void addResourceDelta(org.eclipse.core.resources.IResourceDelta child)
      Adds the child delta to the collection of affected children. If the child is already in the collection, walk down the hierarchy.
    • changed

      public JavaElementDelta changed(IJavaElement element, int changeFlag)
      Creates the nested deltas resulting from a change operation. Convenience method for creating change deltas. The constructor should be used to create the root delta and then a change operation should call this method.
    • changedAST

      public void changedAST(CompilationUnit changedAST)
    • clearAffectedChildren

      protected void clearAffectedChildren()
      Clears the collection of affected children.
    • contentChanged

      public void contentChanged()
      Mark this delta as a content changed delta.
    • closed

      public void closed(IJavaElement element)
      Creates the nested deltas for a closed element.
    • createDeltaTree

      protected JavaElementDelta createDeltaTree(IJavaElement element, JavaElementDelta delta)
      Creates the nested delta deltas based on the affected element its delta, and the root of this delta tree. Returns the root of the created delta tree.
    • equalsAndSameParent

      protected static boolean equalsAndSameParent(IJavaElement e1, IJavaElement e2)
      Returns whether the two java elements are equals and have the same parent.
    • find

      protected JavaElementDelta find(IJavaElement e)
      Returns the JavaElementDelta for the given element in the delta tree, or null, if no delta for the given element is found.
    • findDescendant

      protected JavaElementDelta findDescendant(JavaElementDelta.Key key)
      Returns the descendant delta for the given key, or null, if no delta for the given key is found in the delta tree below this delta.
    • fineGrained

      public void fineGrained()
      Mark this delta as a fine-grained delta.
    • getAddedChildren

      public IJavaElementDelta[] getAddedChildren()
      Beschreibung aus Schnittstelle kopiert: IJavaElementDelta
      Returns deltas for the children that have been added.
      Angegeben von:
      getAddedChildren in Schnittstelle IJavaElementDelta
      Gibt zurück:
      deltas for the children that have been added
      Siehe auch:
    • getAffectedChildren

      public IJavaElementDelta[] getAffectedChildren()
      Beschreibung aus Schnittstelle kopiert: IJavaElementDelta
      Returns deltas for the affected (added, removed, or changed) children.
      Angegeben von:
      getAffectedChildren in Schnittstelle IJavaElementDelta
      Gibt zurück:
      deltas for the affected (added, removed, or changed) children
      Siehe auch:
    • getCompilationUnitAST

      public CompilationUnit getCompilationUnitAST()
      Beschreibung aus Schnittstelle kopiert: IJavaElementDelta
      Returns the compilation unit AST created by the last reconcile operation on this delta's element. This returns a non-null value if and only if:
      Angegeben von:
      getCompilationUnitAST in Schnittstelle IJavaElementDelta
      Gibt zurück:
      the AST created during the last reconcile operation
      Siehe auch:
    • getAnnotationDeltas

      public IJavaElementDelta[] getAnnotationDeltas()
      Beschreibung aus Schnittstelle kopiert: IJavaElementDelta
      Returns deltas for affected annotations (added, removed, or changed). Returns an empty array if no annotations was affected, or if this delta's element is not an IAnnotatable.
      Angegeben von:
      getAnnotationDeltas in Schnittstelle IJavaElementDelta
      Gibt zurück:
      deltas for affected annotations (added, removed, or changed)
    • getChangedChildren

      public IJavaElementDelta[] getChangedChildren()
      Beschreibung aus Schnittstelle kopiert: IJavaElementDelta
      Returns deltas for the children which have changed.
      Angegeben von:
      getChangedChildren in Schnittstelle IJavaElementDelta
      Gibt zurück:
      deltas for the children which have changed
      Siehe auch:
    • getChildIndex

      protected Integer getChildIndex(JavaElementDelta.Key key)
      Returns the index of the delta in the collection of affected children, or null if the child delta for the given key is not found.
    • getChildrenOfType

      protected IJavaElementDelta[] getChildrenOfType(int type)
      Siehe auch:
    • getDeltaFor

      protected JavaElementDelta getDeltaFor(IJavaElement element)
      Returns the delta for a given element. Only looks below this delta.
    • getElement

      public IJavaElement getElement()
      Beschreibung aus Schnittstelle kopiert: IJavaElementDelta
      Returns the element that this delta describes a change to.
      Angegeben von:
      getElement in Schnittstelle IJavaElementDelta
      Gibt zurück:
      the element that this delta describes a change to
      Siehe auch:
    • getMovedFromElement

      public IJavaElement getMovedFromElement()
      Beschreibung aus Schnittstelle kopiert: IJavaElementDelta
      Returns an element describing this element before it was moved to its current location, or null if the IJavaElementDelta.F_MOVED_FROM change flag is not set.
      Angegeben von:
      getMovedFromElement in Schnittstelle IJavaElementDelta
      Gibt zurück:
      an element describing this element before it was moved to its current location, or null if the IJavaElementDelta.F_MOVED_FROM change flag is not set
      Siehe auch:
    • getMovedToElement

      public IJavaElement getMovedToElement()
      Beschreibung aus Schnittstelle kopiert: IJavaElementDelta
      Returns an element describing this element in its new location, or null if the IJavaElementDelta.F_MOVED_TO change flag is not set.
      Angegeben von:
      getMovedToElement in Schnittstelle IJavaElementDelta
      Gibt zurück:
      an element describing this element in its new location, or null if the IJavaElementDelta.F_MOVED_TO change flag is not set
      Siehe auch:
    • getRemovedChildren

      public IJavaElementDelta[] getRemovedChildren()
      Beschreibung aus Schnittstelle kopiert: IJavaElementDelta
      Returns deltas for the children which have been removed.
      Angegeben von:
      getRemovedChildren in Schnittstelle IJavaElementDelta
      Gibt zurück:
      deltas for the children which have been removed
      Siehe auch:
    • getResourceDeltas

      public org.eclipse.core.resources.IResourceDelta[] getResourceDeltas()
      Return the collection of resource deltas. Return null if none.
      Angegeben von:
      getResourceDeltas in Schnittstelle IJavaElementDelta
      Gibt zurück:
      the underlying resource deltas, or null if none
    • growAndAddToArray

      protected IJavaElementDelta[] growAndAddToArray(IJavaElementDelta[] array, IJavaElementDelta addition)
      Adds the new element to a new array that contains all of the elements of the old array. Returns the new array.
    • insertDeltaTree

      protected void insertDeltaTree(IJavaElement element, JavaElementDelta delta)
      Creates the delta tree for the given element and delta, and then inserts the tree as an affected child of this node.
    • movedFrom

      public void movedFrom(IJavaElement movedFromElement, IJavaElement movedToElement)
      Creates the nested deltas resulting from an move operation. Convenience method for creating the "move from" delta. The constructor should be used to create the root delta and then the move operation should call this method.
    • movedTo

      public void movedTo(IJavaElement movedToElement, IJavaElement movedFromElement)
      Creates the nested deltas resulting from an move operation. Convenience method for creating the "move to" delta. The constructor should be used to create the root delta and then the move operation should call this method.
    • opened

      public void opened(IJavaElement element)
      Creates the nested deltas for an opened element.
    • removeAffectedChild

      protected void removeAffectedChild(JavaElementDelta child)
      Removes the child delta from the collection of affected children.
    • removeAndShrinkArray

      protected IJavaElementDelta[] removeAndShrinkArray(IJavaElementDelta[] old, int index)
      Removes the element from the array. Returns the a new array which has shrunk.
    • removed

      public void removed(IJavaElement element)
      Creates the nested deltas resulting from an delete operation. Convenience method for creating removed deltas. The constructor should be used to create the root delta and then the delete operation should call this method.
    • removed

      public void removed(IJavaElement element, int flags)
    • removeExistingChild

      protected void removeExistingChild(JavaElementDelta.Key key, int index)
      Removes the existing child delta from the collection of affected children.
    • sourceAttached

      public void sourceAttached(IJavaElement element)
      Creates the nested deltas resulting from a change operation. Convenience method for creating change deltas. The constructor should be used to create the root delta and then a change operation should call this method.
    • sourceDetached

      public void sourceDetached(IJavaElement element)
      Creates the nested deltas resulting from a change operation. Convenience method for creating change deltas. The constructor should be used to create the root delta and then a change operation should call this method.
    • toDebugString

      public String toDebugString(int depth)
      Returns a string representation of this delta's structure suitable for debug purposes.
      Siehe auch:
    • toDebugString

      protected boolean toDebugString(StringBuffer buffer, int flags)
      Setzt außer Kraft:
      toDebugString in Klasse SimpleDelta
    • toString

      public String toString()
      Returns a string representation of this delta's structure suitable for debug purposes.
      Setzt außer Kraft:
      toString in Klasse SimpleDelta
    • getClasspathAttributeDeltas

      public IClasspathAttributeDelta[] getClasspathAttributeDeltas()
      Beschreibung aus Schnittstelle kopiert: IJavaElementDelta
      Returns deltas for affected attributes (added, removed, or changed). Returns an empty array if no attribute was affected, or if this delta's element is not for an affected IClasspathEntry.
      Angegeben von:
      getClasspathAttributeDeltas in Schnittstelle IJavaElementDelta
      Gibt zurück:
      deltas for affected attributes (added, removed, or changed)