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.
NetBeans IDE Dev (Build 200610251800) 1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b99 Windows XP version 5.1 running on x86 cs_CZ (nb); Cp1250 HW: dual core Description: ============ Create new JFrame. And try to edit main method in form editor. e.g. write code which sets system look and feel. UIManager.setlo - and press ctrl+space for completion. No setLookAndFeel method is offered And also if you select e.g. Class node in navigator win - tree, the whole class is not selected in editor. The boardes of block are not correct.
Is the UIManager imported (not marked by error)? The Ctrl+Space offers only visible (imported) classes. Ctrl+Alt+Space offers all classes and automatically imports them.
It happens for all classes. It looks like the model is not synchronized correctly (can be seen in Navigator -> Trees). When the file is saved, it starts to work fine. Steps to reproduce: 1) create new JForm 2) in ctor type: "string". -> provided CC is not correct
Seems like a problem with guarded sections. Reassigning.
Yesterday I fixed some position issues so it should be the culprit. Anyway I can reproduce the same even with plain java file. Just copy method public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new NewJFrame().setVisible(true); } }); } to some empty java file and try to cc for UIManager inside invokeLater. Sometimes it even mess existing code. It seems to be a bug related to annonymous inner classes not guarded sections.
Sorry, I meant position issues should *NOT* be the culprit.
I guess I found the problem. JavaSource does not track the data object validity state. In this case the data object becomes invalid and a new one is created but JavaSource still listens to the old data object (old document). I will fix JavaSource to listen to DataObjec.PROP_VALID. I would also recommend to file separate bug about anonymous inner classes since it does not relate to this issue.
fixed in trunk /cvs/java/source/src/org/netbeans/api/java/source/JavaSource.java new revision: 1.20; previous revision: 1.19 /cvs/form/src/org/netbeans/modules/form/JavaCodeGenerator.java new revision: 1.187; previous revision: 1.186
verified in trunk
merged to release60-m5 branch /cvs/java/source/src/org/netbeans/api/java/source/JavaSource.java new revision: 1.17.2.1; previous revision: 1.17 /cvs/form/src/org/netbeans/modules/form/JavaCodeGenerator.java new revision: 1.186.2.1; previous revision: 1.186
verified in m5