Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Getting an AST & bindings from an IElementChangedListener?
Getting an AST & bindings from an IElementChangedListener? [message #198648] Tue, 15 March 2005 14:25 Go to next message
Eclipse UserFriend
Originally posted by: mkaufman.nospam.bea.com

Hi -

Quick Question:

I have implemented an IElementChangedListener, and I would like to get the
AST & binding info from the reconcile operation if the event is a
POST_RECONCILE event.

Here's some psuedo-code:

public class MyListener implements IElementChangedListener {
public void elementChanged( ElementChangedEvent e ) {
if ( e.getType() == ElementChagnedEvent.POST_RECONCILE ) {
org.eclipse.jdt.core.dom.CompilationUnit cu =
getAstSomehow( e );
// ...
}
}
}


Is this possible? I understand that I can cause the ICompilationUnit in the
event to be reconciled again to produce the AST & binding info, but that
seems redundant.

Thanks in advance!!

Mike Kaufman
BEA Systems, Inc.
Re: Getting an AST & bindings from an IElementChangedListener? [message #198711 is a reply to message #198648] Tue, 15 March 2005 17:08 Go to previous message
Eclipse UserFriend
Hi Mike,

Sorry this is not possible (at the API level at least).

Jerome

Mike Kaufman wrote:
> Hi -
>
> Quick Question:
>
> I have implemented an IElementChangedListener, and I would like to get the
> AST & binding info from the reconcile operation if the event is a
> POST_RECONCILE event.
>
> Here's some psuedo-code:
>
> public class MyListener implements IElementChangedListener {
> public void elementChanged( ElementChangedEvent e ) {
> if ( e.getType() == ElementChagnedEvent.POST_RECONCILE ) {
> org.eclipse.jdt.core.dom.CompilationUnit cu =
> getAstSomehow( e );
> // ...
> }
> }
> }
>
>
> Is this possible? I understand that I can cause the ICompilationUnit in the
> event to be reconciled again to produce the AST & binding info, but that
> seems redundant.
>
> Thanks in advance!!
>
> Mike Kaufman
> BEA Systems, Inc.
>
>
Previous Topic:Implementing extended java languages by "subclassing jdt" ?
Next Topic:refactoring - rename
Goto Forum:
  


Current Time: Thu May 08 23:40:48 EDT 2025

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

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

Back to the top