Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2011-04-15 06:12:28 -0400
committerspingel2011-04-15 06:12:28 -0400
commit79dc8e94c47053b685db395227a58af530f29864 (patch)
tree462189aacc5836a541199e33d15f3a21910bbcb6 /org.eclipse.mylyn.tasks.bugs
parentf269958778a9a8069715ea3517d0b54437f39d61 (diff)
downloadorg.eclipse.mylyn.tasks-79dc8e94c47053b685db395227a58af530f29864.tar.gz
org.eclipse.mylyn.tasks-79dc8e94c47053b685db395227a58af530f29864.tar.xz
org.eclipse.mylyn.tasks-79dc8e94c47053b685db395227a58af530f29864.zip
RESOLVED - bug 341886: [win] "Report bug or enhancement" opens two tasks when using the keyboard
https://bugs.eclipse.org/bugs/show_bug.cgi?id=341886
Diffstat (limited to 'org.eclipse.mylyn.tasks.bugs')
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportBugOrEnhancementWizard.java31
1 files changed, 22 insertions, 9 deletions
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportBugOrEnhancementWizard.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportBugOrEnhancementWizard.java
index 063c95b8f..86298d436 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportBugOrEnhancementWizard.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportBugOrEnhancementWizard.java
@@ -109,6 +109,8 @@ public class ReportBugOrEnhancementWizard extends Wizard {
private SupportContentProvider contentProvider;
+ private boolean inFinish;
+
public ReportBugOrEnhancementWizard() {
setForcePreviousAndNextButtons(true);
setNeedsProgressMonitor(true);
@@ -150,17 +152,28 @@ public class ReportBugOrEnhancementWizard extends Wizard {
if (!(product instanceof SupportProduct)) {
return false;
}
-
- TaskErrorReporter reporter = TasksBugsPlugin.getTaskErrorReporter();
- IStatus status = new ProductStatus((IProduct) product);
- SupportRequest request = reporter.preProcess(status, ((ProductStatus) status).getProduct());
- if (!((AttributeTaskMapper) request.getDefaultContribution()).isMappingComplete()) {
- TasksUiInternal.displayStatus(Messages.ReportBugOrEnhancementWizard_Report_Bug_or_Enhancement, new Status(
- IStatus.ERROR, TasksBugsPlugin.ID_PLUGIN,
- Messages.ReportBugOrEnhancementWizard_Support_request_faild_Information_incomplete_Error));
+ // bug 341886: avoid executing finish twice
+ if (inFinish) {
return false;
}
- return reporter.process(request.getDefaultContribution(), getContainer());
+ try {
+ inFinish = true;
+ TaskErrorReporter reporter = TasksBugsPlugin.getTaskErrorReporter();
+ IStatus status = new ProductStatus((IProduct) product);
+ SupportRequest request = reporter.preProcess(status, ((ProductStatus) status).getProduct());
+ if (!((AttributeTaskMapper) request.getDefaultContribution()).isMappingComplete()) {
+ TasksUiInternal.displayStatus(
+ Messages.ReportBugOrEnhancementWizard_Report_Bug_or_Enhancement,
+ new Status(
+ IStatus.ERROR,
+ TasksBugsPlugin.ID_PLUGIN,
+ Messages.ReportBugOrEnhancementWizard_Support_request_faild_Information_incomplete_Error));
+ return false;
+ }
+ return reporter.process(request.getDefaultContribution(), getContainer());
+ } finally {
+ inFinish = false;
+ }
}
}

Back to the top