Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Methode Visibility in AST

In the world of PDOM, use the bindings, don’t assume you have the complete AST. J.

 

Cheers,

Doug Schaefer, QNX Software Systems

Eclipse CDT Project Lead, Tools PMC member

http://cdtdoug.blogspot.com

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Andrew Niefer
Sent: Friday, May 12, 2006 10:12 AM
To: CDT General developers list.
Cc: cdt-dev@xxxxxxxxxxx; cdt-dev-bounces@xxxxxxxxxxx
Subject: Re: [cdt-dev] Methode Visibility in AST

 


The easiest way to get this information is to resolve the semantic IBinding for the method name.  The resulting ICPPMethod extends ICPPMember which provides a getVisibility() method.

In the syntax tree itself, the ICPPASTVisibilityLabel is a declaration, and you need to walk the tree backwards from the method declaration to find the previous visibility label and if you find none, you have either private or public depending on if you are in a class or struct.


-Andrew


Leo Büttiker <lbuettik@xxxxxx>
Sent by: cdt-dev-bounces@xxxxxxxxxxx

05/12/2006 05:21 AM

Please respond to
"CDT General developers list." <cdt-dev@xxxxxxxxxxx>

To

cdt-dev@xxxxxxxxxxx

cc

 

Subject

[cdt-dev] Methode Visibility in AST

 

 

 




Hi all,
We currently working hard to implement refactoring with the DOM-AST. Is there
currently a possibility to get the visibility of a method? If not, we try to
implement this.
Regards,
Leo
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top