[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-dev] How to find the declaring parent of an IVariable ?
|
You should probably use IBinding.getOwner().
Markus.
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of manivannan_pk
> Sent: Friday, May 22, 2009 6:46 AM
> To: cdt-dev@xxxxxxxxxxx
> Subject: [cdt-dev] How to find the declaring parent of an IVariable ?
> Importance: Low
>
>
>
> Suppose I have an IBinding which is an instance of IVariable.
> How do I find which entity declares it ?
>
> Examples:
>
> - For a local variable or a formal parameter, the declaring
> parent is an IASTFunctionDefinition.
> - For a global variable, the declaring parent is an
> IASTTranslationUnit
> - For an IField, the declaring parent is an IASTCompositeTypeSpecifier
>
> Thanks,
> mani
>
> --
> View this message in context:
> http://www.nabble.com/How-to-find-the-declaring-parent-of-an-I
Variable---tp23636846p23636846.html
> Sent from the Eclipse CDT - Development mailing list archive
> at Nabble.com.
>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>