diff options
author | Lars Vogel | 2015-10-06 13:17:56 +0000 |
---|---|---|
committer | Lars Vogel | 2017-01-13 18:31:35 +0000 |
commit | 905545c36ff4d74b24ae0f4d98b2582e327814f3 (patch) | |
tree | cfc422caf321a3157bb1d46987d8c2e6e865f8ac | |
parent | 95a41dc3e542929a2d03e0b9ab8bc1a476ba9101 (diff) | |
download | rt.equinox.p2-905545c36ff4d74b24ae0f4d98b2582e327814f3.tar.gz rt.equinox.p2-905545c36ff4d74b24ae0f4d98b2582e327814f3.tar.xz rt.equinox.p2-905545c36ff4d74b24ae0f4d98b2582e327814f3.zip |
Bug 479146 - Adding @Override in InstallWizardY20170126-1700Y20170126-1000Y20170119-1000S4_7_0_M5I20170126-1030I20170126-0505I20170125-2000I20170125-0800I20170124-2000I20170124-0800I20170123-2000I20170123-0830I20170123-0800I20170122-2000I20170121-2000I20170121-0950I20170120-2000I20170119-2000I20170119-1010I20170119-0345I20170118-2000I20170118-1215I20170117-2000I20170116-2000I20170115-2000I20170114-2000I20170113-2000
Change-Id: I4d5924eec3a175f7826e0027a62e8d2d4aac512e
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r-- | bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java index b94b06a7e..592489712 100644 --- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java +++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 IBM Corporation and others. + * Copyright (c) 2007, 2015 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 @@ -9,6 +9,7 @@ * IBM Corporation - initial API and implementation * Sonatype, Inc. - ongoing development * Red Hat, Inc. - support for remediation page + * Lars Vogel <Lars.Vogel@vogella.com> - Bug 479145 *******************************************************************************/ package org.eclipse.equinox.internal.p2.ui.dialogs; @@ -48,10 +49,12 @@ public class InstallWizard extends WizardWithLicenses { setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_INSTALL)); } + @Override protected ResolutionResultsWizardPage createResolutionPage() { return new InstallWizardPage(ui, this, root, operation); } + @Override protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) { mainPage = new AvailableIUsPage(ui, this); if (selections != null && selections.length > 0) @@ -60,6 +63,7 @@ public class InstallWizard extends WizardWithLicenses { } + @Override protected void initializeResolutionModelElements(Object[] selectedElements) { if (selectedElements == null) return; @@ -86,9 +90,9 @@ public class InstallWizard extends WizardWithLicenses { /* * Overridden to dynamically determine which page to get - * selections from. (non-Javadoc) - * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getOperationSelections() + * selections from. */ + @Override protected Object[] getOperationSelections() { return getOperationSelectionsPage().getCheckedIUElements(); } @@ -107,10 +111,12 @@ public class InstallWizard extends WizardWithLicenses { return mainPage; } + @Override protected ProvisioningContext getProvisioningContext() { return ((AvailableIUsPage) mainPage).getProvisioningContext(); } + @Override protected IResolutionErrorReportingPage createErrorReportingPage() { if (root == null) errorReportingPage = new SelectableIUsPage(ui, this, null, null); @@ -122,14 +128,13 @@ public class InstallWizard extends WizardWithLicenses { return errorReportingPage; } + @Override protected RemediationPage createRemediationPage() { remediationPage = new RemediationPage(ui, this, root, operation); return remediationPage; } - /* (non-Javadoc) - * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getProfileChangeOperation(java.lang.Object[]) - */ + @Override protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) { InstallOperation op = new InstallOperation(ui.getSession(), ElementUtils.elementsToIUs(elements)); op.setProfileId(getProfileId()); @@ -137,6 +142,7 @@ public class InstallWizard extends WizardWithLicenses { return op; } + @Override protected boolean shouldUpdateErrorPageModelOnPlanChange() { // We don't want the root of the error page to change unless we are on the // main page. For example, if we are on the error page, change checkmarks, and @@ -145,6 +151,7 @@ public class InstallWizard extends WizardWithLicenses { return getContainer().getCurrentPage() == mainPage && super.shouldUpdateErrorPageModelOnPlanChange(); } + @Override protected void planChanged() { super.planChanged(); synchSelections(getOperationSelectionsPage()); @@ -153,9 +160,8 @@ public class InstallWizard extends WizardWithLicenses { /* * overridden to ensure that the main page selections stay in synch * with changes to the error page. - * (non-Javadoc) - * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#operationSelectionsChanged(org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage) */ + @Override public void operationSelectionsChanged(ISelectableIUsPage page) { if (ignoreSelectionChanges) return; @@ -185,9 +191,8 @@ public class InstallWizard extends WizardWithLicenses { /* * Overridden to check whether there are UpdateManager install handlers in the item * to be installed. Operations don't know about this compatibility issue. - * (non-Javadoc) - * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getCurrentStatus() */ + @Override public IStatus getCurrentStatus() { IStatus originalStatus = super.getCurrentStatus(); int sev = originalStatus.getSeverity(); @@ -208,11 +213,13 @@ public class InstallWizard extends WizardWithLicenses { // In either case, the failure will be reported in this wizard. if (ProvUI.isUpdateManagerInstallerPresent()) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { + @Override public void run() { Shell shell = ProvUI.getDefaultParentShell(); MessageDialog dialog = new MessageDialog(shell, ProvUIMessages.Policy_RequiresUpdateManagerTitle, null, ProvUIMessages.Policy_RequiresUpdateManagerMessage, MessageDialog.WARNING, new String[] {ProvUIMessages.LaunchUpdateManagerButton, IDialogConstants.CANCEL_LABEL}, 0); if (dialog.open() == 0) BusyIndicator.showWhile(shell.getDisplay(), new Runnable() { + @Override public void run() { UpdateManagerCompatibility.openInstaller(); } @@ -231,9 +238,8 @@ public class InstallWizard extends WizardWithLicenses { * reset on every new resolution, so that status only holds the installHandler status when it is * the current status. The installHandlerStatus must be non-OK for it to matter at all. * - * (non-Javadoc) - * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#statusOverridesOperation() */ + @Override public boolean statusOverridesOperation() { return installHandlerStatus != null && !installHandlerStatus.isOK() && couldNotResolveStatus == installHandlerStatus; } |