diff options
author | relves | 2007-05-01 01:17:36 +0000 |
---|---|---|
committer | relves | 2007-05-01 01:17:36 +0000 |
commit | dc089c2b1b51915f9032cb703ba404f84856f311 (patch) | |
tree | 1a28026f7d1bb0140c8f49a7b035f2be5c6cfcf4 | |
parent | c132da1543f7c1ac6ccfc515523f1fc9029f7daa (diff) | |
download | org.eclipse.mylyn.tasks-dc089c2b1b51915f9032cb703ba404f84856f311.tar.gz org.eclipse.mylyn.tasks-dc089c2b1b51915f9032cb703ba404f84856f311.tar.xz org.eclipse.mylyn.tasks-dc089c2b1b51915f9032cb703ba404f84856f311.zip |
NEW - bug 184811: Connectivity issues should be reported in editor banner upon submit
https://bugs.eclipse.org/bugs/show_bug.cgi?id=184811
-rw-r--r-- | org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java index de6af5f26..830a99840 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java @@ -163,6 +163,8 @@ import org.eclipse.ui.views.contentoutline.IContentOutlinePage; */ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage { + private static final String ERROR_NOCONNECTIVITY = "Unable to submit at this time. Check connectivity and re-try."; + private static final String LABEL_HISTORY = "History"; private static final String LABEL_REPLY = "Reply"; @@ -2821,7 +2823,10 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage { protected IStatus handleSubmitError(final CoreException exception) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { - if (exception.getStatus().getCode() == IMylarStatusConstants.REPOSITORY_COMMENT_REQD) { + if (exception.getStatus().getCode() == IMylarStatusConstants.IO_ERROR) { + parentEditor.setMessage(ERROR_NOCONNECTIVITY, IMessageProvider.ERROR); + MylarStatusHandler.log(exception.getStatus()); + } else if (exception.getStatus().getCode() == IMylarStatusConstants.REPOSITORY_COMMENT_REQD) { MylarStatusHandler.displayStatus("Comment required", exception.getStatus()); if (!isDisposed && newCommentTextViewer != null && !newCommentTextViewer.getControl().isDisposed()) { newCommentTextViewer.getControl().setFocus(); @@ -2834,7 +2839,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage { } else { MylarStatusHandler.displayStatus("Submit failed", exception.getStatus()); } - setGlobalBusy(false);// enableButtons(); + setGlobalBusy(false); } }); |