1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

Fix 139787 - Implement a simple isSameType for PDOMCStructure and an equals for PDOMNode.

This commit is contained in:
Doug Schaefer 2006-05-04 15:37:21 +00:00
parent 2f8833f31d
commit 5cc8961aa0
2 changed files with 16 additions and 1 deletions

View file

@ -69,6 +69,17 @@ public abstract class PDOMNode implements IPDOMNode{
return record;
}
public boolean equals(Object obj) {
if (obj == this)
return true;
if (obj instanceof PDOMNode) {
PDOMNode other = (PDOMNode)obj;
return pdom.equals(other.pdom) && record == other.record;
}
return super.equals(obj);
}
public void accept(IPDOMVisitor visitor) throws CoreException {
// No children here.
}

View file

@ -66,7 +66,11 @@ public class PDOMCStructure extends PDOMMemberOwner implements ICompositeType {
}
public boolean isSameType(IType type) {
throw new PDOMNotImplementedError();
if (equals(type))
return true;
else
// TODO - see if it matches
return false;
}
}