Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366228

Summary: CTypedef and CStructure doesn't implement the toString method
Product: [Tools] CDT Reporter: Otavio Pontes <obusatto>
Component: cdt-coreAssignee: Sergey Prigogin <eclipse.sprigogin>
Status: RESOLVED FIXED QA Contact: Doug Schaefer <cdtdoug>
Severity: minor    
Priority: P3 CC: eclipse.sprigogin
Version: 8.1.0   
Target Milestone: 8.1.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
patch to implement the proposed toString methods none

Description Otavio Pontes CLA 2011-12-09 12:40:51 EST
CTypedef and CStructure classes don't contain the toString method, so when I try to use println to print them to the console it uses the toString method from Object class.
I propose implementing a toString method like the one found in several classes that implements IType interface, like CVariable, CPointerType, CLabel.
Comment 1 Otavio Pontes CLA 2011-12-09 12:43:44 EST
Created attachment 208182 [details]
patch to implement the proposed toString methods
Comment 2 Sergey Prigogin CLA 2011-12-09 13:53:13 EST
I've added toString methods to CTypedef and CStructure, CVariable, CLabel, CPPLabel. Some of them may be different from the patch in attachment 208182 [details].