Lines 7-13
Link Here
|
7 |
* http://www.sun.com/ |
7 |
* http://www.sun.com/ |
8 |
* |
8 |
* |
9 |
* The Original Code is NetBeans. The Initial Developer of the Original |
9 |
* The Original Code is NetBeans. The Initial Developer of the Original |
10 |
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun |
10 |
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun |
11 |
* Microsystems, Inc. All Rights Reserved. |
11 |
* Microsystems, Inc. All Rights Reserved. |
12 |
*/ |
12 |
*/ |
13 |
|
13 |
|
Lines 30-35
Link Here
|
30 |
import org.openide.loaders.DataObjectNotFoundException; |
30 |
import org.openide.loaders.DataObjectNotFoundException; |
31 |
import org.openide.ErrorManager; |
31 |
import org.openide.ErrorManager; |
32 |
import org.openide.loaders.RepositoryNodeFactory; |
32 |
import org.openide.loaders.RepositoryNodeFactory; |
|
|
33 |
import org.openide.util.actions.CallableSystemAction; |
33 |
|
34 |
|
34 |
/** Data system encapsulates logical structure of more file systems. |
35 |
/** Data system encapsulates logical structure of more file systems. |
35 |
* It also allows filtering of content of DataFolders |
36 |
* It also allows filtering of content of DataFolders |
Lines 136-141
Link Here
|
136 |
return new SystemAction[] { |
137 |
return new SystemAction[] { |
137 |
SystemAction.get (org.openide.actions.FindAction.class), |
138 |
SystemAction.get (org.openide.actions.FindAction.class), |
138 |
null, |
139 |
null, |
|
|
140 |
SystemAction.get(RefreshAllAction.class), // #31047 |
141 |
null, |
139 |
/* |
142 |
/* |
140 |
SystemAction.get (org.netbeans.core.actions.AddFSAction.class), |
143 |
SystemAction.get (org.netbeans.core.actions.AddFSAction.class), |
141 |
SystemAction.get (org.netbeans.core.actions.AddJarAction.class), |
144 |
SystemAction.get (org.netbeans.core.actions.AddJarAction.class), |
Lines 286-291
Link Here
|
286 |
|
289 |
|
287 |
public Node repository(DataFilter f) { |
290 |
public Node repository(DataFilter f) { |
288 |
return DataSystem.getDataSystem(f == DataFilter.ALL ? null : f); |
291 |
return DataSystem.getDataSystem(f == DataFilter.ALL ? null : f); |
|
|
292 |
} |
293 |
|
294 |
} |
295 |
|
296 |
public static final class RefreshAllAction extends CallableSystemAction { |
297 |
|
298 |
public String getName() { |
299 |
return NbBundle.getMessage(DataSystem.class, "LAB_refresh_all_filesystems"); |
300 |
} |
301 |
|
302 |
public void performAction() { |
303 |
Enumeration e = Repository.getDefault().fileSystems(); |
304 |
while (e.hasMoreElements()) { |
305 |
// Do not restrict to just visible filesystems; hidden ones |
306 |
// may be important too for various reasons. |
307 |
FileSystem fs = (FileSystem)e.nextElement(); |
308 |
fs.refresh(false); |
309 |
} |
310 |
} |
311 |
|
312 |
public HelpCtx getHelpCtx() { |
313 |
return new HelpCtx(DataSystem.class); |
289 |
} |
314 |
} |
290 |
|
315 |
|
291 |
} |
316 |
} |