mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Added toString() method to type classes to make debugging easier.
This commit is contained in:
parent
4303b04ddb
commit
8f15241d85
9 changed files with 72 additions and 25 deletions
|
@ -14,6 +14,7 @@
|
|||
*/
|
||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.IBasicType;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
|
@ -128,4 +129,8 @@ public class CPPBasicType implements ICPPBasicType {
|
|||
public int getQualifierBits() {
|
||||
return qualifierBits;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ASTTypeUtil.getType(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
*/
|
||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTPointer;
|
||||
import org.eclipse.cdt.core.dom.ast.IPointerType;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
|
@ -113,4 +114,8 @@ public class CPPPointerType implements IPointerType, ITypeContainer {
|
|||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ASTTypeUtil.getType(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
package org.eclipse.cdt.internal.core.index.composite;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
|
||||
|
@ -26,4 +27,11 @@ public class CompositeTypeContainer extends CompositeType implements ITypeContai
|
|||
return cf.getCompositeType((IIndexType)((ITypeContainer)type).getType());
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
try {
|
||||
return ASTTypeUtil.getType(getType());
|
||||
} catch (DOMException e) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
package org.eclipse.cdt.internal.core.pdom.dom;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IPointerType;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
|
@ -144,4 +145,8 @@ public class PDOMPointerType extends PDOMNode implements IPointerType,
|
|||
linkage.deleteType(getType(), record);
|
||||
super.delete(linkage);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ASTTypeUtil.getType(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
package org.eclipse.cdt.internal.core.pdom.dom;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IQualifierType;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
|
@ -158,4 +159,8 @@ public class PDOMQualifierType extends PDOMNode implements IQualifierType, ICQua
|
|||
linkage.deleteType(getType(), record);
|
||||
super.delete(linkage);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ASTTypeUtil.getType(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
package org.eclipse.cdt.internal.core.pdom.dom.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.IBasicType;
|
||||
|
@ -164,4 +165,8 @@ class PDOMCPPBasicType extends PDOMNode implements ICPPBasicType, IIndexType {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ASTTypeUtil.getType(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.Set;
|
|||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.IPDOMNode;
|
||||
import org.eclipse.cdt.core.dom.IPDOMVisitor;
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
|
@ -431,4 +432,7 @@ class PDOMCPPClassType extends PDOMCPPBinding implements ICPPClassType,
|
|||
return new CPPClassTypeDelegate(name, this);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ASTTypeUtil.getType(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.pdom.dom.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
|
||||
import org.eclipse.cdt.internal.core.pdom.PDOM;
|
||||
|
@ -68,4 +69,8 @@ public class PDOMCPPFunctionType extends PDOMCFunctionType implements ICPPFuncti
|
|||
public int getNodeType() {
|
||||
return PDOMCPPLinkage.CPP_FUNCTION_TYPE;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ASTTypeUtil.getType(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
package org.eclipse.cdt.internal.core.pdom.dom.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
import org.eclipse.cdt.core.dom.ast.ITypedef;
|
||||
|
@ -108,4 +109,8 @@ class PDOMCPPReferenceType extends PDOMNode implements ICPPReferenceType,
|
|||
linkage.deleteType(getType(), record);
|
||||
super.delete(linkage);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ASTTypeUtil.getType(this);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue