@Test public void testPropertyChanged() throws Exception { assertCommitProduces( lines( "p+ a+string <STRING> = a+string", "n!" ), root -> root.setProperty("a string", "a string") ); assertCommitProduces( lines("p^ a+string <STRING> = a+different+string", "n!" ), root -> root.setProperty("a string", "a different string") ); }
@Override public boolean propertyChanged(PropertyState before, PropertyState after) { writer.accept("p^ " + toString(after)); return true; }
LoggingHook implements CommitHook, NodeStateDiff { @Override public boolean propertyChanged(PropertyState before, PropertyState after) { writer.accept("p^ " + toString(after)); return true; } }
LoggingHook implements CommitHook, NodeStateDiff { @Override public boolean propertyChanged(PropertyState before, PropertyState after) { writer.accept("p^ " + toString(after)); return true; } private  LoggingHook(final Consumer<String> writer); }
LoggingHook implements CommitHook, NodeStateDiff { @Override public boolean propertyChanged(PropertyState before, PropertyState after) { writer.accept("p^ " + toString(after)); return true; } private  LoggingHook(final Consumer<String> writer); void enter(NodeState before, NodeState after); void leave(NodeState before, NodeState after); @Override boolean propertyAdded(PropertyState after); @Override boolean propertyChanged(PropertyState before, PropertyState after); @Override boolean propertyDeleted(PropertyState before); @Override boolean childNodeAdded(String name, NodeState after); @Override boolean childNodeChanged(String name, NodeState before, NodeState after); @Override boolean childNodeDeleted(String name, NodeState before); @NotNull @Override NodeState processCommit(NodeState before, NodeState after, CommitInfo info); }
LoggingHook implements CommitHook, NodeStateDiff { @Override public boolean propertyChanged(PropertyState before, PropertyState after) { writer.accept("p^ " + toString(after)); return true; } private  LoggingHook(final Consumer<String> writer); void enter(NodeState before, NodeState after); void leave(NodeState before, NodeState after); @Override boolean propertyAdded(PropertyState after); @Override boolean propertyChanged(PropertyState before, PropertyState after); @Override boolean propertyDeleted(PropertyState before); @Override boolean childNodeAdded(String name, NodeState after); @Override boolean childNodeChanged(String name, NodeState before, NodeState after); @Override boolean childNodeDeleted(String name, NodeState before); @NotNull @Override NodeState processCommit(NodeState before, NodeState after, CommitInfo info);  }