示例#1
0
 /**
  * Executes the updates. Resolving text node adjacency can be skipped if adjacent text nodes are
  * not to be expected.
  *
  * @param mergeTexts adjacent text nodes are to be expected and must be merged
  */
 public void execute(final boolean mergeTexts) {
   check();
   optimize();
   applyValueUpdates();
   if (cacheDistanceUpdates) data.cache = true;
   applyStructuralUpdates();
   updateDistances();
   if (mergeTexts) resolveTextAdjacency();
   data.cache = false;
 }
示例#2
0
 /**
  * Applies text node merges of the given list.
  *
  * @param mergeTexts list of atomic text node merging operations
  */
 private void mergeNodes(final AtomicUpdateList mergeTexts) {
   mergeTexts.check();
   mergeTexts.applyValueUpdates();
   mergeTexts.applyStructuralUpdates();
 }