Author: max.andersen(a)jboss.com
Date: 2012-05-23 17:41:59 -0400 (Wed, 23 May 2012)
New Revision: 41320
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting/UsageReport.java
Log:
JBIDE-11862 applied victors patch using getModelDialogShellProvider for usage dialog
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting/UsageReport.java
===================================================================
---
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting/UsageReport.java 2012-05-23
21:08:35 UTC (rev 41319)
+++
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting/UsageReport.java 2012-05-23
21:41:59 UTC (rev 41320)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * Copyright (c) 2010-2012 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -16,6 +16,8 @@
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
import org.jboss.tools.usage.googleanalytics.GoogleAnalyticsUrlStrategy;
import org.jboss.tools.usage.googleanalytics.IJBossToolsEclipseEnvironment;
import org.jboss.tools.usage.http.HttpGetRequest;
@@ -130,9 +132,10 @@
Display.getDefault().syncExec(new Runnable() {
public void run() {
+ Shell shell = PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
UsageReportEnablementDialog dialog =
new UsageReportEnablementDialog(
- Display.getCurrent().getActiveShell(),
+ shell,
JBossToolsUsageActivator.getDefault().getUsageBranding());
if (dialog.open() == Window.OK) {
userResponse[0] = dialog.isReportEnabled();