mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-02 13:55:39 +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;
|
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 {
|
public void accept(IPDOMVisitor visitor) throws CoreException {
|
||||||
// No children here.
|
// No children here.
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,11 @@ public class PDOMCStructure extends PDOMMemberOwner implements ICompositeType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSameType(IType type) {
|
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