This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
After a while of playing with editor there are mentioned annotations shown on wrong position.
Created attachment 15839 [details] see picture
*** Issue 45995 has been marked as a duplicate of this issue. ***
*** Issue 46059 has been marked as a duplicate of this issue. ***
Fixed in [maintrunk]. Checking in OverrideAnnotation.java; /cvs/java/src/org/netbeans/modules/java/OverrideAnnotation.java,v <-- OverrideAnnotation.java new revision: 1.7; previous revision: 1.6 done Checking in OverrideAnnotationSupport.java; /cvs/java/src/org/netbeans/modules/java/OverrideAnnotationSupport.java,v <-- OverrideAnnotationSupport.java new revision: 1.7; previous revision: 1.6 done
Observed again in 040726. Have edited a class to where the main body is // TestBase ultimately extends junit's TestCase public class UtilTest extends TestBase { public UtilTest(String name) { super(name); } private FileObject test1Xml; protected void setUp() throws Exception { super.setUp(); // some stuff... } public void testGetAntScriptName() throws Exception { } } The override annotation (belonging to setUp) is currently displayed on the last line ("}").
Jesse, I cannot reproduce it, using your test example. It seems it is java module problem. Very similar to one mentioned in issue #41630
Of course you cannot reproduce it by just pasting in the text I showed. This bug has always happened to me after (1) adding some overrides (e.g. with Ctrl-I), (2) cutting and pasting the methods elsewhere in the file.
Try Dev (Build 040804). Select one method with I or O annotation, copy on clipboard, delete method and paste method back (the best is to paste somweher else and not on original position) and after every step watch what happens and compare with your expectations. I noticed : - annotation is still present even if method is deleted - after pasting is annotation completely at wrong position - after pasting no symbol for code folding
Cut&paste method will confuse override annotation, since there is no change to the method itself, but its position bounds are different. Martin should know how to fix it.
*** Issue 49187 has been marked as a duplicate of this issue. ***
old target milestone, please re-evaluate
Have continued to observe this bug in 4.1 dev builds.
*** Issue 51830 has been marked as a duplicate of this issue. ***
Fixed. Checking in src/org/netbeans/modules/java/OverrideAnnotation.java; /cvs/java/src/org/netbeans/modules/java/OverrideAnnotation.java,v <-- OverrideAnnotation.java new revision: 1.9; previous revision: 1.8 done Checking in src/org/netbeans/modules/java/OverrideAnnotationSupport.java; /cvs/java/src/org/netbeans/modules/java/OverrideAnnotationSupport.java,v <-- OverrideAnnotationSupport.java new revision: 1.17; previous revision: 1.16 done
Thanks.