Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] CModel (DOM/AST ?) does not know methods?

Yes, the CModel isn't very smart about this at the moment. IMethods show up
when you declare a method inside the class definition. The CModel is meant
to be quickly and without parsing header files so it can't make the
connection between MyClass to the class definition (without context, it
could also be interpreted as a namespace).

Sounds like a good bug report to raise. My hope in 4.0 is to move the CModel
on top of the DOM so that we can get better context information.

Doug Schaefer, QNX Software Systems
Eclipse CDT Project Lead, Tools PMC member
http://cdtdoug.blogspot.com
 

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On
Behalf Of Sascha Radike
Sent: Tuesday, April 25, 2006 6:12 AM
To: 'CDT General developers list.'
Subject: [cdt-dev] CModel (DOM/AST ?) does not know methods?

Hi,

working on the outline view I noticed that methods in C++ source files are
reported as IFunction and not IMethod in the CModel (and AST?)

MyClass::myFunction(int arg1)
{
}

Therefore they always show up as public (and not private or protected as it
might have been defined in a .h header file) function. This way you also
can't group methods because you don't know about their classes.

Is this a limitation of AST or the CModel because it only scans a file
without checking declarations of included header files ?

Is there any chance or work-around so that CModel will report methods as
IMethod and not as IFunction ?

Thanks

Sascha


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top