Bug 190394 - IElementChangedListener not being properly notified when Java Annotation changes
Summary: IElementChangedListener not being properly notified when Java Annotation changes
Status: VERIFIED DUPLICATE of bug 106108
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-31 22:58 EDT by Tom Mutdosch CLA
Modified: 2007-10-30 08:03 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Mutdosch CLA 2007-05-31 22:58:54 EDT
I have an IElementChangedListener which I am trying to use to see when an Annotation on a Java method is modified, by checking the IJavaElementDelta.F_MODIFIERS flag.  

If I add/remove a @Deprecated annotation on a method, the IJavaElementDelta will correctly have a MODIFIERS CHANGED event.  However if I add/modify a custom annotation or even:  @SuppressWarnings("unchecked")

In this case the IJavaElementDelta will have: 
[Working copy] F1.java[*]: {PRIMARY RESOURCE}]

It does not have the IJavaElementDelta.F_MODIFIERS flag set for the Method.  So I can not use IElementChangedListener to listen to changes in my own custom annotations (which is my end goal).  I realize this probably isn't the best way to do what I'm looking for, but there doesn't seem to be a better way (yet), and  changing any type of annotation really is modifying a method's modifiers, so this should be able to be relied upon.
Comment 1 Markus Keller CLA 2007-06-01 11:12:04 EDT
Dup of bug 106108?
Comment 2 Olivier Thomann CLA 2007-06-06 14:24:16 EDT

*** This bug has been marked as a duplicate of bug 106108 ***
Comment 3 David Audel CLA 2007-10-30 08:03:52 EDT
Verified for 3.4M3 using I20071029-0010 build.