Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Changed Listener - how to distinguish changes in ElementChangedEvent
Changed Listener - how to distinguish changes in ElementChangedEvent [message #158367] Wed, 12 May 2004 03:19 Go to next message
Eclipse UserFriend
Hi!

When deleting a class in the Package Explorer it returns the same
ElementChangedEvent as when I change i.e. a line of code within a class.

So how can I distinguish those events?

And when is POST_RECONCILE or POST_CHANGE triggered?

And the other problem is how to know whether only a method within a class,
the class itself or even only an attribute has been changed.
At the moment I only get event for the whole class (compilation unit)
instead of the single members of that class.

Thanks in advance
Re: Changed Listener - how to distinguish changes in ElementChangedEvent [message #158375 is a reply to message #158367] Wed, 12 May 2004 05:32 Go to previous messageGo to next message
Eclipse UserFriend
"Student" <nthomas@student.uni-kassel.de> wrote in message
news:c7sipb$man$1@eclipse.org...
> Hi!
>
> When deleting a class in the Package Explorer it returns the same
> ElementChangedEvent as when I change i.e. a line of code within a class.
>
> So how can I distinguish those events?
You need to look at the Java delta associated with the EclementChangedEvent.
If you visit this delta, it will indicate in the fisrt case that the class
has been removed, and in the second case that the content of the compilation
unit has changed.

> And when is POST_RECONCILE or POST_CHANGE triggered?
POST_RECONCILE is triggered after you edited some compilation unit in the
Java editor.
POST_CHANGE is triggered after a Java resource is changed on disk.

>
> And the other problem is how to know whether only a method within a class,
> the class itself or even only an attribute has been changed.
Have a look at the Java delta.

> At the moment I only get event for the whole class (compilation unit)
> instead of the single members of that class.
If there are no structural change to a member, then the Java delta will only
indicate that the content of the compilation unit has changed.

>
> Thanks in advance
>
>
Re: Changed Listener - how to distinguish changes in ElementChangedEvent [message #158402 is a reply to message #158367] Wed, 12 May 2004 07:58 Go to previous message
Eclipse UserFriend
hi

i'm also interested in knowing when a method in a class has changed or a
new one has been added.

What do i have to look to do this? are there any existing listener for
these cases?

thank you

> Hi!

> When deleting a class in the Package Explorer it returns the same
> ElementChangedEvent as when I change i.e. a line of code within a class.

> So how can I distinguish those events?

> And when is POST_RECONCILE or POST_CHANGE triggered?

> And the other problem is how to know whether only a method within a class,
> the class itself or even only an attribute has been changed.
> At the moment I only get event for the whole class (compilation unit)
> instead of the single members of that class.

> Thanks in advance
Previous Topic:FullyQualifiedNames of an IField
Next Topic:Class of the qualifier in an QualifiedName ASTNode
Goto Forum:
  


Current Time: Thu Jul 17 20:34:38 EDT 2025

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

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

Back to the top