Class ElementDelta.Builder
- java.lang.Object
-
- org.eclipse.handly.model.impl.support.ElementDelta.Builder
-
- All Implemented Interfaces:
IElementDeltaBuilder
- Enclosing class:
- ElementDelta
public static class ElementDelta.Builder extends java.lang.Object implements IElementDeltaBuilder
Builds a tree ofElementDelta
objects based on elementary changes.
-
-
Constructor Summary
Constructors Constructor Description Builder(ElementDelta rootDelta)
Constructs a delta tree builder on the given root delta.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementDelta.Builder
added(IElement element)
Has the same effect asadded(element, 0)
.ElementDelta.Builder
added(IElement element, long flags)
Informs this builder that an element has been added.ElementDelta.Builder
addResourceDelta(IElement element, org.eclipse.core.resources.IResourceDelta resourceDelta)
Informs this builder about changes to children of the given element's corresponding resource that cannot be described in terms of element deltas.ElementDelta.Builder
changed(IElement element, long flags)
Informs this builder that an element has been changed.ElementDelta
getDelta()
Returns the root delta instance specified in the constructor.ElementDelta.Builder
markersChanged(IElement element, org.eclipse.core.resources.IMarkerDelta[] markerDeltas)
Informs this builder about changes to markers on the given element's corresponding resource.ElementDelta.Builder
movedFrom(IElement movedFromElement, IElement movedToElement)
Informs this builder that an element has been removed as it has moved to a new location.ElementDelta.Builder
movedTo(IElement movedToElement, IElement movedFromElement)
Informs this builder that an element has been added as it has moved from an old location.ElementDelta.Builder
removed(IElement element)
Has the same effect asremoved(element, 0)
.ElementDelta.Builder
removed(IElement element, long flags)
Informs this builder that an element has been removed.
-
-
-
Constructor Detail
-
Builder
public Builder(ElementDelta rootDelta)
Constructs a delta tree builder on the given root delta.- Parameters:
rootDelta
- notnull
-
-
Method Detail
-
getDelta
public ElementDelta getDelta()
Returns the root delta instance specified in the constructor.- Specified by:
getDelta
in interfaceIElementDeltaBuilder
- Returns:
- the root delta instance (never
null
)
-
added
public ElementDelta.Builder added(IElement element)
Description copied from interface:IElementDeltaBuilder
Has the same effect asadded(element, 0)
.- Specified by:
added
in interfaceIElementDeltaBuilder
- Parameters:
element
- the added element (notnull
)- Returns:
- this builder
- See Also:
IElementDeltaBuilder.added(IElement, long)
-
added
public ElementDelta.Builder added(IElement element, long flags)
Description copied from interface:IElementDeltaBuilder
Informs this builder that an element has been added.- Specified by:
added
in interfaceIElementDeltaBuilder
- Parameters:
element
- the added element (notnull
)flags
- delta flags- Returns:
- this builder
-
removed
public ElementDelta.Builder removed(IElement element)
Description copied from interface:IElementDeltaBuilder
Has the same effect asremoved(element, 0)
.- Specified by:
removed
in interfaceIElementDeltaBuilder
- Parameters:
element
- the removed element (notnull
)- Returns:
- this builder
- See Also:
IElementDeltaBuilder.removed(IElement, long)
-
removed
public ElementDelta.Builder removed(IElement element, long flags)
Description copied from interface:IElementDeltaBuilder
Informs this builder that an element has been removed.- Specified by:
removed
in interfaceIElementDeltaBuilder
- Parameters:
element
- the removed element (notnull
)flags
- delta flags- Returns:
- this builder
-
changed
public ElementDelta.Builder changed(IElement element, long flags)
Description copied from interface:IElementDeltaBuilder
Informs this builder that an element has been changed.- Specified by:
changed
in interfaceIElementDeltaBuilder
- Parameters:
element
- the changed element (notnull
)flags
- delta flags- Returns:
- this builder
-
movedFrom
public ElementDelta.Builder movedFrom(IElement movedFromElement, IElement movedToElement)
Description copied from interface:IElementDeltaBuilder
Informs this builder that an element has been removed as it has moved to a new location.- Specified by:
movedFrom
in interfaceIElementDeltaBuilder
- Parameters:
movedFromElement
- the element before it was moved to its current location (notnull
)movedToElement
- the element in its new location (notnull
)- Returns:
- this builder
-
movedTo
public ElementDelta.Builder movedTo(IElement movedToElement, IElement movedFromElement)
Description copied from interface:IElementDeltaBuilder
Informs this builder that an element has been added as it has moved from an old location.- Specified by:
movedTo
in interfaceIElementDeltaBuilder
- Parameters:
movedToElement
- the element in its new location (notnull
)movedFromElement
- the element before it was moved to its current location (notnull
)- Returns:
- this builder
-
markersChanged
public ElementDelta.Builder markersChanged(IElement element, org.eclipse.core.resources.IMarkerDelta[] markerDeltas)
Description copied from interface:IElementDeltaBuilder
Informs this builder about changes to markers on the given element's corresponding resource.- Specified by:
markersChanged
in interfaceIElementDeltaBuilder
- Parameters:
element
- the element with changed markers (notnull
)markerDeltas
- the marker deltas for the element (notnull
, not empty)- Returns:
- this builder
-
addResourceDelta
public ElementDelta.Builder addResourceDelta(IElement element, org.eclipse.core.resources.IResourceDelta resourceDelta)
Description copied from interface:IElementDeltaBuilder
Informs this builder about changes to children of the given element's corresponding resource that cannot be described in terms of element deltas.- Specified by:
addResourceDelta
in interfaceIElementDeltaBuilder
- Parameters:
element
- the element with a resource change (notnull
)resourceDelta
- the resource delta for the element (notnull
)- Returns:
- this builder
-
-