ElementChangedEvents on compilation unit primary copy [message #720813] |
Wed, 31 August 2011 09:34 |
Xavier Coulon Messages: 58 Registered: July 2009 |
Member |
|
|
Hello,
I'd like to have detailed notifications when a compilation unit is changed. When the Java Editor is opened, my ElementChangedListener is called with delta that give me (almost) enough information on the changes that occurred on the *working copy*.
But there are some cases when it does not work as I'd like :-/
For example, if a user removes a method from the package explorer view while the compilation unit is *not* opened in the Java Editor, I receive the kind of event below:
org.eclipse.jdt.core.ElementChangedEvent[source=Java Model[*]: {CHILDREN}
sample[*]: {CHILDREN}
src[*]: {CHILDREN}
org.sample[*]: {CHILDREN}
Test.java[*]: {CONTENT | PRIMARY RESOURCE}]
The level of detail is not fine enough to know that a method was removed (in my case), and in case of refactoring by a third party plugin, I cannot assume that the code changes will occur within a working copy..
Is there a way to retrieve the compilation unit before it was changed ?
Thank you in advance.
Best regards
/Xavier
[Updated on: Wed, 31 August 2011 09:35] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03281 seconds