Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-compare-dev] structure comparison with content in non-leaf nodes

I'd like to create a structure comparer for a structure type that has
content in non-leaf nodes and need some advice.
As far as I see there are two problems with the compare framework regarding
content in non-leaf nodes:

a) The Differencer compares content only in leaf nodes

b) The StructureDiffViewer navigates between next/prev difference by just
selecting the next/pref leaf in the diff tree, assuming that exactly these
nodes represent the differences.

To work around these problems, I see the following alternatives:

1. Create a 'content node' as a leaf child node of an inner node with
content. This would probably solve a) and b), but with a degraded user
experience (more nodes, 'content node' sibling of the child nodes).

2. Subclass StructureDiffViewer, replace the next/prev diff navigation, use
preDiffHook to add a 'content node' to all inner nodes with content, use
postDiffHook to copy the diff kind in the 'content nodes' to their parent
and then remove the 'content nodes' from the diff tree.

3. Subclass StructureDiffViewer or one of its superclasses,  replace the
next/prev diff navigation, copy/overwrite lots of methods to be able to use
another Differencer.

I hope someone can point me to another (better) alternative than these.

Regads,
Rolf

----------------------------------------------------------------------------------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------






Back to the top