Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » ASTNode to IJavaElement conversion possible?
ASTNode to IJavaElement conversion possible? [message #124980] Fri, 05 December 2003 14:24 Go to next message
Eclipse UserFriend
Originally posted by: rlintern.csr.uvic.ca

Hi,

Is it possible to easily convert from an ASTNode to the corresponding
IJavaElement and vice versa. Does it make sense to do this?

I have been using IJavaElements in my code for their simplicity but I am now
starting to use the AST to gather more information. How can I bridge this
gap without having to rewrite much code?

Cheers,
Rob
Re: ASTNode to IJavaElement conversion possible? [message #125698 is a reply to message #124980] Tue, 09 December 2003 18:08 Go to previous messageGo to next message
Eclipse UserFriend
Does anyone have any hints? ideas?

Cheers,
Rob


"Rob" <rlintern@csr.uvic.ca> wrote in message
news:bqqm38$1lv$1@eclipse.org...
> Hi,
>
> Is it possible to easily convert from an ASTNode to the corresponding
> IJavaElement and vice versa. Does it make sense to do this?
>
> I have been using IJavaElements in my code for their simplicity but I am
now
> starting to use the AST to gather more information. How can I bridge this
> gap without having to rewrite much code?
>
> Cheers,
> Rob
>
>
Re: ASTNode to IJavaElement conversion possible? [message #125773 is a reply to message #125698] Wed, 10 December 2003 00:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: scheglov_ke.nlmk.ru

Rob Lintern <rlintern@uvic.ca> wrote:

> Does anyone have any hints? ideas?
For IMember (and other instances of ISourceReference) you can
get ISourceRange and then can use offset and length to find ASTNode.

> Cheers,
> Rob


> "Rob" <rlintern@csr.uvic.ca> wrote in message
> news:bqqm38$1lv$1@eclipse.org...
>> Hi,
>>
>> Is it possible to easily convert from an ASTNode to the corresponding
>> IJavaElement and vice versa. Does it make sense to do this?
>>
>> I have been using IJavaElements in my code for their simplicity but I am
> now
>> starting to use the AST to gather more information. How can I bridge this
>> gap without having to rewrite much code?
>>
>> Cheers,
>> Rob
>>
>>



--
SY, Konstantin.
Advanced Eclipse SWT Designer (http://www.swt-designer.com)
Re: ASTNode to IJavaElement conversion possible? [message #125786 is a reply to message #125773] Wed, 10 December 2003 01:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: akiezun.cuthis.mit.edu.andthis

> > Does anyone have any hints? ideas?
> For IMember (and other instances of ISourceReference) you can
> get ISourceRange and then can use offset and length to find ASTNode.

for the other way: see what the NodeFinder class does
a.
Re: ASTNode to IJavaElement conversion possible? [message #129487 is a reply to message #125786] Tue, 23 December 2003 15:35 Go to previous message
Eclipse UserFriend
Originally posted by: rlintern.csr.uvic.ca

Thanks for the hints... but I was more interested in converting in the other
direction, from ASTNode to IJavaElement, in particular for methods.

I've just noticed the
org.eclipse.jdt.internal.corext.dom.Binding2JavaElement class which I will
explore.

Cheers,

Rob

"adam kiezun" <akiezun@cuthis.mit.edu.andthis> wrote in message
news:br6dkp$1ks$1@eclipse.org...
> > > Does anyone have any hints? ideas?
> > For IMember (and other instances of ISourceReference) you can
> > get ISourceRange and then can use offset and length to find ASTNode.
>
> for the other way: see what the NodeFinder class does
> a.
>
>
Previous Topic:getting IClassFile from a SourceType
Next Topic:About File hisory
Goto Forum:
  


Current Time: Tue Jul 22 14:26:11 EDT 2025

Powered by FUDForum. Page generated in 0.03879 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top