Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2015-09-11 13:38:12 -0400
committerEike Stepper2015-09-11 13:38:12 -0400
commitc4296cce99314f65943175a88b3b3f934bd7c8ef (patch)
tree4980f0fd924b9d232ee1679ac984b2d654f41e53
parent311f50677fba7b4db040ba8eaf637910a417b984 (diff)
downloadcdo-c4296cce99314f65943175a88b3b3f934bd7c8ef.tar.gz
cdo-c4296cce99314f65943175a88b3b3f934bd7c8ef.tar.xz
cdo-c4296cce99314f65943175a88b3b3f934bd7c8ef.zip
[477237] Empty intermediate shell visible
https://bugs.eclipse.org/bugs/show_bug.cgi?id=477237
-rw-r--r--features/org.eclipse.emf.cdo.examples.installer-feature/feature.xml2
-rw-r--r--features/org.eclipse.emf.cdo.migrator-feature/feature.xml2
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.client.offline/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/Application.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/Application.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.migrator/META-INF/MANIFEST.MF11
-rw-r--r--plugins/org.eclipse.emf.cdo.migrator/src/org/eclipse/emf/cdo/internal/migrator/actions/MigrateAction.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/CreateBranchActionDelegate.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ExportResourceActionDelegate.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ImportResourceActionDelegate.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/BulkAddDialog.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenAuditDialog.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenDurableViewDialog.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/PackageRegistryDialog.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/RollbackTransactionDialog.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectClassDialog.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryPluginDropAdapter.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOInteractiveExceptionHandler.java2
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/LongRunningAction.java7
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/SafeActionDelegate.java7
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/confirmation/InteractiveConfirmationProvider.java16
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/InteractiveCredentialsProvider.java32
25 files changed, 65 insertions, 105 deletions
diff --git a/features/org.eclipse.emf.cdo.examples.installer-feature/feature.xml b/features/org.eclipse.emf.cdo.examples.installer-feature/feature.xml
index 33f9a7d9a6..a13883a477 100644
--- a/features/org.eclipse.emf.cdo.examples.installer-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.examples.installer-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.emf.cdo.examples.installer"
label="%featureName"
- version="4.2.200.qualifier"
+ version="4.2.300.qualifier"
provider-name="%providerName"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.emf.cdo.license"
diff --git a/features/org.eclipse.emf.cdo.migrator-feature/feature.xml b/features/org.eclipse.emf.cdo.migrator-feature/feature.xml
index 91f39a0deb..c89337088b 100644
--- a/features/org.eclipse.emf.cdo.migrator-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.migrator-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.emf.cdo.migrator"
label="%featureName"
- version="4.2.200.qualifier"
+ version="4.2.300.qualifier"
provider-name="%providerName"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.emf.cdo.license"
diff --git a/plugins/org.eclipse.emf.cdo.examples.client.offline/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.examples.client.offline/META-INF/MANIFEST.MF
index a8812c9429..8cb293d6b4 100644
--- a/plugins/org.eclipse.emf.cdo.examples.client.offline/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.examples.client.offline/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.examples.client.offline;singleton:=true
-Bundle-Version: 4.2.200.qualifier
+Bundle-Version: 4.2.300.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
@@ -23,6 +23,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.net4j.util.ui;bundle-version="[3.0.0,4.0.0)"
Import-Package: org.h2.jdbcx;version="[1.0.0,2.0.0)"
Bundle-ClassPath: .
-Export-Package: org.eclipse.emf.cdo.examples.client.offline;version="4.2.200";x-internal:=true,
- org.eclipse.emf.cdo.examples.client.offline.nodes;version="4.2.200";x-internal:=true,
+Export-Package: org.eclipse.emf.cdo.examples.client.offline;version="4.2.300";x-internal:=true,
+ org.eclipse.emf.cdo.examples.client.offline.nodes;version="4.2.300";x-internal:=true,
org.eclipse.wb.swt;version="4.2.100";x-internal:=true
diff --git a/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/Application.java b/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/Application.java
index 926ca55410..758dda81b1 100644
--- a/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/Application.java
+++ b/plugins/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/Application.java
@@ -14,11 +14,12 @@ import org.eclipse.emf.cdo.examples.client.offline.nodes.Node;
import org.eclipse.emf.cdo.examples.client.offline.nodes.NodeManager;
import org.eclipse.emf.cdo.examples.client.offline.nodes.NodeManagerDialog;
+import org.eclipse.net4j.util.ui.UIUtil;
+
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
@@ -49,7 +50,7 @@ public class Application implements IApplication
}
NodeManager nodeManager = new NodeManager(new File(rootProperty));
- NodeManagerDialog dialog = new NodeManagerDialog(new Shell(), nodeManager);
+ NodeManagerDialog dialog = new NodeManagerDialog(UIUtil.getShell(), nodeManager);
if (dialog.open() != NodeManagerDialog.OK)
{
return IApplication.EXIT_OK;
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.examples.installer/META-INF/MANIFEST.MF
index 82b58c99f3..49ccba010b 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.examples.installer;singleton:=true
-Bundle-Version: 4.1.300.qualifier
+Bundle-Version: 4.1.400.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/META-INF/MANIFEST.MF
index a8812c9429..8cb293d6b4 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.examples.client.offline;singleton:=true
-Bundle-Version: 4.2.200.qualifier
+Bundle-Version: 4.2.300.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
@@ -23,6 +23,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.net4j.util.ui;bundle-version="[3.0.0,4.0.0)"
Import-Package: org.h2.jdbcx;version="[1.0.0,2.0.0)"
Bundle-ClassPath: .
-Export-Package: org.eclipse.emf.cdo.examples.client.offline;version="4.2.200";x-internal:=true,
- org.eclipse.emf.cdo.examples.client.offline.nodes;version="4.2.200";x-internal:=true,
+Export-Package: org.eclipse.emf.cdo.examples.client.offline;version="4.2.300";x-internal:=true,
+ org.eclipse.emf.cdo.examples.client.offline.nodes;version="4.2.300";x-internal:=true,
org.eclipse.wb.swt;version="4.2.100";x-internal:=true
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/Application.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/Application.java
index 926ca55410..758dda81b1 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/Application.java
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client.offline/src/org/eclipse/emf/cdo/examples/client/offline/Application.java
@@ -14,11 +14,12 @@ import org.eclipse.emf.cdo.examples.client.offline.nodes.Node;
import org.eclipse.emf.cdo.examples.client.offline.nodes.NodeManager;
import org.eclipse.emf.cdo.examples.client.offline.nodes.NodeManagerDialog;
+import org.eclipse.net4j.util.ui.UIUtil;
+
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
@@ -49,7 +50,7 @@ public class Application implements IApplication
}
NodeManager nodeManager = new NodeManager(new File(rootProperty));
- NodeManagerDialog dialog = new NodeManagerDialog(new Shell(), nodeManager);
+ NodeManagerDialog dialog = new NodeManagerDialog(UIUtil.getShell(), nodeManager);
if (dialog.open() != NodeManagerDialog.OK)
{
return IApplication.EXIT_OK;
diff --git a/plugins/org.eclipse.emf.cdo.migrator/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.migrator/META-INF/MANIFEST.MF
index c35bbf8a5b..2ed6808ab2 100644
--- a/plugins/org.eclipse.emf.cdo.migrator/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.migrator/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.migrator;singleton:=true
-Bundle-Version: 3.0.500.qualifier
+Bundle-Version: 3.0.600.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -11,8 +11,9 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.ecore.xmi;bundle-version="[2.5.0,3.0.0)",
- org.eclipse.emf.importer;bundle-version="[2.5.0,3.0.0)"
+ org.eclipse.emf.importer;bundle-version="[2.5.0,3.0.0)",
+ org.eclipse.net4j.util.ui;bundle-version="[3.6.0,4.0.0)"
Export-Package: org.eclipse.emf.cdo.internal.messages;version="3.0.200";x-internal:=true,
- org.eclipse.emf.cdo.internal.migrator;version="3.0.500";x-internal:=true,
- org.eclipse.emf.cdo.internal.migrator.actions;version="3.0.500";x-internal:=true,
- org.eclipse.emf.cdo.internal.migrator.wizards;version="3.0.500";x-internal:=true
+ org.eclipse.emf.cdo.internal.migrator;version="3.0.600";x-internal:=true,
+ org.eclipse.emf.cdo.internal.migrator.actions;version="3.0.600";x-internal:=true,
+ org.eclipse.emf.cdo.internal.migrator.wizards;version="3.0.600";x-internal:=true
diff --git a/plugins/org.eclipse.emf.cdo.migrator/src/org/eclipse/emf/cdo/internal/migrator/actions/MigrateAction.java b/plugins/org.eclipse.emf.cdo.migrator/src/org/eclipse/emf/cdo/internal/migrator/actions/MigrateAction.java
index 6fef2489dc..2ff966cb1d 100644
--- a/plugins/org.eclipse.emf.cdo.migrator/src/org/eclipse/emf/cdo/internal/migrator/actions/MigrateAction.java
+++ b/plugins/org.eclipse.emf.cdo.migrator/src/org/eclipse/emf/cdo/internal/migrator/actions/MigrateAction.java
@@ -13,6 +13,8 @@ package org.eclipse.emf.cdo.internal.migrator.actions;
import org.eclipse.emf.cdo.internal.messages.Messages;
import org.eclipse.emf.cdo.internal.migrator.CDOMigratorUtil;
+import org.eclipse.net4j.util.ui.UIUtil;
+
import org.eclipse.emf.codegen.ecore.genmodel.GenDelegationKind;
import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
import org.eclipse.emf.common.util.EList;
@@ -33,7 +35,6 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PlatformUI;
@@ -165,14 +166,13 @@ public class MigrateAction implements IObjectActionDelegate
{
try
{
- final Shell shell = new Shell(display);
if (error)
{
- MessageDialog.openError(shell, Messages.getString("MigrateAction_10"), msg); //$NON-NLS-1$
+ MessageDialog.openError(UIUtil.getShell(), Messages.getString("MigrateAction_10"), msg); //$NON-NLS-1$
}
else
{
- MessageDialog.openInformation(shell, Messages.getString("MigrateAction_10"), msg); //$NON-NLS-1$
+ MessageDialog.openInformation(UIUtil.getShell(), Messages.getString("MigrateAction_10"), msg); //$NON-NLS-1$
}
}
catch (RuntimeException ignore)
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java
index ae64575060..e67f22e1a3 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
import java.text.MessageFormat;
@@ -47,7 +46,7 @@ public final class LoadResourceAction extends AbstractViewAction
resourcePath = dialog.getValue();
if (!getView().hasResource(resourcePath))
{
- MessageDialog.openError(new Shell(), Messages.getString("LoadResourceAction.2"), MessageFormat.format( //$NON-NLS-1$
+ MessageDialog.openError(getShell(), Messages.getString("LoadResourceAction.2"), MessageFormat.format( //$NON-NLS-1$
Messages.getString("LoadResourceAction.3"), resourcePath)); //$NON-NLS-1$
cancel();
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/CreateBranchActionDelegate.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/CreateBranchActionDelegate.java
index 68033b9ae0..eec46befbb 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/CreateBranchActionDelegate.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/CreateBranchActionDelegate.java
@@ -21,7 +21,6 @@ import org.eclipse.net4j.util.ui.actions.LongRunningActionDelegate;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
/**
* @author Eike Stepper
@@ -49,7 +48,7 @@ public class CreateBranchActionDelegate extends LongRunningActionDelegate
base = (CDOBranchPoint)element;
name = CreateBranchHandler.getValidChildName(base.getBranch());
- CreateBranchDialog dialog = new CreateBranchDialog(new Shell(), base, name);
+ CreateBranchDialog dialog = new CreateBranchDialog(getShell(), base, name);
if (dialog.open() == CreateBranchDialog.OK)
{
base = dialog.getBranchPoint();
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ExportResourceActionDelegate.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ExportResourceActionDelegate.java
index 47089443d9..aa2cc1d52d 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ExportResourceActionDelegate.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ExportResourceActionDelegate.java
@@ -32,7 +32,6 @@ import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
import java.io.IOException;
import java.util.ArrayList;
@@ -55,7 +54,7 @@ public class ExportResourceActionDelegate extends TransactionalBackgroundActionD
@Override
protected final CDOObject preRun(CDOObject object)
{
- ResourceDialog dialog = new ResourceDialog(new Shell(), Messages.getString("ExportSelectedResourceAction_1"), //$NON-NLS-1$
+ ResourceDialog dialog = new ResourceDialog(getShell(), Messages.getString("ExportSelectedResourceAction_1"), //$NON-NLS-1$
SWT.SAVE);
if (dialog.open() == ImportResourceDialog.OK)
{
@@ -70,7 +69,7 @@ public class ExportResourceActionDelegate extends TransactionalBackgroundActionD
return transactionalObject;
}
- MessageDialog.openError(new Shell(), Messages.getString("ExportResourceActionDelegate.0"), //$NON-NLS-1$
+ MessageDialog.openError(getShell(), Messages.getString("ExportResourceActionDelegate.0"), //$NON-NLS-1$
Messages.getString("ExportSelectedResourceAction_2")); //$NON-NLS-1$
cancel();
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ImportResourceActionDelegate.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ImportResourceActionDelegate.java
index 86f9f2f259..a6b145ac9d 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ImportResourceActionDelegate.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ImportResourceActionDelegate.java
@@ -28,7 +28,6 @@ import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
import java.util.ArrayList;
import java.util.List;
@@ -48,7 +47,7 @@ public class ImportResourceActionDelegate extends NewResourceActionDelegate
@Override
protected final CDOObject preRun(CDOObject object)
{
- ImportResourceDialog dialog = new ImportResourceDialog(new Shell(),
+ ImportResourceDialog dialog = new ImportResourceDialog(getShell(),
Messages.getString("ImportResourceToFolderAction_0"), SWT.OPEN); //$NON-NLS-1$
if (dialog.open() == ImportResourceDialog.OK)
{
@@ -66,7 +65,7 @@ public class ImportResourceActionDelegate extends NewResourceActionDelegate
return transactionalObject;
}
- MessageDialog.openError(new Shell(), Messages.getString("ImportResourceActionDelegate.0"), //$NON-NLS-1$
+ MessageDialog.openError(getShell(), Messages.getString("ImportResourceActionDelegate.0"), //$NON-NLS-1$
Messages.getString("ImportResourceToFolderAction_1")); //$NON-NLS-1$
cancel();
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/BulkAddDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/BulkAddDialog.java
index ea7a6f6bc4..76c8495417 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/BulkAddDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/BulkAddDialog.java
@@ -33,7 +33,6 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchPage;
@@ -57,7 +56,7 @@ public class BulkAddDialog extends TitleAreaDialog
public BulkAddDialog(IWorkbenchPage page, List<EReference> features)
{
- super(new Shell(page.getWorkbenchWindow().getShell()));
+ super(page.getWorkbenchWindow().getShell());
setShellStyle(getShellStyle() | SWT.APPLICATION_MODAL | SWT.MAX | SWT.TITLE | SWT.RESIZE);
this.page = page;
this.features = features;
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenAuditDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenAuditDialog.java
index 46a6ac727b..4990e7bd9a 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenAuditDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenAuditDialog.java
@@ -23,7 +23,6 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DateTime;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
import java.util.Calendar;
@@ -46,7 +45,7 @@ public class OpenAuditDialog extends TitleAreaDialog
public OpenAuditDialog(IWorkbenchPage page)
{
- super(new Shell(page.getWorkbenchWindow().getShell()));
+ super(page.getWorkbenchWindow().getShell());
this.page = page;
setShellStyle(getShellStyle() | SWT.APPLICATION_MODAL | SWT.MAX | SWT.TITLE | SWT.RESIZE);
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenDurableViewDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenDurableViewDialog.java
index d21d1b13a9..65afb1fc0e 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenDurableViewDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenDurableViewDialog.java
@@ -22,7 +22,6 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchPage;
@@ -41,7 +40,7 @@ public class OpenDurableViewDialog extends TitleAreaDialog
public OpenDurableViewDialog(IWorkbenchPage page)
{
- super(new Shell(page.getWorkbenchWindow().getShell()));
+ super(page.getWorkbenchWindow().getShell());
this.page = page;
setShellStyle(getShellStyle() | SWT.APPLICATION_MODAL | SWT.MAX | SWT.TITLE | SWT.RESIZE);
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/PackageRegistryDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/PackageRegistryDialog.java
index 37adb7f6e5..84de1997be 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/PackageRegistryDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/PackageRegistryDialog.java
@@ -45,7 +45,6 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.ui.IWorkbenchPage;
@@ -77,7 +76,7 @@ public class PackageRegistryDialog extends TitleAreaDialog
public PackageRegistryDialog(IWorkbenchPage page, CDOSession session)
{
- super(new Shell(page.getWorkbenchWindow().getShell()));
+ super(page.getWorkbenchWindow().getShell());
this.page = page;
this.session = session;
setShellStyle(getShellStyle() | SWT.APPLICATION_MODAL | SWT.MAX | SWT.TITLE | SWT.RESIZE);
@@ -147,21 +146,21 @@ public class PackageRegistryDialog extends TitleAreaDialog
});
createButton(parent, -1, Messages.getString("PackageRegistryDialog.7"), false) //$NON-NLS-1$
- .addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- new RegisterFilesystemPackagesAction(page, session)
+ .addSelectionListener(new SelectionAdapter()
{
@Override
- protected void postRegistration(List<EPackage> ePackages)
+ public void widgetSelected(SelectionEvent e)
{
- refreshViewer();
+ new RegisterFilesystemPackagesAction(page, session)
+ {
+ @Override
+ protected void postRegistration(List<EPackage> ePackages)
+ {
+ refreshViewer();
+ }
+ }.run();
}
- }.run();
- }
- });
+ });
CustomizeableComposite.customize(parent, IPluginContainer.INSTANCE, PRODUCT_GROUP, this);
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/RollbackTransactionDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/RollbackTransactionDialog.java
index 0890cf76aa..e0820ffbe9 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/RollbackTransactionDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/RollbackTransactionDialog.java
@@ -24,7 +24,6 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
/**
@@ -42,7 +41,7 @@ public class RollbackTransactionDialog extends TitleAreaDialog
public RollbackTransactionDialog(IWorkbenchPage page, String title, String description, CDOTransaction transaction)
{
- super(new Shell(page.getWorkbenchWindow().getShell()));
+ super(page.getWorkbenchWindow().getShell());
this.page = page;
this.title = title;
this.description = description;
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectClassDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectClassDialog.java
index 2dae341437..5212c87faf 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectClassDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectClassDialog.java
@@ -50,7 +50,6 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
import java.util.ArrayList;
@@ -83,7 +82,7 @@ public class SelectClassDialog extends TitleAreaDialog
public SelectClassDialog(IWorkbenchPage page, String title, String message)
{
- super(new Shell(page.getWorkbenchWindow().getShell()));
+ super(page.getWorkbenchWindow().getShell());
this.page = page;
this.title = title;
this.message = message;
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryPluginDropAdapter.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryPluginDropAdapter.java
index e0db0b8406..48cb53ba76 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryPluginDropAdapter.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryPluginDropAdapter.java
@@ -25,6 +25,7 @@ import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.container.IPluginContainer;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.IORuntimeException;
+import org.eclipse.net4j.util.ui.UIUtil;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.part.IDropActionDelegate;
@@ -81,7 +82,7 @@ public class RepositoryPluginDropAdapter implements IDropActionDelegate
return false;
}
- Shell shell = new Shell();
+ Shell shell = UIUtil.getShell();
return TransferDialog.open(shell, sourceElements, targetElement);
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOInteractiveExceptionHandler.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOInteractiveExceptionHandler.java
index e8212f797b..bc71daa80b 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOInteractiveExceptionHandler.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOInteractiveExceptionHandler.java
@@ -114,7 +114,7 @@ public class CDOInteractiveExceptionHandler implements CDOSession.ExceptionHandl
protected Shell getParentShell()
{
- return new Shell();
+ return UIUtil.getShell();
}
protected Dialog createDialog(CDOSession session, int attempt, Exception exception)
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/LongRunningAction.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/LongRunningAction.java
index 77eabea3a7..979ffb313c 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/LongRunningAction.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/LongRunningAction.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.util.ui.actions;
import org.eclipse.net4j.util.internal.ui.bundle.OM;
+import org.eclipse.net4j.util.ui.UIUtil;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -104,7 +105,7 @@ public abstract class LongRunningAction extends SafeAction
return page;
}
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ IWorkbenchWindow window = UIUtil.getActiveWorkbenchWindow();
if (window != null)
{
return window.getActivePage();
@@ -125,7 +126,7 @@ public abstract class LongRunningAction extends SafeAction
return page.getWorkbenchWindow();
}
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ return UIUtil.getActiveWorkbenchWindow();
}
/**
@@ -151,7 +152,7 @@ public abstract class LongRunningAction extends SafeAction
return workbenchWindow.getShell();
}
- return new Shell();
+ return UIUtil.getShell();
}
/**
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/SafeActionDelegate.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/SafeActionDelegate.java
index 7850049aa9..f3e4ae8fc2 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/SafeActionDelegate.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/SafeActionDelegate.java
@@ -73,8 +73,11 @@ public abstract class SafeActionDelegate implements IActionDelegate
catch (Exception ex)
{
OM.LOG.error(ex);
- MessageDialog.openError(null, getText(),
- ex.getLocalizedMessage() + "\n" + Messages.getString("SafeActionDelegate_0")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ Shell shell = getShell();
+ String text = getText();
+ String message = ex.getLocalizedMessage() + "\n" + Messages.getString("SafeActionDelegate_0"); //$NON-NLS-1$ //$NON-NLS-2$
+ MessageDialog.openError(shell, text, message);
}
}
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/confirmation/InteractiveConfirmationProvider.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/confirmation/InteractiveConfirmationProvider.java
index 698659bc0b..35b8ce3475 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/confirmation/InteractiveConfirmationProvider.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/confirmation/InteractiveConfirmationProvider.java
@@ -16,8 +16,6 @@ import org.eclipse.net4j.util.factory.ProductCreationException;
import org.eclipse.net4j.util.ui.UIUtil;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
import java.util.Set;
@@ -46,19 +44,7 @@ public class InteractiveConfirmationProvider implements IConfirmationProvider
{
public void run()
{
- Shell shell;
-
- try
- {
- IWorkbenchWindow window = UIUtil.getActiveWorkbenchWindow();
- shell = window.getShell();
- }
- catch (Exception ex)
- {
- shell = new Shell(display);
- }
-
- confirmation[0] = ConfirmationDialog.openConfirm(shell, subject, message, acceptable, suggestion);
+ confirmation[0] = ConfirmationDialog.openConfirm(UIUtil.getShell(), subject, message, acceptable, suggestion);
}
});
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/InteractiveCredentialsProvider.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/InteractiveCredentialsProvider.java
index f0fd9889e6..cc2be61ccb 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/InteractiveCredentialsProvider.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/InteractiveCredentialsProvider.java
@@ -27,7 +27,6 @@ import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
import java.text.MessageFormat;
@@ -62,19 +61,7 @@ public class InteractiveCredentialsProvider implements IPasswordCredentialsProvi
{
public void run()
{
- Shell shell;
-
- try
- {
- IWorkbenchWindow window = UIUtil.getActiveWorkbenchWindow();
- shell = window.getShell();
- }
- catch (Exception ex)
- {
- shell = new Shell(display);
- }
-
- CredentialsDialog dialog = new CredentialsDialog(shell, realm);
+ CredentialsDialog dialog = new CredentialsDialog(UIUtil.getShell(), realm);
if (dialog.open() == CredentialsDialog.OK)
{
credentials[0] = dialog.getCredentials();
@@ -105,17 +92,7 @@ public class InteractiveCredentialsProvider implements IPasswordCredentialsProvi
{
public void run()
{
- Shell shell;
-
- try
- {
- IWorkbenchWindow window = UIUtil.getActiveWorkbenchWindow();
- shell = window.getShell();
- }
- catch (Exception ex)
- {
- shell = new Shell(display);
- }
+ Shell shell = UIUtil.getShell();
if (operation == CredentialsUpdateOperation.CHANGE_PASSWORD)
{
@@ -134,11 +111,10 @@ public class InteractiveCredentialsProvider implements IPasswordCredentialsProvi
final String newPassword = new String(update[0].getNewPassword());
MessageDialog msg = new MessageDialog(shell, Messages.getString("InteractiveCredentialsProvider.0"), null, //$NON-NLS-1$
- MessageFormat.format(
- Messages.getString("InteractiveCredentialsProvider.1"), //$NON-NLS-1$
+ MessageFormat.format(Messages.getString("InteractiveCredentialsProvider.1"), //$NON-NLS-1$
userID, newPassword),
MessageDialog.INFORMATION, new String[] { Messages.getString("InteractiveCredentialsProvider.2"), //$NON-NLS-1$
- IDialogConstants.OK_LABEL },
+ IDialogConstants.OK_LABEL },
0)
{

Back to the top