@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { editor.leave(before, after); }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { for (Editor editor : editors) { editor.leave(before, after); } }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { editor.leave(before, after); }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { editor.leave(before, after); }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { for (Editor editor : editors) { editor.leave(before, after); } }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { editor.leave(before, after); }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { editor.leave(before, after); }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { editor.leave(before, after); }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { editor.leave(before, after); }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { for (Editor editor : editors) { editor.leave(before, after); } if (parent == null){ rootState.progressReporter.logReport(); } }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { for (Editor editor : editors) { editor.leave(before, after); } if (parent == null){ rootState.progressReporter.logReport(); } }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { for (Editor editor : editors) { editor.leave(before, after); } if (parent == null){ rootState.progressReporter.logReport(); } }
/** * Validates and possibly edits the given subtree by diffing * and recursing through it. * * @param editor editor for the root of the subtree * @param before state of the original subtree * @param after state of the modified subtree * @return exception if the processing failed, {@code null} otherwise */ @Nullable public static CommitFailedException process( @Nullable Editor editor, @NotNull NodeState before, @NotNull NodeState after) { checkNotNull(before); checkNotNull(after); if (editor != null) { try { editor.enter(before, after); EditorDiff diff = new EditorDiff(editor); if (!after.compareAgainstBaseState(before, diff)) { return diff.exception; } editor.leave(before, after); } catch (CommitFailedException e) { return e; } } return null; }
@Override public void leave(NodeState before, NodeState after) throws CommitFailedException { listener.waitRandomly(); editor.leave(before, after); }
@Override public boolean childNodeChanged( String name, NodeState before, NodeState after) { try { Editor childEditor = editor.childNodeChanged(name, before, after); if (childEditor != null) { childEditor.enter(before, after); EditorDiff diff = new EditorDiff(childEditor); if (!after.compareAgainstBaseState(before, diff)) { exception = diff.exception; return false; } childEditor.leave(before, after); } return true; } catch (CommitFailedException e) { exception = e; return false; } }
@Override public boolean childNodeDeleted(String name, NodeState before) { try { NodeState after = MISSING_NODE; Editor childEditor = editor.childNodeDeleted(name, before); if (childEditor != null) { childEditor.enter(before, after); EditorDiff diff = new EditorDiff(childEditor); if (!after.compareAgainstBaseState(before, diff)) { exception = diff.exception; return false; } childEditor.leave(before, after); } return true; } catch (CommitFailedException e) { exception = e; return false; } }
@Override public boolean childNodeDeleted(String name, NodeState before) { try { NodeState after = MISSING_NODE; Editor childEditor = editor.childNodeDeleted(name, before); if (childEditor != null) { childEditor.enter(before, after); EditorDiff diff = new EditorDiff(childEditor); if (!after.compareAgainstBaseState(before, diff)) { exception = diff.exception; return false; } childEditor.leave(before, after); } return true; } catch (CommitFailedException e) { exception = e; return false; } }
@Override public boolean childNodeChanged( String name, NodeState before, NodeState after) { try { Editor childEditor = editor.childNodeChanged(name, before, after); if (childEditor != null) { childEditor.enter(before, after); EditorDiff diff = new EditorDiff(childEditor); if (!after.compareAgainstBaseState(before, diff)) { exception = diff.exception; return false; } childEditor.leave(before, after); } return true; } catch (CommitFailedException e) { exception = e; return false; } }
@Override public boolean childNodeAdded(String name, NodeState after) { try { NodeState before = MISSING_NODE; Editor childEditor = editor.childNodeAdded(name, after); // NOTE: This piece of code is duplicated across this and the // other child node diff methods. The reason for the duplication // is to simplify the frequently occurring long stack traces // in diff processing. if (childEditor != null) { childEditor.enter(before, after); EditorDiff diff = new EditorDiff(childEditor); if (!after.compareAgainstBaseState(before, diff)) { exception = diff.exception; return false; } childEditor.leave(before, after); } return true; } catch (CommitFailedException e) { exception = e; return false; } }
@Override public boolean childNodeAdded(String name, NodeState after) { try { NodeState before = MISSING_NODE; Editor childEditor = editor.childNodeAdded(name, after); // NOTE: This piece of code is duplicated across this and the // other child node diff methods. The reason for the duplication // is to simplify the frequently occurring long stack traces // in diff processing. if (childEditor != null) { childEditor.enter(before, after); EditorDiff diff = new EditorDiff(childEditor); if (!after.compareAgainstBaseState(before, diff)) { exception = diff.exception; return false; } childEditor.leave(before, after); } return true; } catch (CommitFailedException e) { exception = e; return false; } }