Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Piskarev2015-01-19 08:42:22 +0000
committerVladimir Piskarev2015-01-19 08:46:13 +0000
commit0e849df8979c6654d1505cf5d190c887799f56a4 (patch)
tree546786ebb69ec61d4aa3b772d5d9024a9c33b93d
parent1b3ef05a13aa04b38547c54134cf1bbc3002d081 (diff)
downloadorg.eclipse.handly-0e849df8979c6654d1505cf5d190c887799f56a4.tar.gz
org.eclipse.handly-0e849df8979c6654d1505cf5d190c887799f56a4.tar.xz
org.eclipse.handly-0e849df8979c6654d1505cf5d190c887799f56a4.zip
Introduced factory method for HandleDelta in HandleDeltaBuilder
-rw-r--r--org.eclipse.handly/src/org/eclipse/handly/model/impl/HandleDeltaBuilder.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/org.eclipse.handly/src/org/eclipse/handly/model/impl/HandleDeltaBuilder.java b/org.eclipse.handly/src/org/eclipse/handly/model/impl/HandleDeltaBuilder.java
index 611b786a..a253d62c 100644
--- a/org.eclipse.handly/src/org/eclipse/handly/model/impl/HandleDeltaBuilder.java
+++ b/org.eclipse.handly/src/org/eclipse/handly/model/impl/HandleDeltaBuilder.java
@@ -89,7 +89,7 @@ public class HandleDeltaBuilder
*/
public final void buildDelta()
{
- delta = new HandleDelta(element);
+ delta = newDelta(element);
recordNewPositions(element, 0);
findAdditions(element, 0);
findDeletions();
@@ -118,6 +118,19 @@ public class HandleDeltaBuilder
}
/**
+ * Returns a new, initially empty delta for the given element.
+ *
+ * @param element the element that this delta describes a change to
+ * (not <code>null</code>)
+ * @return a new, initially empty delta for the given element
+ * (never <code>null</code>)
+ */
+ protected HandleDelta newDelta(IHandle element)
+ {
+ return new HandleDelta(element);
+ }
+
+ /**
* Finds whether the given element has had a content change.
* <p>
* Implementations can compare the given bodies (excepting children)

Back to the top