Lines 42-47
Link Here
|
42 |
package org.netbeans.modules.remote.impl.fileoperations.spi; |
42 |
package org.netbeans.modules.remote.impl.fileoperations.spi; |
43 |
|
43 |
|
44 |
import java.io.IOException; |
44 |
import java.io.IOException; |
|
|
45 |
import java.util.ArrayList; |
45 |
import java.util.List; |
46 |
import java.util.List; |
46 |
import java.util.Map; |
47 |
import java.util.Map; |
47 |
import java.util.concurrent.ExecutionException; |
48 |
import java.util.concurrent.ExecutionException; |
Lines 56-61
Link Here
|
56 |
import org.netbeans.modules.remote.impl.fs.RemoteFileObjectBase; |
57 |
import org.netbeans.modules.remote.impl.fs.RemoteFileObjectBase; |
57 |
import org.netbeans.modules.remote.impl.fs.RemoteFileSystem; |
58 |
import org.netbeans.modules.remote.impl.fs.RemoteFileSystem; |
58 |
import org.netbeans.modules.remote.impl.fs.RemoteFileSystemManager; |
59 |
import org.netbeans.modules.remote.impl.fs.RemoteFileSystemManager; |
|
|
60 |
import org.netbeans.modules.remote.spi.FileSystemProvider; |
59 |
import org.netbeans.spi.extexecution.ProcessBuilderFactory; |
61 |
import org.netbeans.spi.extexecution.ProcessBuilderFactory; |
60 |
import org.netbeans.spi.extexecution.ProcessBuilderImplementation; |
62 |
import org.netbeans.spi.extexecution.ProcessBuilderImplementation; |
61 |
import org.openide.filesystems.FileObject; |
63 |
import org.openide.filesystems.FileObject; |
Lines 278-283
Link Here
|
278 |
protected ProcessBuilder createProcessBuilder(FileProxyO file) { |
280 |
protected ProcessBuilder createProcessBuilder(FileProxyO file) { |
279 |
return ProcessBuilderFactory.createProcessBuilder(new ProcessBuilderImplementationImpl(env), "RFS Process Builder"); // NOI18N |
281 |
return ProcessBuilderFactory.createProcessBuilder(new ProcessBuilderImplementationImpl(env), "RFS Process Builder"); // NOI18N |
280 |
} |
282 |
} |
|
|
283 |
|
284 |
protected void refreshFor(FileProxyO ... files) { |
285 |
List<String> paths = new ArrayList<String>(); |
286 |
for(FileProxyO f : files) { |
287 |
String path = findExistingParent(f.getPath()); |
288 |
if (path != null) { |
289 |
paths.add(path); |
290 |
} |
291 |
} |
292 |
FileSystemProvider.scheduleRefresh(env, paths); |
293 |
// TODO wait finishing |
294 |
} |
295 |
|
296 |
private String findExistingParent(String path) { |
297 |
while(true) { |
298 |
RemoteFileObjectBase fo = RemoteFileSystemManager.getInstance().getFileSystem(env).findResource(path); |
299 |
if (fo != null) { |
300 |
break; |
301 |
} |
302 |
path = PathUtilities.getDirName(path); |
303 |
if (path == null) { |
304 |
return null; |
305 |
} |
306 |
} |
307 |
return path; |
308 |
} |
281 |
|
309 |
|
282 |
private ExecutionEnvironment getExecutionEnvironment() { |
310 |
private ExecutionEnvironment getExecutionEnvironment() { |
283 |
return env; |
311 |
return env; |