Class ElementDelta.Builder
java.lang.Object
org.eclipse.handly.model.impl.support.ElementDelta.Builder
- All Implemented Interfaces:
IElementDeltaBuilder
- Enclosing class:
- ElementDelta
Builds a tree of
ElementDelta
objects based on elementary changes.-
Constructor Summary
ConstructorDescriptionBuilder
(ElementDelta rootDelta) Constructs a delta tree builder on the given root delta. -
Method Summary
Modifier and TypeMethodDescriptionHas the same effect asadded(element, 0)
.Informs this builder that an element has been added.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.Informs this builder that an element has been changed.getDelta()
Returns the root delta instance specified in the constructor.markersChanged
(IElement element, org.eclipse.core.resources.IMarkerDelta[] markerDeltas) Informs this builder about changes to markers on the given element's corresponding resource.Informs this builder that an element has been removed as it has moved to a new location.Informs this builder that an element has been added as it has moved from an old location.Has the same effect asremoved(element, 0)
.Informs this builder that an element has been removed.
-
Constructor Details
-
Builder
Constructs a delta tree builder on the given root delta.- Parameters:
rootDelta
- notnull
-
-
Method Details
-
getDelta
Returns the root delta instance specified in the constructor.- Specified by:
getDelta
in interfaceIElementDeltaBuilder
- Returns:
- the root delta instance (never
null
)
-
added
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:
-
added
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
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:
-
removed
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
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
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
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
-