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.
Summary: | Code completion doesn't offer right method to objects in form editor | ||
---|---|---|---|
Product: | java | Reporter: | Jana Maleckova <janie> |
Component: | Source | Assignee: | Jan Pokorsky <jpokorsky> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | jpokorsky, mmirilovic, pflaska, tzezula |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 89637 |
Description
Jana Maleckova
2006-10-26 17:06:10 UTC
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 |