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:
parent
2f8833f31d
commit
5cc8961aa0
2 changed files with 16 additions and 1 deletions
|
@ -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.
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue