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.
[ JDK VERSION : J2SE 1.4.2_xx ] NB 4.x scans fol ders/classpath whenever it boots or a new fold er is mounted. However, it still seems to get los t sometimes and there is no easy way for forci ng it to run except for shutting down the IDE or removing/adding a folder again. An easy way of f orcing a sc an should be re-added to NB 4.1.
java issue
The user shouldn't have any reason to force the scanning. If you run into a scenario that requires the scanning to be invoked manually, it would be a P1 bug then. Please provide exact steps to reproduce it.
This problem happens when I update the folders using CVS support inside the IDE itself. NB 4.1 should be "smart" enough to know that and scan files again automatically.
IDE *does* update of internal structures (well, we think it does :) Emane can you check it, please?
I tested it for external changes - remove, add, modify java sources outside the IDE. And for internal changes by CVS. All modified files were rescaned in IDE a few seconds after I made the changes. Could you provide your steps to reproduce it?
This problem happens when there are several source directories in the same project.
Cf. requirement #3 in issue #33162 - ability to receive events from disk changes at any depth in a tree regardless of existence of matching FileObject's in memory.
I am going to provide an action for rescanning classpaths.
I have added the action for rescanning classpaths manually. However, the action is not in any menu by default. To add it to the menu open Tools->Options dialog. Browse to IDE Configuration->Look and Feel->Actions->Tools, copy the Update Parser Indexes action to the clipboard and paste it to IDE Configutation->Look and Feel->Menu Bar->Tools. From now on you will have this action accessible from the Tools menu. We may want to have this action accessible from the menu by default in the final release. Thus I am leaving this issue open as P3 for tracking purposes. Checking in src/org/netbeans/modules/javacore/Bundle.properties; /cvs/java/javacore/src/org/netbeans/modules/javacore/Bundle.properties,v <-- Bundle.properties new revision: 1.13; previous revision: 1.12 done Checking in src/org/netbeans/modules/javacore/JMManager.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/JMManager.java,v <-- JMManager.java new revision: 1.100; previous revision: 1.99 done Checking in src/org/netbeans/modules/javacore/ProgressPanel.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/ProgressPanel.java,v <-- ProgressPanel.java new revision: 1.16; previous revision: 1.15 done Checking in src/org/netbeans/modules/javacore/resources/mf-layer.xml; /cvs/java/javacore/src/org/netbeans/modules/javacore/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.10; previous revision: 1.9 done Checking in src/org/netbeans/modules/javacore/scanning/FileScanner.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/scanning/FileScanner.java,v <-- FileScanner.java new revision: 1.20; previous revision: 1.19 done
Rescan action now runs automatically on the background whenever user switches from netbeans to some other application and then back again. Checking in src/org/netbeans/modules/javacore/Bundle.properties; /cvs/java/javacore/src/org/netbeans/modules/javacore/Bundle.properties,v <-- Bundle.properties new revision: 1.14; previous revision: 1.13 done Checking in src/org/netbeans/modules/javacore/JMManager.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/JMManager.java,v <-- JMManager.java new revision: 1.101; previous revision: 1.100 done Checking in src/org/netbeans/modules/javacore/JavaCoreModule.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/JavaCoreModule.java,v <-- JavaCoreModule.java new revision: 1.14; previous revision: 1.13 done Checking in src/org/netbeans/modules/javacore/RescanAction.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/RescanAction.java,v <-- RescanAction.java new revision: 1.2; previous revision: 1.1 done
This last change seems a REALLY BAD idea to me. I switch between the IDE and other processes all day long and I surely do not want NB to be rescanning my hard disk all the time. Is it possible to revert this last change or turn it off by default?
Yes, it is possible. We are still trying to find the best solution. But please give this a try. It does not seem to have much impact on the performance.
As I suspected, the current fix simply makes the computer hangs every time NB gets focus. Another user has also complained in the NetCAT mailing list: ---------------------------------------------- Sławek Garwol <s.garwol@wasko.pl> to netcat More options 8:27am (2 hours ago) Hello What this process is doing? It starts after getting focus by netbeans and consumes 100% of CPU for about 5-10 seconds. At my work I often change active window from nb to firefox and vice versa and this is very annoying. -- Sławomir Garwol Projektant Systemów Telekomunikacyjnych
It was decided we will add the explicit scanning action to the menu, we will not automatically scan on window activation, vcs update within netbeans will trigger a rescan. I have removed the autoscan on window activation: Checking in src/org/netbeans/modules/javacore/JavaCoreModule.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/JavaCoreModule.java,v <-- JavaCoreModule.java new revision: 1.15; previous revision: 1.14 done
Reassigning to Jano to specify: 1) where the explicit rescan action should be (in which menu, eventually in which toolbar and what icon it should have) 2) how the action should be named 3) whether it should trigger a background rescan (as in case of the removed windows activation rescan) or a modal cancelable rescan (as in case of the current rescan action)
Jano provided the data - I will implement it.
The explicit rescan action is now available as File->Refresh All Files. Last thing that remains is to commit fix for issue 56808 once it passes the review. Checking in src/org/netbeans/modules/javacore/Bundle.properties; /cvs/java/javacore/src/org/netbeans/modules/javacore/Bundle.properties,v <-- Bundle.properties new revision: 1.15; previous revision: 1.14 done Checking in src/org/netbeans/modules/javacore/JMManager.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/JMManager.java,v <-- JMManager.java new revision: 1.102; previous revision: 1.101 done Checking in src/org/netbeans/modules/javacore/RescanAction.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/RescanAction.java,v <-- RescanAction.java new revision: 1.3; previous revision: 1.2 done Checking in src/org/netbeans/modules/javacore/resources/mf-layer.xml; /cvs/java/javacore/src/org/netbeans/modules/javacore/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.11; previous revision: 1.10 done Checking in src/org/netbeans/modules/javacore/scanning/FileScanner.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/scanning/FileScanner.java,v <-- FileScanner.java new revision: 1.23; previous revision: 1.22 done
The issue is now fixed completely.
Reorganization of java component