Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2009-09-10 20:40:16 +0000
committerfbecker2009-09-10 20:40:16 +0000
commit1cd51271a955012bbda82cde860a4089da6ee45d (patch)
tree7c0e974120236809d99840f6d6a6b8a63726f4e7 /org.eclipse.mylyn.bugzilla.ui/src
parented46cdda8c08c9da53530533a3aa35b187ea6ce5 (diff)
downloadorg.eclipse.mylyn.tasks-1cd51271a955012bbda82cde860a4089da6ee45d.tar.gz
org.eclipse.mylyn.tasks-1cd51271a955012bbda82cde860a4089da6ee45d.tar.xz
org.eclipse.mylyn.tasks-1cd51271a955012bbda82cde860a4089da6ee45d.zip
ASSIGNED - bug 288690: changes submitted blank on < 3.0 bugzillas
https://bugs.eclipse.org/bugs/show_bug.cgi?id=288690
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui/src')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java47
1 files changed, 26 insertions, 21 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 942095326..8432f00e5 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
@@ -379,31 +379,36 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage {
protected void handleTaskSubmitted(SubmitJobEvent event) {
if (event.getJob().getResponse() != null && event.getJob().getResponse() instanceof BugzillaRepositoryResponse) {
final RepositoryResponse response = event.getJob().getResponse();
- getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Changes_Submitted_Message,
- IMessageProvider.INFORMATION, new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent event) {
- String mes = ""; //$NON-NLS-1$
- if (response instanceof BugzillaRepositoryResponse) {
- BugzillaRepositoryResponse bugzillaResponse = (BugzillaRepositoryResponse) response;
- for (String iterable_element : bugzillaResponse.getResponseData().keySet()) {
- mes += NLS.bind(Messages.BugzillaTaskEditorPage_Changes_Submitted_Action_Line,
- iterable_element);
- List<String> o = bugzillaResponse.getResponseData().get(iterable_element);
- for (String string : o) {
- mes += NLS.bind(Messages.BugzillaTaskEditorPage_Changes_Submitted_Email_Line,
- string);
+ if (response instanceof BugzillaRepositoryResponse) {
+ final BugzillaRepositoryResponse bugzillaResponse = (BugzillaRepositoryResponse) response;
+ if (bugzillaResponse.getResponseData().size() > 0) {
+ getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Changes_Submitted_Message,
+ IMessageProvider.INFORMATION, new HyperlinkAdapter() {
+ @Override
+ public void linkActivated(HyperlinkEvent event) {
+ String mes = ""; //$NON-NLS-1$
+ for (String iterable_element : bugzillaResponse.getResponseData().keySet()) {
+ mes += NLS.bind(Messages.BugzillaTaskEditorPage_Changes_Submitted_Action_Line,
+ iterable_element);
+ List<String> o = bugzillaResponse.getResponseData().get(iterable_element);
+ for (String string : o) {
+ mes += NLS.bind(
+ Messages.BugzillaTaskEditorPage_Changes_Submitted_Email_Line,
+ string);
+ }
}
+ new MessageDialog(WorkbenchUtil.getShell(),
+ Messages.BugzillaTaskEditorPage_Changes_Submitted_Titel, null, mes,
+ MessageDialog.INFORMATION, new String[] { IDialogConstants.OK_LABEL }, 0).open();
}
- new MessageDialog(WorkbenchUtil.getShell(),
- Messages.BugzillaTaskEditorPage_Changes_Submitted_Titel, null, mes,
- MessageDialog.INFORMATION, new String[] { IDialogConstants.OK_LABEL }, 0).open();
- }
- }
- });
+ });
+ } else {
+ getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Changes_Submitted_Message,
+ IMessageProvider.INFORMATION);
+ }
+ }
} else {
super.handleTaskSubmitted(event);
}
}
-
}

Back to the top