Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/pages/TemplateInputDialog.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/pages/TemplateInputDialog.java b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/pages/TemplateInputDialog.java
index 42882200ed1..a3381a3c4ee 100644
--- a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/pages/TemplateInputDialog.java
+++ b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/pages/TemplateInputDialog.java
@@ -274,12 +274,17 @@ public class TemplateInputDialog extends Dialog {
public int popDuplicate() {
- MessageBox mBox = new MessageBox(new Shell(), SWT.ICON_INFORMATION);
- mBox.setText(TemplatePreferencePage.Message);
- mBox.setMessage(TemplatePreferencePage.DuplicateEntry);
- int result = mBox.open();
- return result;
-
+ final int[] result = new int[]{ 0 };
+ Display.getDefault().syncExec(new Runnable() {
+ @Override
+ public void run() {
+ MessageBox mBox = new MessageBox(Display.getCurrent().getActiveShell(), SWT.ICON_INFORMATION);
+ mBox.setText(TemplatePreferencePage.Message);
+ mBox.setMessage(TemplatePreferencePage.DuplicateEntry);
+ result[0] = mBox.open();
+ }
+ });
+ return result[0];
}
/*

Back to the top