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.

Bug 31047

Summary: Add "Refresh All" to Filesystems node
Product: platform Reporter: Jesse Glick <jglick>
Component: Window SystemAssignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: blocker CC: rmatous, ttran
Priority: P2 Keywords: SIMPLEFIX, UI
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 33410    
Bug Blocks:    
Attachments: Suggested patch
Class which provides an event when the IDE is idle

Description Jesse Glick 2003-02-14 01:54:12 UTC
Very simple patch but potentially very useful.
Just adds a context menu item "Refresh All" to the
Filesystems node. When you select it - surprise! -
all filesystems are refreshed. In other words, any
changes made on disk are searched for and the
Explorer (Editor, ...) refreshed to match.

Note that only existing FileObject's held in
memory are refreshed, so this is not slow. I just
tried it in my copy of NB, where I have one mount
of Unix / (!) and one with hundreds of megabytes
of sources; I had opened one of those sources in
the editor, made a change, saved it, and compiled
it externally (not F9). After selecting Refresh
All, the modified icon disappeared from the editor
tab within a couple of seconds.

Since we no longer turn on auto refresh of
filesystems by default, I think this is an
important thing to do to compensate. (Other IDEs
do it already.) Of course you can select "Refresh
Folder" on a particular folder, but then you need
to find the folder in the Explorer first, and it
is not recursive, so this is rather cumbersome.
Comment 1 Jesse Glick 2003-02-14 01:55:19 UTC
Created attachment 8943 [details]
Suggested patch
Comment 2 _ tboudreau 2003-02-20 16:33:52 UTC
Created attachment 9061 [details]
Class which provides an event when the IDE is idle
Comment 3 _ ttran 2003-03-04 13:36:54 UTC
we discussed Tim's Idle classs on nb-perf team's meeting recently. 
There is fear that it will introduce more unpredictability into the
system without clear payoff.

("idle" here actually means the user is idle, not the CPU)
Comment 4 Jesse Glick 2003-03-18 10:31:53 UTC
Obviously this is not for 3.5 any more. Could it be applied in the
trunk so people can at least try it? Easy enough to back out if it
proves somehow problematic.
Comment 5 Jesse Glick 2003-03-25 19:14:21 UTC
Well I'm going to apply it so people can see if they like it. If not,
can just be removed, or perhaps replaced with something more
complicated if there is any consensus on how that could work. Use of
an idle timer was deemed contraindicated here because you ideally want
to refresh just before returning to work in NB, not just after leaving it.
Comment 6 Jesse Glick 2003-03-25 22:06:01 UTC
Applied to trunk:

committed   * Up-To-Date  1.359      
core/src/org/netbeans/core/Bundle.properties
committed   * Up-To-Date  1.46       
core/src/org/netbeans/core/DataSystem.java
Comment 7 Jesse Glick 2003-07-02 14:26:15 UTC
While this is not technically a bug, removing auto-refresh for 3.5
without introducing anything to replace it was perhaps poor planning.
Anyway, this menu item would be simple to merge to 3.5.2, if that is
desired.

(Would need to be a SystemAction rather than plain Action, since the
infrastructure to fully support Action's was not in 3.5, but that is a
trivial change.)