Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] AST: How to discover now whether ICPPClassScope is ICPPTemplateScope?

Hello!

I've found that modifications in the AST in CDT 6.0 had led to the missing information, important to me.

For example, take the method		std::basic_string<...>::length()

1) Open the header /usr/include/c++/4.3/bits/basic_string.h from Eclipse IDE; 2) Get ICPPBinding for the method length() //it's instanceof ICPPMethod ("length") 3) ICPPScope scope = (ICPPScope) binding.getScope(); //scope is instanceof ICPPClassScope ("basic_string"). OK. 4) scope = (ICPPScope) scope.getParent(); //scope is already instanceof ICPPNamespaceScope ("std")!!!

In CDT 5.0 on step 4) scope was ICPPTemplateScope, but now I cannot discover that "basic_string" needs the Template Parameters.

Is it bug or is there any other way to solve this problem?

P.S.1. When I use length() method from my source file (.cpp) and get ICPPBinding for it - there is no problems (I get ClassInstance, ClassTemplate, etc). But I want to work with headers too.
P.S.2. I need universal method working on CDT 4.0, 5.0, 6.0.

Thanks for any help.

Best regards,
              Andrey.


Back to the top