Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-05-26 18:18:45 -0400
committerspingel2010-05-26 18:18:45 -0400
commit692af7b346d4e08c2dbd76dc2fbdd20719c2e1c7 (patch)
tree861ad60975060b212e308df2798ef3b712fa4203 /org.eclipse.mylyn.tasks.ui
parentad10b0ae946d6ec3a4ab539b5ff133be553b6bde (diff)
downloadorg.eclipse.mylyn.tasks-692af7b346d4e08c2dbd76dc2fbdd20719c2e1c7.tar.gz
org.eclipse.mylyn.tasks-692af7b346d4e08c2dbd76dc2fbdd20719c2e1c7.tar.xz
org.eclipse.mylyn.tasks-692af7b346d4e08c2dbd76dc2fbdd20719c2e1c7.zip
RESOLVED - bug 220314: double click on repository attachment does not respect default workbench editor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=220314
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/DownloadAndOpenTaskAttachmentJob.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/DownloadAndOpenTaskAttachmentJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/DownloadAndOpenTaskAttachmentJob.java
index 59fa8575c..96dc681c9 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/DownloadAndOpenTaskAttachmentJob.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/DownloadAndOpenTaskAttachmentJob.java
@@ -55,9 +55,13 @@ class DownloadAndOpenTaskAttachmentJob implements ICoreRunnable {
public void run(IProgressMonitor monitor) throws CoreException {
monitor.beginTask(jobName, IProgressMonitor.UNKNOWN);
- IStatus result = execute(new SubProgressMonitor(monitor, 100));
- if (result != null && !result.isOK()) {
- throw new CoreException(result);
+ try {
+ IStatus result = execute(new SubProgressMonitor(monitor, 100));
+ if (result != null && !result.isOK()) {
+ throw new CoreException(result);
+ }
+ } finally {
+ monitor.done();
}
}
@@ -89,12 +93,10 @@ class DownloadAndOpenTaskAttachmentJob implements ICoreRunnable {
} catch (CoreException e) {
int s = IStatus.ERROR;
if (e.getStatus() != null && e.getStatus().getCode() == IStatus.CANCEL) {
- s = IStatus.CANCEL;
+ throw new OperationCanceledException();
}
return new Status(s, TasksUiPlugin.ID_PLUGIN,
Messages.DownloadAndOpenTaskAttachmentJob_failedToDownloadAttachment, e);
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
} finally {
// (fos != null) only when there is some problem, in other cases we nulled fos already
if (fos != null) {

Back to the top