Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashi2017-04-25 06:45:46 -0400
committerMartin Oberhuber2017-05-19 04:48:30 -0400
commitaed730f815770789b3bd8546325917f26cfc609e (patch)
treed1e435d2b47780db9a03f3587b1eda4b0d5c3b9e /target_explorer
parent4070d696248f742b5ec74c84a2b52e920a99f164 (diff)
downloadorg.eclipse.tcf-aed730f815770789b3bd8546325917f26cfc609e.tar.gz
org.eclipse.tcf-aed730f815770789b3bd8546325917f26cfc609e.tar.xz
org.eclipse.tcf-aed730f815770789b3bd8546325917f26cfc609e.zip
Bug 515665: [Target Explorer] Refresh after CANCELING download
After CANCELING a large download, the target folder is now still refreshed. Also, in case the target folder is just a "linked" resource or there are multiple aliases holding the target folder, all those aliases are refreshed. One loophole is NOT fixed with this: Downloading to folder /base , havign the download fill /base/sub and refreshing sub when that's an Eclipse project or linked resource. In this case, "sub" is *not* refreshed but we can live with this special case. Change-Id: I1ea146eed33c28fe67d75b5205a8b4deb6690264 Signed-off-by: ashi <Aijun.Shi@windriver.com>
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/DownloadFilesHandler.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/DownloadFilesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/DownloadFilesHandler.java
index 5f4896494..47254d51f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/DownloadFilesHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/DownloadFilesHandler.java
@@ -22,7 +22,6 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.URIUtil;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -52,7 +51,7 @@ public class DownloadFilesHandler extends AbstractHandler {
if (destination == null)
return null;
- File destinationFile = new File(destination);
+ final File destinationFile = new File(destination);
saveFilterPath(destinationFile);
IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
@@ -61,8 +60,7 @@ public class DownloadFilesHandler extends AbstractHandler {
peer.operationDownload(nodes, destinationFile, new MoveCopyCallback()).runInUserJob(new Callback() {
@Override
protected void internalDone(Object caller, IStatus status) {
- if (status.isOK()) {
- IContainer container = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(new Path(destination));
+ for (IContainer container : ResourcesPlugin.getWorkspace().getRoot().findContainersForLocationURI(destinationFile.toURI())) {
if (container != null) {
try {
container.refreshLocal(IResource.DEPTH_ONE, null);

Back to the top