Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/NewTracTaskEditor.java6
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditor.java19
2 files changed, 17 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/NewTracTaskEditor.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/NewTracTaskEditor.java
index a3c47933a..c8ee7105e 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/NewTracTaskEditor.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/NewTracTaskEditor.java
@@ -121,8 +121,12 @@ public class NewTracTaskEditor extends AbstractNewRepositoryTaskEditor {
@Override
protected void handleSubmitError(final IJobChangeEvent event) {
- super.handleSubmitError(event);
TracUiPlugin.handleTracException(event.getJob().getResult());
+
+ if (!isDisposed() && !submitButton.isDisposed()) {
+ submitButton.setEnabled(true);
+ showBusy(false);
+ }
}
@Override
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditor.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditor.java
index 7b8a107b0..282c75a0c 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditor.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/TracTaskEditor.java
@@ -21,7 +21,6 @@ import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.mylar.context.core.MylarStatusHandler;
import org.eclipse.mylar.internal.trac.core.ITracClient;
import org.eclipse.mylar.internal.trac.core.InvalidTicketException;
-import org.eclipse.mylar.internal.trac.core.TracCorePlugin;
import org.eclipse.mylar.internal.trac.core.TracRepositoryConnector;
import org.eclipse.mylar.internal.trac.core.model.TracTicket;
import org.eclipse.mylar.internal.trac.ui.TracUiPlugin;
@@ -98,10 +97,6 @@ public class TracTaskEditor extends AbstractRepositoryTaskEditor {
attachContext();
}
close();
- } else {
- // TracUiPlugin.handleTracException(event.getResult());
- submitButton.setEnabled(true);
- TracTaskEditor.this.showBusy(false);
}
}
});
@@ -121,8 +116,18 @@ public class TracTaskEditor extends AbstractRepositoryTaskEditor {
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
}
return Status.OK_STATUS;
- } catch (Exception e) {
- return TracCorePlugin.toStatus(e);
+ } catch (final Exception e) {
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (!isDisposed() && !submitButton.isDisposed()) {
+ TracUiPlugin.handleTracException(e);
+ // TracUiPlugin.handleTracException(event.getResult());
+ submitButton.setEnabled(true);
+ TracTaskEditor.this.showBusy(false);
+ }
+ }
+ });
+ return Status.CANCEL_STATUS;
}
}

Back to the top