Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-02-22 18:49:55 -0500
committerSusan Franklin2010-02-22 18:49:55 -0500
commit130f552776b5eaf042b98b6ad0272bcc4d838c2c (patch)
tree6aba819734fa6036ba77fdc3f4b867f814cd448d
parent4ac2e5c553b7f30bbb08de2c7d1b4171d2ee813d (diff)
downloadrt.equinox.p2-130f552776b5eaf042b98b6ad0272bcc4d838c2c.tar.gz
rt.equinox.p2-130f552776b5eaf042b98b6ad0272bcc4d838c2c.tar.xz
rt.equinox.p2-130f552776b5eaf042b98b6ad0272bcc4d838c2c.zip
Bug 303264 - [ui] adopt new platform UI API for getting modal shell parentv20100222
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java60
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml10
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF2
24 files changed, 39 insertions, 104 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
index d9d22f2f0..9802948c3 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
@@ -7,7 +7,7 @@ Bundle-SymbolicName: org.eclipse.equinox.p2.tests.ui
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.100",
- org.eclipse.ui;bundle-version="3.5.0",
+ org.eclipse.ui;bundle-version="3.6.0",
org.eclipse.equinox.p2.metadata;bundle-version="1.0.0",
org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.100",
org.eclipse.equinox.p2.ui;bundle-version="1.0.100",
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
index 6633c28d1..7b4495674 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
@@ -310,7 +310,7 @@ public class AutomaticUpdater implements IUpdateListener {
}
public void launchUpdate() {
- getProvisioningUI().openUpdateWizard(getProvisioningUI().getDefaultParentShell(), false, operation, null);
+ getProvisioningUI().openUpdateWizard(false, operation, null);
}
/*
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
index 2106b3c4f..c04920c66 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
@@ -20,7 +20,7 @@ Import-Package: javax.xml.parsers,
org.xml.sax
Export-Package: org.eclipse.equinox.internal.p2.ui.sdk;x-internal:=true,
org.eclipse.equinox.internal.p2.ui.sdk.prefs;x-internal:=true
-Require-Bundle: org.eclipse.ui,
+Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
org.eclipse.core.runtime,
org.eclipse.equinox.p2.ui
Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java
index 20f281b10..621b658e7 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java
@@ -28,7 +28,7 @@ public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
}
protected void doExecute(LoadMetadataRepositoryJob job) {
- getProvisioningUI().openInstallWizard(getShell(), null, null, job);
+ getProvisioningUI().openInstallWizard(null, null, job);
}
protected boolean waitForPreload() {
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
index 6aa65fa61..4139b4fa2 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
@@ -97,6 +97,6 @@ abstract class PreloadingRepositoryHandler extends AbstractHandler {
* @return a Shell
*/
protected Shell getShell() {
- return getProvisioningUI().getDefaultParentShell();
+ return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
}
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
index 8e1a72670..07d7e3023 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
@@ -38,7 +38,7 @@ public class UpdateHandler extends PreloadingRepositoryHandler {
// check for updates
operation.resolveModal(null);
if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
- getProvisioningUI().openUpdateWizard(getShell(), false, operation, job);
+ getProvisioningUI().openUpdateWizard(false, operation, job);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
index 236db7a77..564065f47 100644
--- a/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
@@ -44,7 +44,7 @@ Export-Package: org.eclipse.equinox.internal.p2.ui;x-friends:="org.eclipse.equin
org.eclipse.equinox.internal.p2.ui.query;x-friends:="org.eclipse.equinox.p2.ui.admin, org.eclipse.equinox.internal.p2.ui.analysis",
org.eclipse.equinox.internal.p2.ui.viewers;x-friends:="org.eclipse.equinox.p2.ui.admin, org.eclipse.equinox.p2.ui.sdk.scheduler",
org.eclipse.equinox.p2.ui
-Require-Bundle: org.eclipse.ui,
+Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
org.eclipse.core.runtime,
org.eclipse.core.expressions,
org.eclipse.equinox.security.ui;bundle-version="[1.0.0,2.0.0)",
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java
index d8417a094..bd358ed3b 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java
@@ -22,10 +22,9 @@ import org.eclipse.equinox.p2.metadata.query.CategoryQuery;
import org.eclipse.equinox.p2.operations.ProvisioningSession;
import org.eclipse.equinox.p2.ui.Policy;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.*;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.statushandlers.StatusManager;
@@ -123,63 +122,10 @@ public class ProvUI {
/**
* Returns a shell that is appropriate to use as the parent
- * for a modal dialog. This returns the existing modal dialog, if any,
- * or a workbench window if no modal dialogs open. Returns <code>null</code>
- * if there is no appropriate default parent.
- *
- * This method is copied from ProgressManagerUtil#getDefaultParent()
+ * for a modal dialog.
*/
public static Shell getDefaultParentShell() {
- IWorkbench workbench = PlatformUI.getWorkbench();
-
- //look first for the topmost modal shell
- Shell shell = getDefaultParentShell(workbench.getDisplay().getShells());
-
- if (shell != null) {
- return shell;
- }
-
- //try the active workbench window
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- if (window != null)
- return window.getShell();
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- if (windows.length > 0)
- return windows[0].getShell();
- //there is no modal shell and no active window, so just return a null parent shell
- return null;
- }
-
- /**
- * Return the modal shell that is currently open. If there isn't one then
- * return null.
- *
- * @param shells shells to search for modal children
- * @return the most specific modal child, or null if none
- *
- * This method is copied from ProgressManagerUtil#getDefaultParent()
- */
-
- private static Shell getDefaultParentShell(Shell[] shells) {
- //first look for a modal shell
- for (int i = shells.length - 1; i >= 0; i--) {
- Shell shell = shells[i];
-
- // Check if this shell has a modal child
- Shell modalChild = getDefaultParentShell(shell.getShells());
- if (modalChild != null) {
- return modalChild;
- }
-
- // Do not worry about shells that will not block the user.
- if (shell.isVisible()) {
- int modal = SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL;
- if ((shell.getStyle() & modal) != 0) {
- return shell;
- }
- }
- }
- return null;
+ return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
}
public static void addProvisioningListener(ProvUIProvisioningListener listener) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java
index ff289cfb6..8d9133213 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java
@@ -58,7 +58,7 @@ public class InstallAction extends ProfileModificationAction {
}
protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
- return getProvisioningUI().openInstallWizard(getShell(), ius, (InstallOperation) operation, null);
+ return getProvisioningUI().openInstallWizard(ius, (InstallOperation) operation, null);
}
protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java
index bedfc531a..5bb281f35 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java
@@ -51,6 +51,6 @@ public class UninstallAction extends ExistingIUInProfileAction {
* @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#performAction(org.eclipse.equinox.p2.operations.ProfileChangeOperation, org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
*/
protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
- return ui.openUninstallWizard(getShell(), ius, (UninstallOperation) operation, null);
+ return ui.openUninstallWizard(ius, (UninstallOperation) operation, null);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java
index 2a72e53f7..289c52375 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java
@@ -67,6 +67,6 @@ public class UpdateAction extends ExistingIUInProfileAction {
* @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#performAction(org.eclipse.equinox.p2.operations.ProfileChangeOperation, org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
*/
protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
- return ui.openUpdateWizard(getShell(), skipSelectionPage, (UpdateOperation) operation, null);
+ return ui.openUpdateWizard(skipSelectionPage, (UpdateOperation) operation, null);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java
index a316d8007..4566875ae 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java
@@ -184,7 +184,6 @@ public class ProvisioningUI {
/**
* Open an install wizard for installing the specified IInstallableUnits
*
- * @param shell the shell to parent the wizard
* @param initialSelections the IInstallableUnits that should be selected when the wizard opens. May be <code>null</code>.
* @param operation the operation describing the proposed install. If this operation is not <code>null</code>, then a wizard showing
* only the IInstallableUnits described in the operation will be shown. If the operation is <code>null</code>, then a
@@ -194,16 +193,16 @@ public class ProvisioningUI {
*
* @return the wizard return code
*/
- public int openInstallWizard(Shell shell, Collection<IInstallableUnit> initialSelections, InstallOperation operation, LoadMetadataRepositoryJob job) {
+ public int openInstallWizard(Collection<IInstallableUnit> initialSelections, InstallOperation operation, LoadMetadataRepositoryJob job) {
if (operation == null) {
InstallWizard wizard = new InstallWizard(this, operation, initialSelections, job);
- WizardDialog dialog = new ProvisioningWizardDialog(shell, wizard);
+ WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
dialog.create();
PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.INSTALL_WIZARD);
return dialog.open();
}
PreselectedIUInstallWizard wizard = new PreselectedIUInstallWizard(this, operation, initialSelections, job);
- WizardDialog dialog = new ProvisioningWizardDialog(shell, wizard);
+ WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
dialog.create();
PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.INSTALL_WIZARD);
return dialog.open();
@@ -212,7 +211,6 @@ public class ProvisioningUI {
/**
* Open an update wizard for the specified update operation.
*
- * @param shell the shell to parent the wizard
* @param skipSelectionsPage <code>true</code> if the selection page should be skipped so that the user is
* viewing the resolution results. <code>false</code> if the update selection page should be shown first.
* @param operation the operation describing the proposed update. Must not be <code>null</code>.
@@ -221,10 +219,10 @@ public class ProvisioningUI {
*
* @return the wizard return code
*/
- public int openUpdateWizard(Shell shell, boolean skipSelectionsPage, UpdateOperation operation, LoadMetadataRepositoryJob job) {
+ public int openUpdateWizard(boolean skipSelectionsPage, UpdateOperation operation, LoadMetadataRepositoryJob job) {
UpdateWizard wizard = new UpdateWizard(this, operation, operation.getSelectedUpdates(), job);
wizard.setSkipSelectionsPage(skipSelectionsPage);
- WizardDialog dialog = new ProvisioningWizardDialog(shell, wizard);
+ WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
dialog.create();
PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.UPDATE_WIZARD);
return dialog.open();
@@ -233,7 +231,6 @@ public class ProvisioningUI {
/**
* Open an uninstall wizard for the specified uninstall operation.
*
- * @param shell the shell to parent the wizard
* @param initialSelections the IInstallableUnits that should be selected when the wizard opens. May be <code>null</code>.
* @param operation the operation describing the proposed uninstall. Must not be <code>null</code>.
* @param job a repository load job that is loading or has already loaded the repositories. Can be used to pass along
@@ -241,9 +238,9 @@ public class ProvisioningUI {
*
* @return the wizard return code
*/
- public int openUninstallWizard(Shell shell, Collection<IInstallableUnit> initialSelections, UninstallOperation operation, LoadMetadataRepositoryJob job) {
+ public int openUninstallWizard(Collection<IInstallableUnit> initialSelections, UninstallOperation operation, LoadMetadataRepositoryJob job) {
UninstallWizard wizard = new UninstallWizard(this, operation, initialSelections, job);
- WizardDialog dialog = new ProvisioningWizardDialog(shell, wizard);
+ WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
dialog.create();
PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.UNINSTALL_WIZARD);
return dialog.open();
@@ -290,14 +287,6 @@ public class ProvisioningUI {
}
/**
- * Return a shell appropriate for parenting a dialog.
- * @return a shell that can be used to parent a dialog.
- */
- public Shell getDefaultParentShell() {
- return ProvUI.getDefaultParentShell();
- }
-
- /**
* Schedule a job to execute the supplied ProvisioningOperation.
*
* @param job The operation to execute
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF
index 5796e7571..7e078dcc7 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.cloud; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.cloud.Activator
Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
+Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
org.eclipse.core.runtime,
org.eclipse.equinox.p2.operations;bundle-version="2.0.0",
org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java
index a7e9b7921..06643cca1 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java
@@ -28,7 +28,7 @@ public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
}
protected void doExecute(LoadMetadataRepositoryJob job) {
- getProvisioningUI().openInstallWizard(getShell(), null, null, job);
+ getProvisioningUI().openInstallWizard(null, null, job);
}
protected boolean waitForPreload() {
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java
index 66aa00c4a..a4c4710a2 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java
@@ -99,6 +99,6 @@ abstract class PreloadingRepositoryHandler extends AbstractHandler {
* @return a Shell
*/
protected Shell getShell() {
- return getProvisioningUI().getDefaultParentShell();
+ return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
}
}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java
index 77db223a1..ee65b365e 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java
@@ -31,7 +31,7 @@ public class UpdateHandler extends PreloadingRepositoryHandler {
// check for updates
operation.resolveModal(null);
if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
- getProvisioningUI().openUpdateWizard(getShell(), true, operation, job);
+ getProvisioningUI().openUpdateWizard(true, operation, job);
}
}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF
index 8f48754d0..72b45e32f 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility; si
Bundle-Version: 1.0.0.qualifier
Bundle-Localization: plugin
Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Activator
-Require-Bundle: org.eclipse.ui,
+Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
org.eclipse.core.runtime,
org.eclipse.equinox.ds,
org.eclipse.equinox.p2.operations;bundle-version="2.0.0",
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml
index 4847b0eb0..13964a440 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml
@@ -154,16 +154,16 @@
point="org.eclipse.ui.preferencePages">
<page
name="%provisioningPrefPage"
- class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.ProvisioningPreferencePage"
- id="org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage">
+ class="org.eclipse.equinox.p2.ui.ProvisioningPreferencePage"
+ id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.ProvisioningPreferencePage">
<keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
</page>
<page
name="%sitesPrefPage"
- category="org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"
- class="org.eclipse.equinox.internal.provisional.p2.ui.dialogs.RepositoryManipulationPage"
- id="org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage">
+ category="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.ProvisioningPreferencePage"
+ class="org.eclipse.equinox.p2.ui.RepositoryManipulationPage"
+ id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.SitesPreferencePage">
<keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
</page>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java
index 96e3758b9..4432c07fa 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java
@@ -28,7 +28,7 @@ public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
}
protected void doExecute(LoadMetadataRepositoryJob job) {
- getProvisioningUI().openInstallWizard(getShell(), null, null, job);
+ getProvisioningUI().openInstallWizard(null, null, job);
}
protected boolean waitForPreload() {
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java
index ea29eb88a..bd133104e 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,11 +11,11 @@
package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
/**
- * @since 3.4
+ * @since 3.6
*/
public class PreferenceConstants {
- public static final String PREF_PAGE_PROVISIONING = "org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"; //$NON-NLS-1$
- public static final String PREF_PAGE_SITES = "org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage"; //$NON-NLS-1$
+ public static final String PREF_PAGE_PROVISIONING = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.ProvisioningPreferencePage"; //$NON-NLS-1$
+ public static final String PREF_PAGE_SITES = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.SitesPreferencePage"; //$NON-NLS-1$
public static final String PREF_SHOW_LATEST_VERSION = "showLatestVersion"; //$NON-NLS-1$
public static final String PREF_OPEN_WIZARD_ON_ERROR_PLAN = "allowNonOKPlan"; //$NON-NLS-1$
}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java
index 552bc3b6c..df8436790 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java
@@ -99,6 +99,6 @@ abstract class PreloadingRepositoryHandler extends AbstractHandler {
* @return a Shell
*/
protected Shell getShell() {
- return getProvisioningUI().getDefaultParentShell();
+ return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
}
}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java
index b9e2fcdec..1883b78fc 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java
@@ -38,7 +38,7 @@ public class UpdateHandler extends PreloadingRepositoryHandler {
// check for updates
operation.resolveModal(null);
if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
- getProvisioningUI().openUpdateWizard(getShell(), true, operation, job);
+ getProvisioningUI().openUpdateWizard(true, operation, job);
}
}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF
index d3eaf0c57..d574720e3 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF
@@ -6,7 +6,7 @@ Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.equinox.p2.ui;bundle-version="1.0.100",
+ org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
org.eclipse.equinox.p2.metadata;bundle-version="1.0.0",
org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.0",
org.eclipse.equinox.p2.artifact.repository;bundle-version="1.0.0",
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF
index 58bab2409..d3e191cb5 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF
@@ -7,7 +7,7 @@ Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.sdkui.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.equinox.p2.ui;bundle-version="1.0.100",
+ org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
org.eclipse.equinox.p2.metadata;bundle-version="1.0.0",
org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.0",
org.eclipse.equinox.p2.artifact.repository;bundle-version="1.0.0",

Back to the top