Community
Participate
Working Groups
Currently, the class ElementDelta provides methods for building a delta tree (their names start with 'hInsert'). Probably, it would be better to provide a separate Builder class for this functionality and thus separate delta accessing/building API. A further advantage is that methods of the Builder class will not need to follow a certain naming convention (like the 'hInsert' prefix). We'll need to rename the existing ElementDeltaBuilder class to something like ElementDifferencer to set it apart from the newly introduced ElementDelta.Builder.
Pushed to master: http://git.eclipse.org/c/handly/org.eclipse.handly.git/commit/?id=4a409d131ac39cb6f22d0cdd2db4dc52e98bcecb
A typical usage pattern for the new builder API ElementDelta.Builder builder = new ElementDelta.Builder(new ElementDelta(root)); builder.changed(file1, F_CONTENT); builder.added(file2); ElementDelta delta = builder.getDelta(); For a comprehensive example of use, see the class FooDeltaProcessor in the Basic Example. The old API methods for building a delta tree (ElementDelta#hInsertXXX) were removed. The class ElementDeltaBuilder was renamed to ElementDifferencer and its constructors now take ElementDelta.Builder. See the class FooFile.NotifyingReconcileOperation in the Basic Example for a typical usage pattern.