Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2011-06-29 17:14:21 +0000
committerfbecker2011-06-29 17:14:21 +0000
commitd7bdddd0158c9523d5bfc965c1accc8c0cc6bb73 (patch)
treeece09277e5c9aaa09b04f4a3708a3467dd000726 /org.eclipse.mylyn.bugzilla.ui
parent0c1d6c747e7be4b4913a39172b542e291a674a5e (diff)
downloadorg.eclipse.mylyn.tasks-d7bdddd0158c9523d5bfc965c1accc8c0cc6bb73.tar.gz
org.eclipse.mylyn.tasks-d7bdddd0158c9523d5bfc965c1accc8c0cc6bb73.tar.xz
org.eclipse.mylyn.tasks-d7bdddd0158c9523d5bfc965c1accc8c0cc6bb73.zip
ASSIGNED - bug 345056: disable the submit button if we know that we get an error
https://bugs.eclipse.org/bugs/show_bug.cgi?id=345056
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java60
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties2
2 files changed, 21 insertions, 41 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
index 42acc3194..5ac2e55e2 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java
@@ -545,46 +545,26 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
});
return false;
}
-// if (!getModel().getTaskData().isNew()) {
-// TaskAttribute exporter = getModel().getTaskData()
-// .getRoot()
-// .getAttribute(BugzillaAttribute.EXPORTER_NAME.getKey());
-// if (exporter == null) {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_submit_disabled_please_refresh,
-// type, new HyperlinkAdapter() {
-// @Override
-// public void linkActivated(HyperlinkEvent e) {
-// ITask task = getModel().getTask();
-// AbstractRepositoryConnector connector = TasksUi.getRepositoryManager()
-// .getRepositoryConnector(task.getConnectorKind());
-// if (connector == null) {
-// return;
-// }
-// TasksUiInternal.synchronizeTask(connector, task, true, new JobChangeAdapter() {
-// @Override
-// public void done(IJobChangeEvent event) {
-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-// public void run() {
-// try {
-// getTaskEditor().refreshPages();
-// } finally {
-// if (getTaskEditor() != null) {
-// getTaskEditor().showBusy(false);
-// }
-// }
-// }
-// });
-// }
-// });
-// }
-// });
-// }
-// });
-// return false;
-// }
-// }
+ if (!getModel().getTaskData().isNew()) {
+ TaskAttribute exporter = getModel().getTaskData()
+ .getRoot()
+ .getAttribute(BugzillaAttribute.EXPORTER_NAME.getKey());
+ if (exporter == null || exporter.getValue().equals("")) { //$NON-NLS-1$
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_submit_disabled_please_refresh,
+ type, new HyperlinkAdapter() {
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
+ TasksUiUtil.openEditRepositoryWizard(taskRepository);
+ refresh();
+ }
+ });
+ }
+ });
+ return false;
+ }
+ }
return true;
}
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties
index bc3ad6911..ec01b9b96 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties
@@ -37,7 +37,7 @@ BugzillaTaskEditorPage_Please_enter_a_description_before_submitting=Please enter
BugzillaTaskEditorPage_Please_enter_a_short_summary_before_submitting=Please enter a short summary before submitting
BugzillaTaskEditorPage_Please_select_a_component_before_submitting=Please select a component before submitting
BugzillaTaskEditorPage_Please_enter_a_bugid_for_duplicate_of_before_submitting=Please enter a bugid for \"duplicate of\" before submitting
-BugzillaTaskEditorPage_submit_disabled_please_refresh=submit disabled, please refresh
+BugzillaTaskEditorPage_submit_disabled_please_refresh=submit disabled, please check Credentials and refresh
BugzillaVotesEditor_Show_votes=Show votes
BugzillaVotesEditor_Vote=Vote

Back to the top