Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Problem with org.eclipse.compare.structuremergeviewer.differencer
Problem with org.eclipse.compare.structuremergeviewer.differencer [message #289812] Thu, 11 August 2005 04:16
Steve Jerman is currently offline Steve JermanFriend
Messages: 26
Registered: July 2009
Junior Member
Hi,

I am trying to write a structure compare utility for that can compare
two UMl2 files and show differences (show some but ignore others...). I
seem to have run into an issue.

I generate two structures which get passed into the differencer.. in the
Traverse method, the differencer uses hashmaps to store it's workings
.... like:

if (rightChildren != null) {
rightSet= new HashMap(10);
for (int i= 0; i < rightChildren.length; i++) {
Object rightChild= rightChildren[i];
rightSet.put(rightChild, rightChild);
allSet.add(rightChild);
}
}

if (leftChildren != null) {
leftSet= new HashMap(10);
for (int i= 0; i < leftChildren.length; i++) {
Object leftChild= leftChildren[i];
leftSet.put(leftChild, leftChild);
allSet.add(leftChild);
}
}

Now the the problem is that it never 'sees' the right side and left
sides as the same... 'cos the HashMap keys are different (of course they
are ... they are different instances.

Am I missing something. I assume that I might be generating the
IStructureComparators wrongly, but I'm scratching my head as to how to
get past this Hashmap operation.

Anyone any ideas? How can I make different instances of
IStructureComparator have the same hashvalue?

Steve
Previous Topic:Eclipse 3.1 Shutting Down after Idle (I Think)
Next Topic:Refactor-rename of XML based resources
Goto Forum:
  


Current Time: Fri Apr 26 10:56:15 GMT 2024

Powered by FUDForum. Page generated in 0.02472 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top