Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-01-26 19:58:52 +0000
committerAlexander Kurtakov2018-01-26 19:58:52 +0000
commit8946fecc466ab4fc4827c5cec0ad9462c9d5cfd2 (patch)
treebd31ef56ebf791368a14ec03c094058edd066e0c
parent86643c0b8be9a53a0c29011e5199202e68a92aa1 (diff)
downloadrt.equinox.p2-8946fecc466ab4fc4827c5cec0ad9462c9d5cfd2.tar.gz
rt.equinox.p2-8946fecc466ab4fc4827c5cec0ad9462c9d5cfd2.tar.xz
rt.equinox.p2-8946fecc466ab4fc4827c5cec0ad9462c9d5cfd2.zip
Bug 530398 - Remove unused code for compatibility with old update
Change-Id: I6b852cbd3c54475f1065558d2e3b4b180353d109 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties3
4 files changed, 6 insertions, 28 deletions
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 8b0ad09f0..d3acd37f3 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2018 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
@@ -32,8 +32,7 @@ import org.eclipse.equinox.p2.ui.Policy;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
@@ -78,7 +77,6 @@ public class ProvUI {
// These values rely on the command markup in org.eclipse.ui.ide that defines the update commands
private static final String UPDATE_MANAGER_FIND_AND_INSTALL = "org.eclipse.ui.update.findAndInstallUpdates"; //$NON-NLS-1$
- private static final String UPDATE_MANAGER_MANAGE_CONFIGURATION = "org.eclipse.ui.update.manageConfiguration"; //$NON-NLS-1$
// This value relies on the command markup in org.eclipse.ui
private static final String INSTALLATION_DIALOG = "org.eclipse.ui.help.installationDialog"; //$NON-NLS-1$
@@ -100,12 +98,7 @@ public class ProvUI {
if (status.getSeverity() == IStatus.INFO) {
final MessageDialogWithLink dialog = new MessageDialogWithLink(ProvUI.getDefaultParentShell(), ProvUIMessages.ProvUI_InformationTitle, null, status.getMessage(), MessageDialog.INFORMATION, 0, IDialogConstants.OK_LABEL);
if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
- dialog.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- ProvisioningUI.getDefaultUI().manipulateRepositories(dialog.getShell());
- }
- });
+ dialog.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> ProvisioningUI.getDefaultUI().manipulateRepositories(dialog.getShell())));
}
dialog.open();
// unset the dialog bits
@@ -173,10 +166,6 @@ public class ProvUI {
runCommand(UPDATE_MANAGER_FIND_AND_INSTALL, ProvUIMessages.UpdateManagerCompatibility_UnableToOpenFindAndInstall, event);
}
- public static void openUpdateManagerConfigurationManager(Event event) {
- runCommand(UPDATE_MANAGER_MANAGE_CONFIGURATION, ProvUIMessages.UpdateManagerCompatibility_UnableToOpenManageConfiguration, event);
- }
-
public static void openInstallationDialog(Event event) {
runCommand(INSTALLATION_DIALOG, ProvUIMessages.ProvUI_InstallDialogError, event);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java
index 5bb78ab44..a6f66794c 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 2018 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
@@ -279,7 +279,6 @@ public class ProvUIMessages extends NLS {
public static String UpdateManagerCompatibility_InvalidSitesTitle;
public static String UpdateManagerCompatibility_ItemRequiresUpdateManager;
public static String UpdateManagerCompatibility_UnableToOpenFindAndInstall;
- public static String UpdateManagerCompatibility_UnableToOpenManageConfiguration;
public static String ServiceUI_LoginDetails;
public static String ServiceUI_LoginRequired;
public static String ServiceUI_unsigned_message;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java
index 192667109..baa2de16c 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2018 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
@@ -247,15 +247,6 @@ public class UpdateManagerCompatibility {
ProvUI.openUpdateManagerInstaller(null);
}
- /**
- * Open the old UpdateManager configuration manager UI using the specified shell.
- * We do not call the UpdateManagerUI class directly because we want to be able to be configured
- * without requiring those plug-ins. Instead, we invoke a known command.
- */
- public static void openConfigurationManager() {
- ProvUI.openUpdateManagerConfigurationManager(null);
- }
-
private static void logFail(Throwable t) {
Status failStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, t.getLocalizedMessage(), t);
ProvUI.reportStatus(failStatus, StatusManager.LOG);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties
index ef69e185c..58de9d6a8 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2007, 2015 IBM Corporation and others.
+# Copyright (c) 2007, 2018 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
@@ -140,7 +140,6 @@ UpdateManagerCompatibility_InvalidSiteFileMessage=The selected file does not con
UpdateManagerCompatibility_InvalidSitesTitle=Invalid Sites File
UpdateManagerCompatibility_ItemRequiresUpdateManager=The items selected for install include software ({0}) that requires install procedures from the older Eclipse Update Manager. The installation cannot continue.
UpdateManagerCompatibility_UnableToOpenFindAndInstall=Unable to open the Classic Update Manager 'Find and Install' wizard.
-UpdateManagerCompatibility_UnableToOpenManageConfiguration=Unable to open the Classic Update Manager 'Manage Configuration' dialog.
Updates_Label=Updates Available
UpdateSingleIUPage_SingleUpdateDescription=A new update has been found for {0}.
UpdateWizardPage_Description=Review and confirm the updates.

Back to the top