Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2011-05-12 23:31:23 +0000
committerspingel2011-05-12 23:31:23 +0000
commitb2688f320d34f8ff85f2ad07918db2143de3003f (patch)
tree75222a477f2bc6a799b1d2f1aa63f180f6e52f95 /org.eclipse.mylyn.bugzilla.ui
parent2d7a669730eb1f8d01dba84cb952fb2c800272f2 (diff)
downloadorg.eclipse.mylyn.tasks-b2688f320d34f8ff85f2ad07918db2143de3003f.tar.gz
org.eclipse.mylyn.tasks-b2688f320d34f8ff85f2ad07918db2143de3003f.tar.xz
org.eclipse.mylyn.tasks-b2688f320d34f8ff85f2ad07918db2143de3003f.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.java85
1 files changed, 40 insertions, 45 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 c2d94f34e..256693d11 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
@@ -20,8 +20,6 @@ import java.util.Set;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
@@ -39,9 +37,6 @@ import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration;
import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin;
import org.eclipse.mylyn.internal.provisional.commons.ui.WorkbenchUtil;
import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionPart;
-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.RepositoryResponse;
import org.eclipse.mylyn.tasks.core.RepositoryStatus;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -517,46 +512,46 @@ 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) {
+// 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;
+// }
+// }
return true;
}
}

Back to the top