Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Getting ITranslationUnit from IASTTranslationUnit

Great question. I don't really see a downside. It doesn't take up any per object memory and there's a default implementation of getAdapter, i.e. the one that looks things up in the extension registry. You'd have to put it up as the superclass of ASTNode, which is probably what you want anyway. Can't be that easy can it?

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> On Behalf Of Alena Laskavaia
> Sent: Monday, March 07, 2011 2:44 PM
> To: CDT General developers list.
> Subject: Re: [cdt-dev] Getting ITranslationUnit from IASTTranslationUnit
> 
> What stops us from making it PlatformObject now?
> 
> On Mon, Mar 7, 2011 at 2:11 PM, Schaefer, Doug
> <Doug.Schaefer@xxxxxxxxxxxxx> wrote:
> > I was waiting for the IBM guys to respond since I thought they had a
> > requirement to be able to run the parser and AST outside the CDT and
> > without the ICElement hierarchy. But since they didn't respond, I must be
> mistaken.
> >
> >
> >
> > getCElement() or getCTranslationUnit()?
> >
> >
> >
> > Too bad we didn't make these PlatformObjects. Then you'd just use
> > getAdapter().
> >
> >
> >
> > D.
> >
> >
> >
> >
> >
> > From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-
> bounces@xxxxxxxxxxx]
> > On Behalf Of Sergey Prigogin
> > Sent: Monday, March 07, 2011 2:05 PM
> > To: CDT General developers list.
> > Subject: Re: [cdt-dev] Getting ITranslationUnit from
> > IASTTranslationUnit
> >
> >
> >
> > Since nobody responded I assume that there is no good reason not to
> > have a method in IASTTranslationUnit returning the corresponding
> ITranslationUnit.
> > I'm going to add such method. Any suggestions for the name?
> >
> >
> >
> > -sergey
> >
> > On Fri, Mar 4, 2011 at 5:12 PM, Sergey Prigogin
> > <eclipse.sprigogin@xxxxxxxxx> wrote:
> >
> > Does anybody know why IASTTranslationUnit doesn't provide a method
> > returning the ITranslationUnit from which the AST was built? Such
> > method would be handy in many places, for example in
> CodanCReconciler.reconciled method.
> >
> >
> >
> > -sergey
> >
> >
> >
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> >
> >
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top