Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2017-01-27 04:11:04 -0500
committerLars Vogel2017-01-27 04:11:04 -0500
commit973b9118b0ff35e5df00c2bcfa18e83d6bab4816 (patch)
treefa141e17783601e8032eb358b70a91d44f326b73
parent905545c36ff4d74b24ae0f4d98b2582e327814f3 (diff)
downloadrt.equinox.p2-973b9118b0ff35e5df00c2bcfa18e83d6bab4816.tar.gz
rt.equinox.p2-973b9118b0ff35e5df00c2bcfa18e83d6bab4816.tar.xz
rt.equinox.p2-973b9118b0ff35e5df00c2bcfa18e83d6bab4816.zip
Bug 511160 - Run Cleanup action on org.eclipse.equinox.p2.ui to addI20170130-0600I20170129-2000I20170128-2000I20170127-2200I20170127-2000
missing annotations Change-Id: I53aab78feb00212c8162f992f52b67e4d4dec365 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/ColocatedRepositoryTracker.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryTrackerComponent.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationPage.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java20
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java19
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java19
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/URLDropAdapter.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/CertificateLabelProvider.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/MetadataRepositoryElementComparator.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java13
109 files changed, 567 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java
index 2e910458b..0805825ef 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java
@@ -53,10 +53,12 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getKnownRepositories()
*/
+ @Override
public URI[] getKnownRepositories(ProvisioningSession session) {
return getMetadataRepositoryManager().getKnownRepositories(getMetadataRepositoryFlags());
}
+ @Override
public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
ui.signalRepositoryOperationStart();
try {
@@ -78,6 +80,7 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
/* (non-Javadoc)
* @see org.eclipse.equinox.p2.operations.RepositoryTracker#removeRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession)
*/
+ @Override
public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
ui.signalRepositoryOperationStart();
try {
@@ -94,6 +97,7 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
* (non-Javadoc)
* @see org.eclipse.equinox.p2.operations.RepositoryTracker#refreshRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
ui.signalRepositoryOperationStart();
SubMonitor mon = SubMonitor.convert(monitor, locations.length * 100);
@@ -110,6 +114,7 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
ui.signalRepositoryOperationComplete(null, true);
}
+ @Override
public void reportLoadFailure(final URI location, ProvisionException e) {
int code = e.getStatus().getCode();
// If the user doesn't have a way to manage repositories, then don't report failures.
@@ -124,6 +129,7 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
if (!hasNotFoundStatusBeenReported(location)) {
addNotFound(location);
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
IWorkbench workbench = PlatformUI.getWorkbench();
if (workbench.isClosing())
@@ -131,10 +137,12 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
Shell shell = ProvUI.getDefaultParentShell();
if (MessageDialog.openQuestion(shell, ProvUIMessages.ColocatedRepositoryTracker_SiteNotFoundTitle, NLS.bind(ProvUIMessages.ColocatedRepositoryTracker_PromptForSiteLocationEdit, URIUtil.toUnencodedString(location)))) {
RepositoryNameAndLocationDialog dialog = new RepositoryNameAndLocationDialog(shell, ui) {
+ @Override
protected String getInitialLocationText() {
return URIUtil.toUnencodedString(location);
}
+ @Override
protected String getInitialNameText() {
String nickname = getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME);
return nickname == null ? "" : nickname; //$NON-NLS-1$
@@ -175,6 +183,7 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
* (non-Javadoc)
* @see org.eclipse.equinox.p2.operations.RepositoryTracker#locationFromString(java.lang.String)
*/
+ @Override
public URI locationFromString(String locationString) {
URI uri = super.locationFromString(locationString);
if (uri != null)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java
index 9ec5570d8..75db25ddd 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java
@@ -78,6 +78,7 @@ public class ProvUIActivator extends AbstractUIPlugin {
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext bundleContext) throws Exception {
super.start(bundleContext);
@@ -87,6 +88,7 @@ public class ProvUIActivator extends AbstractUIPlugin {
packageAdmin = bundleContext.getService(packageAdminRef);
}
+ @Override
public void stop(BundleContext bundleContext) throws Exception {
try {
// cancel any repository load jobs started in the UI
@@ -103,6 +105,7 @@ public class ProvUIActivator extends AbstractUIPlugin {
}
}
+ @Override
protected void initializeImageRegistry(ImageRegistry reg) {
createImageDescriptor(ProvUIImages.IMG_METADATA_REPOSITORY, reg);
createImageDescriptor(ProvUIImages.IMG_ARTIFACT_REPOSITORY, reg);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java
index 8fb518397..0c21e9857 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java
@@ -28,10 +28,12 @@ import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
public class ProvUIAdapterFactory implements IAdapterFactory {
private static final Class<?>[] CLASSES = new Class[] {IInstallableUnit.class, IProfile.class, IRepository.class, IMetadataRepository.class, IArtifactRepository.class};
+ @Override
public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
return ProvUI.getAdapter(adaptableObject, adapterType);
}
+ @Override
public Class<?>[] getAdapterList() {
return CLASSES;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java
index c49028748..2fe48f975 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java
@@ -42,6 +42,7 @@ public abstract class ProvUIProvisioningListener implements SynchronousProvision
this.runner = runner;
}
+ @Override
public void notify(EventObject o) {
if (o instanceof RepositoryOperationBeginningEvent) {
if (Tracing.DEBUG_EVENTS_CLIENT)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java
index 01ac98e27..c9c7b10f3 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java
@@ -82,6 +82,7 @@ public class ProvisioningOperationRunner {
}
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
if (PlatformUI.getWorkbench().isClosing())
return;
@@ -110,6 +111,7 @@ public class ProvisioningOperationRunner {
public void manageJob(Job job, final int jobRestartPolicy) {
ui.getSession().rememberJob(job);
job.addJobChangeListener(new JobChangeAdapter() {
+ @Override
public void done(IJobChangeEvent event) {
int severity = event.getResult().getSeverity();
// If the job finished without error, see if restart is needed
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java
index 0ec3ee935..a9cc4c26a 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java
@@ -31,10 +31,12 @@ public class QueryableArtifactRepositoryManager extends QueryableRepositoryManag
super(ui, includeDisabledRepos);
}
+ @Override
protected IArtifactRepositoryManager getRepositoryManager() {
return ProvUI.getArtifactRepositoryManager(getSession());
}
+ @Override
protected IArtifactRepository doLoadRepository(IRepositoryManager<IArtifactKey> manager, URI location, IProgressMonitor monitor) throws ProvisionException {
return ui.loadArtifactRepository(location, false, monitor);
}
@@ -42,10 +44,12 @@ public class QueryableArtifactRepositoryManager extends QueryableRepositoryManag
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.QueryableRepositoryManager#getRepositoryFlags(org.eclipse.equinox.p2.ui.RepositoryManipulator)
*/
+ @Override
protected int getRepositoryFlags(RepositoryTracker repositoryManipulator) {
return repositoryManipulator.getArtifactRepositoryFlags();
}
+ @Override
protected IArtifactRepository getRepository(IRepositoryManager<IArtifactKey> manager, URI location) {
// note the use of ArtifactRepositoryManager (the concrete implementation).
if (manager instanceof ArtifactRepositoryManager) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java
index 73380783b..a6827d402 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java
@@ -30,6 +30,7 @@ public class QueryableMetadataRepositoryManager extends QueryableRepositoryManag
super(ui, includeDisabledRepos);
}
+ @Override
protected IMetadataRepository getRepository(IRepositoryManager<IInstallableUnit> manager, URI location) {
// note the use of MetadataRepositoryManager (the concrete implementation).
if (manager instanceof MetadataRepositoryManager) {
@@ -38,10 +39,12 @@ public class QueryableMetadataRepositoryManager extends QueryableRepositoryManag
return null;
}
+ @Override
protected IMetadataRepositoryManager getRepositoryManager() {
return ProvUI.getMetadataRepositoryManager(getSession());
}
+ @Override
protected IMetadataRepository doLoadRepository(IRepositoryManager<IInstallableUnit> manager, URI location, IProgressMonitor monitor) throws ProvisionException {
return ui.loadMetadataRepository(location, false, monitor);
}
@@ -49,6 +52,7 @@ public class QueryableMetadataRepositoryManager extends QueryableRepositoryManag
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.QueryableRepositoryManager#getRepositoryFlags(org.eclipse.equinox.p2.ui.RepositoryManipulator)
*/
+ @Override
protected int getRepositoryFlags(RepositoryTracker repositoryManipulator) {
return repositoryManipulator.getMetadataRepositoryFlags();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java
index d066bb329..64db5f7e4 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java
@@ -65,6 +65,7 @@ public abstract class QueryableRepositoryManager<T> implements IQueryable<T> {
* reporting is not desired
* @return The QueryResult argument
*/
+ @Override
public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
IRepositoryManager<T> manager = getRepositoryManager();
if (monitor == null)
@@ -75,6 +76,7 @@ public abstract class QueryableRepositoryManager<T> implements IQueryable<T> {
public IQueryable<URI> locationsQueriable() {
return new IQueryable<URI>() {
+ @Override
public IQueryResult<URI> query(IQuery<URI> query, IProgressMonitor monitor) {
return query.perform(getRepoLocations(getRepositoryManager()).iterator());
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryTrackerComponent.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryTrackerComponent.java
index fa416c2d4..7cf8fb8dd 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryTrackerComponent.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryTrackerComponent.java
@@ -21,6 +21,7 @@ import org.eclipse.equinox.p2.ui.ProvisioningUI;
*/
public class RepositoryTrackerComponent implements IAgentServiceFactory {
+ @Override
public Object createService(IProvisioningAgent agent) {
ProvisioningUI ui = (ProvisioningUI) agent.getService(ProvisioningUI.class.getName());
if (ui == null)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java
index 4bc5cdc43..95aef20bf 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java
@@ -21,6 +21,7 @@ import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
*/
public class ServiceUIComponent implements IAgentServiceFactory {
+ @Override
public Object createService(IProvisioningAgent agent) {
return new ValidationDialogServiceUI();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java
index 19506544a..c89aa1a1d 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java
@@ -46,6 +46,7 @@ public class ValidationDialogServiceUI extends UIServices {
this.linkText = linkText;
}
+ @Override
protected Control createCustomArea(Composite parent) {
if (linkText == null)
return super.createCustomArea(parent);
@@ -77,6 +78,7 @@ public class ValidationDialogServiceUI extends UIServices {
super(parentShell, dialogTitle, message, status, displayMask);
}
+ @Override
protected void createButtonsForButtonBar(Composite parent) {
// create OK and Details buttons
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
@@ -89,11 +91,13 @@ public class ValidationDialogServiceUI extends UIServices {
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.core.IServiceUI#getUsernamePassword(java.lang.String)
*/
+ @Override
public AuthenticationInfo getUsernamePassword(final String location) {
final AuthenticationInfo[] result = new AuthenticationInfo[1];
if (!suppressAuthentication() && !isHeadless()) {
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
Shell shell = ProvUI.getDefaultParentShell();
String message = NLS.bind(ProvUIMessages.ServiceUI_LoginDetails, location);
@@ -123,6 +127,7 @@ public class ValidationDialogServiceUI extends UIServices {
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.core.IServiceUI#showCertificates(java.lang.Object)
*/
+ @Override
public TrustInfo getTrustInfo(Certificate[][] untrustedChains, final String[] unsignedDetail) {
boolean trustUnsigned = true;
boolean persistTrust = false;
@@ -132,6 +137,7 @@ public class ValidationDialogServiceUI extends UIServices {
if (!isHeadless() && unsignedDetail != null && unsignedDetail.length > 0) {
final boolean[] result = new boolean[] {false};
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
Shell shell = ProvUI.getDefaultParentShell();
OkCancelErrorDialog dialog = new OkCancelErrorDialog(shell, ProvUIMessages.ServiceUI_warning_title, null, createStatus(), IStatus.WARNING);
@@ -159,6 +165,7 @@ public class ValidationDialogServiceUI extends UIServices {
final TreeNode[] input = createTreeNodes(untrustedChains);
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
Shell shell = ProvUI.getDefaultParentShell();
ILabelProvider labelProvider = new CertificateLabelProvider();
@@ -194,10 +201,12 @@ public class ValidationDialogServiceUI extends UIServices {
return children;
}
+ @Override
public AuthenticationInfo getUsernamePassword(final String location, final AuthenticationInfo previousInfo) {
final AuthenticationInfo[] result = new AuthenticationInfo[1];
if (!suppressAuthentication() && !isHeadless()) {
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
Shell shell = ProvUI.getDefaultParentShell();
String message = null;
@@ -220,12 +229,14 @@ public class ValidationDialogServiceUI extends UIServices {
return result[0];
}
+ @Override
public void showInformationMessage(final String title, final String text, final String linkText) {
if (isHeadless()) {
super.showInformationMessage(title, text, linkText);
return;
}
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
MessageDialog dialog = new MessageDialogWithLink(ProvUI.getDefaultParentShell(), title, null, text, MessageDialog.INFORMATION, new String[] {IDialogConstants.OK_LABEL}, 0, linkText);
dialog.open();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java
index c83d12e40..eb155ca97 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java
@@ -35,6 +35,7 @@ public abstract class ColocatedRepositoryAction extends ProvisioningAction {
return urls.toArray(new URI[urls.size()]);
}
+ @Override
protected void checkEnablement(Object[] selectionArray) {
setEnabled(getSelectedLocations(selectionArray).length > 0);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java
index 58aeec68f..fda09523e 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java
@@ -36,6 +36,7 @@ public abstract class ExistingIUInProfileAction extends ProfileModificationActio
super(ui, label, selectionProvider, profileId);
}
+ @Override
protected boolean isEnabledFor(Object[] selectionArray) {
Object parent = null;
// We don't want to prompt for a profile during validation,
@@ -68,6 +69,7 @@ public abstract class ExistingIUInProfileAction extends ProfileModificationActio
return false;
}
+ @Override
protected boolean isSelectable(IIUElement element) {
if (!super.isSelectable(element))
return false;
@@ -80,6 +82,7 @@ public abstract class ExistingIUInProfileAction extends ProfileModificationActio
return false;
}
+ @Override
protected boolean isSelectable(IInstallableUnit iu) {
if (!super.isSelectable(iu))
return false;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java
index baad3f300..86d917729 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java
@@ -44,6 +44,7 @@ public abstract class ProfileModificationAction extends ProvisioningAction {
init();
}
+ @Override
public void run() {
Collection<IInstallableUnit> ius = getSelectedIUs();
// No ius or no profile?
@@ -77,10 +78,12 @@ public abstract class ProfileModificationAction extends ProvisioningAction {
ProvUI.reportStatus(operation.getResolutionResult(), StatusManager.SHOW);
} else {
job.addJobChangeListener(new JobChangeAdapter() {
+ @Override
public void done(IJobChangeEvent event) {
if (PlatformUI.isWorkbenchRunning()) {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
if (validateOperation(operation))
performAction(operation, ius);
@@ -173,6 +176,7 @@ public abstract class ProfileModificationAction extends ProvisioningAction {
return getProvisioningUI().getLicenseManager();
}
+ @Override
protected final void checkEnablement(Object[] selections) {
if (isEnabledFor(selections)) {
setEnabled(!getProvisioningUI().hasScheduledOperations());
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java
index f9568e2a0..bdbae469c 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java
@@ -50,6 +50,7 @@ public abstract class ProvisioningAction extends SelectionProviderAction {
* (non-Javadoc)
* @see org.eclipse.ui.actions.SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
*/
+ @Override
public final void selectionChanged(IStructuredSelection selection) {
ISelection providerSelection = getSelectionProvider().getSelection();
if (providerSelection instanceof IStructuredSelection) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java
index 06bed4a21..8f4772d03 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java
@@ -36,12 +36,14 @@ public abstract class RefreshAction extends ProvisioningAction {
private void hookKeyListener(Control control) {
control.addKeyListener(new KeyAdapter() {
+ @Override
public void keyReleased(KeyEvent e) {
handleKeyReleased(e);
}
});
}
+ @Override
public void run() {
refresh();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java
index 2b92fb32e..c2f7fecf4 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java
@@ -22,6 +22,7 @@ public class RemoveColocatedRepositoryAction extends ColocatedRepositoryAction {
}
+ @Override
public void run() {
ui.getRepositoryTracker().removeRepositories(getSelectedLocations(getStructuredSelection().toArray()), ui.getSession());
}
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 5bb281f35..76479919f 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
@@ -36,6 +36,7 @@ public class UninstallAction extends ExistingIUInProfileAction {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.actions.AlterExistingProfileIUAction#getLockConstant()
*/
+ @Override
protected int getLockConstant() {
return IProfile.LOCK_UNINSTALL;
}
@@ -43,6 +44,7 @@ public class UninstallAction extends ExistingIUInProfileAction {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#getProfileChangeOperation(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
*/
+ @Override
protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
return ui.getUninstallOperation(ius, null);
}
@@ -50,6 +52,7 @@ public class UninstallAction extends ExistingIUInProfileAction {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#performAction(org.eclipse.equinox.p2.operations.ProfileChangeOperation, org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
*/
+ @Override
protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
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 dba0b9ade..859a69cbd 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
@@ -57,6 +57,7 @@ public class UpdateAction extends ExistingIUInProfileAction {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.actions.AlterExistingProfileIUAction#getLockConstant()
*/
+ @Override
protected int getLockConstant() {
return IProfile.LOCK_UPDATE;
}
@@ -64,6 +65,7 @@ public class UpdateAction extends ExistingIUInProfileAction {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#getProfileChangeOperation(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
*/
+ @Override
protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
return ui.getUpdateOperation(ius, null);
}
@@ -71,6 +73,7 @@ public class UpdateAction extends ExistingIUInProfileAction {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#performAction(org.eclipse.equinox.p2.operations.ProfileChangeOperation, org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
*/
+ @Override
protected int performAction(final ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
if (operation.getResolutionResult() == Status.OK_STATUS)
return ui.openUpdateWizard(skipSelectionPage, (UpdateOperation) operation, null);
@@ -87,9 +90,11 @@ public class UpdateAction extends ExistingIUInProfileAction {
}
};
job.addJobChangeListener(new JobChangeAdapter() {
+ @Override
public void done(IJobChangeEvent event) {
if (PlatformUI.isWorkbenchRunning()) {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
ui.openUpdateWizard(skipSelectionPage, (UpdateOperation) operation, remediationOperation, null);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java
index e956b0427..13e436cbf 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java
@@ -51,6 +51,7 @@ public abstract class AddRepositoryDialog extends RepositoryNameAndLocationDialo
PlatformUI.getWorkbench().getHelpSystem().setHelp(parentShell, IProvHelpContextIds.ADD_REPOSITORY_DIALOG);
}
+ @Override
protected Control createDialogArea(Composite parent) {
Composite comp = new Composite(parent, SWT.NONE);
initializeDialogUnits(comp);
@@ -68,6 +69,7 @@ public abstract class AddRepositoryDialog extends RepositoryNameAndLocationDialo
Button localButton = new Button(comp, SWT.PUSH);
localButton.setText(ProvUIMessages.RepositoryGroup_LocalRepoBrowseButton);
localButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent event) {
DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.APPLICATION_MODAL);
dialog.setMessage(ProvUIMessages.RepositoryGroup_SelectRepositoryDirectory);
@@ -88,6 +90,7 @@ public abstract class AddRepositoryDialog extends RepositoryNameAndLocationDialo
Button archiveButton = new Button(comp, SWT.PUSH);
archiveButton.setText(ProvUIMessages.RepositoryGroup_ArchivedRepoBrowseButton);
archiveButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent event) {
FileDialog dialog = new FileDialog(getShell(), SWT.APPLICATION_MODAL);
dialog.setText(ProvUIMessages.RepositoryGroup_RepositoryFile);
@@ -116,6 +119,7 @@ public abstract class AddRepositoryDialog extends RepositoryNameAndLocationDialo
}
}
+ @Override
protected boolean handleOk() {
IStatus status = addRepository();
return status.isOK();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java
index 7e91542c3..9ee371dbb 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java
@@ -64,6 +64,7 @@ public class ApplyProfileChangesDialog extends MessageDialog {
*
* @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
*/
+ @Override
protected void buttonPressed(int id) {
if (id == 0) { // YES
returnCode = PROFILE_RESTART;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java
index f3747d482..d0b23ff82 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java
@@ -126,6 +126,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
createGroupComposite(parent);
}
+ @Override
protected StructuredViewer createViewer(Composite parent) {
// Table of available IU's
filteredTree = new DelayedFilterCheckboxTree(parent, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, filter, getPreFilterJobProvider());
@@ -139,10 +140,12 @@ public class AvailableIUGroup extends StructuredIUGroup {
// a newly loaded visible and expanding it. Setting the load job to null
// will take care of this.
availableIUViewer.getTree().addTreeListener(new TreeListener() {
+ @Override
public void treeCollapsed(TreeEvent e) {
lastRequestedLoadJob = null;
}
+ @Override
public void treeExpanded(TreeEvent e) {
lastRequestedLoadJob = null;
}
@@ -172,10 +175,12 @@ public class AvailableIUGroup extends StructuredIUGroup {
filteredTree.contentProviderSet(contentProvider);
final StructuredViewerProvisioningListener listener = new StructuredViewerProvisioningListener(getClass().getName(), availableIUViewer, ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY, getProvisioningUI().getOperationRunner()) {
+ @Override
protected void repositoryAdded(final RepositoryEvent event) {
makeRepositoryVisible(event.getRepositoryLocation());
}
+ @Override
protected void refreshViewer() {
final TreeViewer treeViewer = filteredTree.getViewer();
final Tree tree = treeViewer.getTree();
@@ -191,6 +196,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
ProvUI.getProvisioningEventBus(getProvisioningUI().getSession()).addListener(listener);
availableIUViewer.getControl().addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
ProvUI.getProvisioningEventBus(getProvisioningUI().getSession()).removeListener(listener);
}
@@ -217,6 +223,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
} else if (filterConstant == AVAILABLE_NONE) {
// Dummy object that explains empty site list
return new ProvElement(null) {
+ @Override
public Object[] getChildren(Object o) {
String description;
String name;
@@ -234,6 +241,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
return new Object[] {new EmptyElementExplanation(null, severity, name, description)};
}
+ @Override
public String getLabel(Object o) {
// Label not needed for input
return null;
@@ -260,6 +268,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
* Return the composite that contains the controls in this group.
* @return the composite
*/
+ @Override
public Composite getComposite() {
return super.getComposite();
}
@@ -268,6 +277,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
* Get the viewer used to represent the available IU's
* @return the viewer
*/
+ @Override
public StructuredViewer getStructuredViewer() {
return super.getStructuredViewer();
}
@@ -277,11 +287,13 @@ public class AvailableIUGroup extends StructuredIUGroup {
* @return the array of selected IU's
*/
// overridden for visibility in the public package
+ @Override
public java.util.List<IInstallableUnit> getSelectedIUs() {
return super.getSelectedIUs();
}
// overridden to weed out non-IU elements, such as repositories or empty explanations
+ @Override
public Object[] getSelectedIUElements() {
Object[] elements = ((IStructuredSelection) viewer.getSelection()).toArray();
ArrayList<Object> list = new ArrayList<Object>(elements.length);
@@ -329,6 +341,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
if (!(queryContext.getViewType() == IUViewQueryContext.AVAILABLE_VIEW_BY_REPO)) {
if (Display.getCurrent() == null)
display.asyncExec(new Runnable() {
+ @Override
public void run() {
updateAvailableViewState();
}
@@ -339,6 +352,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
}
// First reset the input so that the new repo shows up
Runnable runnable = new Runnable() {
+ @Override
public void run() {
final TreeViewer treeViewer = filteredTree.getViewer();
final Tree tree = treeViewer.getTree();
@@ -358,6 +372,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
// We do it in a job to be safe, and when it's done, we update
// the UI.
Job job = new Job(NLS.bind(ProvUIMessages.AvailableIUGroup_LoadingRepository, URIUtil.toUnencodedString(location))) {
+ @Override
protected IStatus run(IProgressMonitor monitor) {
try {
getProvisioningUI().loadMetadataRepository(location, true, monitor);
@@ -373,9 +388,11 @@ public class AvailableIUGroup extends StructuredIUGroup {
job.setSystem(true);
job.setUser(false);
job.addJobChangeListener(new JobChangeAdapter() {
+ @Override
public void done(final IJobChangeEvent event) {
if (event.getResult().isOK())
display.asyncExec(new Runnable() {
+ @Override
@SuppressWarnings("rawtypes")
public void run() {
final TreeViewer treeViewer = filteredTree.getViewer();
@@ -414,6 +431,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
setUseBoldFontForFilteredItems(queryContext.getViewType() != IUViewQueryContext.AVAILABLE_VIEW_FLAT);
BusyIndicator.showWhile(display, new Runnable() {
+ @Override
public void run() {
parent.setRedraw(false);
getCheckboxTreeViewer().setInput(getNewInput());
@@ -423,6 +441,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
});
}
+ @Override
public Control getDefaultFocusControl() {
if (filteredTree != null)
return filteredTree.getFilterControl();
@@ -433,6 +452,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
return filteredTree.getFilterString();
}
+ @Override
protected GridData getViewerGridData() {
GridData data = super.getViewerGridData();
data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
@@ -488,6 +508,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
private IPreFilterJobProvider getPreFilterJobProvider() {
return new IPreFilterJobProvider() {
+ @Override
public Job getPreFilterJob() {
switch (filterConstant) {
case AVAILABLE_ALL :
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
index 5dcdeb64b..c32364f9c 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
@@ -52,6 +52,7 @@ public class AvailableIUPatternFilter extends PatternFilter {
* (non-Javadoc)
* @see org.eclipse.ui.internal.dialogs.PatternFilter#isElementSelectable(java.lang.Object)
*/
+ @Override
public boolean isElementSelectable(Object element) {
return element instanceof IIUElement && !(element instanceof CategoryElement);
}
@@ -62,6 +63,7 @@ public class AvailableIUPatternFilter extends PatternFilter {
* (non-Javadoc)
* @see org.eclipse.ui.dialogs.PatternFilter#setPattern(java.lang.String)
*/
+ @Override
public void setPattern(String patternString) {
super.setPattern(patternString);
this.patternString = patternString;
@@ -73,6 +75,7 @@ public class AvailableIUPatternFilter extends PatternFilter {
* (non-Javadoc)
* @see org.eclipse.ui.dialogs.PatternFilter#isParentMatch(org.eclipse.jface.viewers.Viewer, java.lang.Object)
*/
+ @Override
protected boolean isParentMatch(Viewer viewer, Object element) {
if (patternString == null || patternString.length() == 0)
return true;
@@ -82,6 +85,7 @@ public class AvailableIUPatternFilter extends PatternFilter {
/* (non-Javadoc)
* @see org.eclipse.ui.dialogs.PatternFilter#isElementMatch(org.eclipse.jface.viewers.Viewer, java.lang.Object)
*/
+ @Override
protected boolean isLeafMatch(Viewer viewer, Object element) {
if (element instanceof CategoryElement) {
return false;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java
index cb0d07c84..e60141e56 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java
@@ -49,6 +49,7 @@ public class ComboAutoCompleteField {
IContentProposalProvider getProposalProvider() {
return new IContentProposalProvider() {
+ @Override
public IContentProposal[] getProposals(String contents, int position) {
String[] items = getStringItems();
if (contents.length() == 0 || items.length == 0)
@@ -75,18 +76,22 @@ public class ComboAutoCompleteField {
final String proposal = matches.get(i);
proposals[i] = new IContentProposal() {
+ @Override
public String getContent() {
return proposal;
}
+ @Override
public int getCursorPosition() {
return proposal.length();
}
+ @Override
public String getDescription() {
return null;
}
+ @Override
public String getLabel() {
return null;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java
index a523de852..10aca757b 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java
@@ -84,14 +84,17 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
private void initViewer() {
setUseHashlookup(true);
addCheckStateListener(new ICheckStateListener() {
+ @Override
public void checkStateChanged(CheckStateChangedEvent event) {
doCheckStateChanged(event.getElement());
}
});
addTreeListener(new ITreeViewerListener() {
+ @Override
public void treeCollapsed(TreeExpansionEvent event) {
}
+ @Override
public void treeExpanded(TreeExpansionEvent event) {
Widget item = findItem(event.getElement());
if (item instanceof TreeItem) {
@@ -185,6 +188,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ICheckable#setChecked(java.lang.Object, boolean)
*/
+ @Override
public boolean setChecked(Object element, boolean state) {
if (super.setChecked(element, state)) {
doCheckStateChanged(element);
@@ -196,6 +200,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.CheckboxTreeViewer#setCheckedElements(java.lang.Object[])
*/
+ @Override
public void setCheckedElements(Object[] elements) {
super.setCheckedElements(elements);
for (int i = 0; i < elements.length; i++) {
@@ -206,6 +211,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.AbstractTreeViewer#setExpanded(org.eclipse.swt.widgets.Item, boolean)
*/
+ @Override
protected void setExpanded(Item item, boolean expand) {
super.setExpanded(item, expand);
if (expand && item instanceof TreeItem) {
@@ -216,6 +222,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.CheckboxTreeViewer#getCheckedElements()
*/
+ @Override
public Object[] getCheckedElements() {
Object[] checked = super.getCheckedElements();
// add all items that are children of a checked node but not created yet
@@ -259,12 +266,14 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
// won't be. The best we can do is at least turn off all the
// rippling checks that happen during this method since we are going
// to reset all the checkmarks anyway.
+ @Override
protected void preservingSelection(Runnable updateCode) {
rippleCheckMarks = false;
super.preservingSelection(updateCode);
rippleCheckMarks = true;
}
+ @Override
protected void internalRefresh(Object element, boolean updateLabels) {
saveCheckedState();
super.internalRefresh(element, updateLabels);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java
index 20253dfe1..1f89316b7 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java
@@ -30,6 +30,7 @@ public class CopyHandler extends AbstractHandler {
/* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
+ @Override
public Object execute(ExecutionEvent event) {
Object control = HandlerUtil.getVariable(event, ISources.ACTIVE_FOCUS_CONTROL_NAME);
if (control instanceof Control)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java
index 14b63d7e9..a816d4662 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java
@@ -32,6 +32,7 @@ public class CopyPopup {
/*
* @see SelectionListener.widgetSelected (SelectionEvent)
*/
+ @Override
public void widgetSelected(SelectionEvent e) {
copySource.copyToClipboard(control);
}
@@ -39,6 +40,7 @@ public class CopyPopup {
/*
* @see SelectionListener.widgetDefaultSelected(SelectionEvent)
*/
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
copySource.copyToClipboard(control);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java
index 279580a1b..bc1524d2f 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java
@@ -58,16 +58,19 @@ public class CopyUtils {
if (fs != null && hs != null) {
fs.addFocusTracker(control, CONTROL_ID);
final IHandlerActivation handlerActivation = hs.activateHandler(CopyHandler.ID, new CopyHandler(copyable), new Expression() {
+ @Override
public EvaluationResult evaluate(IEvaluationContext context) {
return context.getVariable(ISources.ACTIVE_FOCUS_CONTROL_NAME) == control ? EvaluationResult.TRUE : EvaluationResult.FALSE;
}
+ @Override
public void collectExpressionInfo(final ExpressionInfo info) {
info.addVariableNameAccess(ISources.ACTIVE_FOCUS_CONTROL_NAME);
}
});
control.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
hs.deactivateHandler(handlerActivation);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java
index f9101172d..62eb5005b 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java
@@ -366,6 +366,7 @@ public class DelayedFilterCheckboxTree extends FilteredTree {
return new Object[0];
}
+ @Override
protected String getFilterString() {
return super.getFilterString();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java
index 6eebf3e56..b749caf55 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java
@@ -30,6 +30,7 @@ import org.eclipse.swt.widgets.*;
*/
public class IUCopyrightPropertyPage extends IUPropertyPage {
+ @Override
protected Control createIUPage(Composite parent, IInstallableUnit iu) {
// Get the copyright in the current locale
final ICopyright copyright = iu.getCopyright(null);
@@ -60,6 +61,7 @@ public class IUCopyrightPropertyPage extends IUPropertyPage {
gd.widthHint = computeWidthLimit(link, 80);
link.setLayoutData(gd);
link.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
try {
showURL(copyright.getLocation().toURL());
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java
index d63f4a81d..0d665e329 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java
@@ -138,6 +138,7 @@ public class IUDetailsGroup {
link.setText(text);
link.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
IAction linkAction = getLinkAction(event.widget);
if (linkAction != null) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java
index 9be99dd25..3af6f1e30 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java
@@ -29,6 +29,7 @@ import org.eclipse.swt.widgets.*;
*/
public class IUGeneralInfoPropertyPage extends IUPropertyPage {
+ @Override
protected Control createIUPage(Composite parent, IInstallableUnit iu) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -102,6 +103,7 @@ public class IUGeneralInfoPropertyPage extends IUPropertyPage {
gd.widthHint = computeWidthLimit(link, 80);
link.setLayoutData(gd);
link.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
showURL(url);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java
index d5755af4e..797d60dac 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java
@@ -30,6 +30,7 @@ import org.eclipse.swt.widgets.*;
*/
public class IULicensePropertyPage extends IUPropertyPage {
+ @Override
protected Control createIUPage(Composite parent, IInstallableUnit iu) {
// Get the license in the default locale
Iterator<ILicense> licenses = iu.getLicenses(null).iterator();
@@ -62,6 +63,7 @@ public class IULicensePropertyPage extends IUPropertyPage {
gd.widthHint = computeWidthLimit(link, 80);
link.setLayoutData(gd);
link.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
try {
showURL(license.getLocation().toURL());
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java
index c4cbaf5ce..b014c8ca9 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java
@@ -33,6 +33,7 @@ import org.eclipse.ui.statushandlers.StatusManager;
*/
public abstract class IUPropertyPage extends PropertyPage {
+ @Override
protected Control createContents(Composite parent) {
noDefaultAndApplyButton();
IInstallableUnit iu = ProvUI.getAdapter(getElement(), IInstallableUnit.class);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java
index b4f3bc5e2..b3f555fc4 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java
@@ -24,10 +24,12 @@ public class InstallWizardPage extends SizeComputingWizardPage {
setDescription(ProvUIMessages.InstallWizardPage_NoCheckboxDescription);
}
+ @Override
protected String getOperationLabel() {
return ProvUIMessages.InstallIUOperationLabel;
}
+ @Override
protected String getOperationTaskName() {
return ProvUIMessages.InstallIUOperationTask;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java
index fda71560f..23c48fdb2 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java
@@ -51,6 +51,7 @@ public class InstalledIUGroup extends StructuredIUGroup {
createGroupComposite(parent);
}
+ @Override
protected StructuredViewer createViewer(Composite parent) {
// Table of installed IU's
TreeViewer installedIUViewer = new TreeViewer(parent, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
@@ -74,6 +75,7 @@ public class InstalledIUGroup extends StructuredIUGroup {
final StructuredViewerProvisioningListener listener = new StructuredViewerProvisioningListener(getClass().getName(), installedIUViewer, ProvUIProvisioningListener.PROV_EVENT_IU | ProvUIProvisioningListener.PROV_EVENT_PROFILE, getProvisioningUI().getOperationRunner());
ProvUI.getProvisioningEventBus(getProvisioningUI().getSession()).addListener(listener);
installedIUViewer.getControl().addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
ProvUI.getProvisioningEventBus(getProvisioningUI().getSession()).removeListener(listener);
}
@@ -101,10 +103,12 @@ public class InstalledIUGroup extends StructuredIUGroup {
/**
* Get the viewer used to represent the installed IU's
*/
+ @Override
public StructuredViewer getStructuredViewer() {
return super.getStructuredViewer();
}
+ @Override
public Control getDefaultFocusControl() {
return super.getDefaultFocusControl();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java
index 83f09d7f0..9649d29ad 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java
@@ -48,6 +48,7 @@ public class PreselectedIUInstallWizard extends WizardWithLicenses {
return super.getStartingPage();
}
+ @Override
protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
mainPage = new SelectableIUsPage(ui, this, input, selections);
mainPage.setTitle(ProvUIMessages.PreselectedIUInstallWizard_Title);
@@ -56,10 +57,12 @@ public class PreselectedIUInstallWizard extends WizardWithLicenses {
return mainPage;
}
+ @Override
protected ResolutionResultsWizardPage createResolutionPage() {
return new InstallWizardPage(ui, this, root, operation);
}
+ @Override
protected void initializeResolutionModelElements(Object[] selectedElements) {
root = new IUElementListRoot(ui);
ArrayList<AvailableIUElement> list = new ArrayList<AvailableIUElement>(selectedElements.length);
@@ -82,6 +85,7 @@ public class PreselectedIUInstallWizard extends WizardWithLicenses {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getErrorReportingPage()
*/
+ @Override
protected IResolutionErrorReportingPage createErrorReportingPage() {
return (IResolutionErrorReportingPage) mainPage;
}
@@ -89,6 +93,7 @@ public class PreselectedIUInstallWizard extends WizardWithLicenses {
/* (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());
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
index f1f467c7d..cfae642fb 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
@@ -80,6 +80,7 @@ public abstract class ProvisioningOperationWizard extends Wizard {
* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#addPages()
*/
+ @Override
public void addPages() {
mainPage = createMainPage(root, planSelections);
addPage(mainPage);
@@ -101,6 +102,7 @@ public abstract class ProvisioningOperationWizard extends Wizard {
protected abstract ResolutionResultsWizardPage createResolutionPage();
+ @Override
public boolean performFinish() {
return resolutionPage.performFinish();
}
@@ -114,6 +116,7 @@ public abstract class ProvisioningOperationWizard extends Wizard {
* @see org.eclipse.jface.wizard.Wizard#getPreviousPage(org.eclipse.jface.wizard.IWizardPage)
*
*/
+ @Override
public IWizardPage getPreviousPage(IWizardPage page) {
if (page == errorPage) {
return mainPage;
@@ -126,6 +129,7 @@ public abstract class ProvisioningOperationWizard extends Wizard {
* @see org.eclipse.jface.wizard.Wizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
*
*/
+ @Override
public IWizardPage getNextPage(IWizardPage page) {
// If we are moving from the main page or error page, we may need to resolve before
// advancing.
@@ -133,6 +137,7 @@ public abstract class ProvisioningOperationWizard extends Wizard {
if (page == remediationPage) {
try {
getContainer().run(true, true, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) {
remediationOperation.setCurrentRemedy(remediationPage.getRemediationGroup().getCurrentRemedy());
remediationOperation.resolveModal(monitor);
@@ -285,6 +290,7 @@ public abstract class ProvisioningOperationWizard extends Wizard {
operation.setProvisioningContext(provisioningContext);
try {
runnableContext.run(true, true, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) {
operation.resolveModal(monitor);
if (withRemediation) {
@@ -372,6 +378,7 @@ public abstract class ProvisioningOperationWizard extends Wizard {
* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#createPageControls(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createPageControls(Composite pageContainer) {
// We call this so that wizards ignore all repository eventing that occurs while the wizard is
// open. Otherwise, we can get an add event when a repository loads its references that we
@@ -387,6 +394,7 @@ public abstract class ProvisioningOperationWizard extends Wizard {
// job has not been scheduled. Set a listener so we can report accumulated errors and
// schedule it.
repoPreloadJob.addJobChangeListener(new JobChangeAdapter() {
+ @Override
public void done(IJobChangeEvent e) {
asyncReportLoadFailures();
}
@@ -402,6 +410,7 @@ public abstract class ProvisioningOperationWizard extends Wizard {
// job is waiting, sleeping, running, report failures when
// it's done
repoPreloadJob.addJobChangeListener(new JobChangeAdapter() {
+ @Override
public void done(IJobChangeEvent e) {
asyncReportLoadFailures();
}
@@ -416,6 +425,7 @@ public abstract class ProvisioningOperationWizard extends Wizard {
* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#dispose()
*/
+ @Override
public void dispose() {
ui.signalRepositoryOperationComplete(null, false);
super.dispose();
@@ -424,6 +434,7 @@ public abstract class ProvisioningOperationWizard extends Wizard {
void asyncReportLoadFailures() {
if (repoPreloadJob != null && getShell() != null && !getShell().isDisposed()) {
getShell().getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
if (PlatformUI.isWorkbenchRunning() && getShell() != null && !getShell().isDisposed())
repoPreloadJob.reportAccumulatedStatus();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java
index 706ffb9a9..77fb306f4 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java
@@ -34,6 +34,7 @@ public class ProvisioningWizardDialog extends WizardDialog {
setBlockOnOpen(false);
}
+ @Override
protected IDialogSettings getDialogBoundsSettings() {
IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
IDialogSettings section = settings.getSection(wizard.getDialogSettingsSectionName());
@@ -46,6 +47,7 @@ public class ProvisioningWizardDialog extends WizardDialog {
/**
* @see org.eclipse.jface.window.Window#close()
*/
+ @Override
public boolean close() {
if (getShell() != null && !getShell().isDisposed()) {
wizard.saveBoundsRelatedSettings();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java
index b5759fc0b..f79c85c99 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java
@@ -36,6 +36,7 @@ abstract class ProvisioningWizardPage extends WizardPage implements ICopyable {
return wizard;
}
+ @Override
public void copyToClipboard(Control activeControl) {
String text = getClipboardText(activeControl);
if (text.length() == 0)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java
index 87ee6df53..1dc16b2cf 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java
@@ -61,19 +61,23 @@ public class RemediationGroup {
public class RemedyContentProvider implements ITreeContentProvider {
+ @Override
public void dispose() {
// not needed
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// not needed
}
+ @Override
public Object[] getElements(Object inputElement) {
Object[] elements = ElementUtils.requestToRemedyElementsCategories((Remedy) inputElement);
return elements;
}
+ @Override
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof RemedyElementCategory) {
RemedyElementCategory category = (RemedyElementCategory) parentElement;
@@ -82,10 +86,12 @@ public class RemediationGroup {
return null;
}
+ @Override
public Object getParent(Object element) {
return null;
}
+ @Override
public boolean hasChildren(Object element) {
if (element instanceof RemedyElementCategory) {
return true;
@@ -115,6 +121,7 @@ public class RemediationGroup {
descriptionLabel.setText(ProvUIMessages.RemediationPage_SubDescription);
solutionslistener = new Listener() {
+ @Override
public void handleEvent(Event e) {
Button btn = (Button) e.widget;
Remedy remedy = (btn.getData() == null ? null : (Remedy) btn.getData());
@@ -152,6 +159,7 @@ public class RemediationGroup {
buildMyOwnSolution.addListener(SWT.Selection, solutionslistener);
Listener checkboxListener = new Listener() {
+ @Override
public void handleEvent(Event e) {
currentRemedy = searchRemedyMatchingUserChoices();
refreshResultComposite();
@@ -221,6 +229,7 @@ public class RemediationGroup {
nameColumn.getColumn().setMoveable(true);
nameColumn.getColumn().addSelectionListener(columnChangeListener(0));
nameColumn.setLabelProvider(new ColumnLabelProvider() {
+ @Override
public String getText(Object element) {
if (element instanceof RemedyElementCategory)
return ((RemedyElementCategory) element).getName();
@@ -234,6 +243,7 @@ public class RemediationGroup {
return super.getText(element);
}
+ @Override
public Image getImage(Object element) {
if (element instanceof RemedyElementCategory) {
RemedyElementCategory category = (RemedyElementCategory) element;
@@ -269,6 +279,7 @@ public class RemediationGroup {
return super.getImage(element);
}
+ @Override
public String getToolTipText(Object element) {
if (element instanceof RemedyIUDetail) {
RemedyIUDetail iuDetail = (RemedyIUDetail) element;
@@ -312,6 +323,7 @@ public class RemediationGroup {
versionColumn.getColumn().setWidth(200);
versionColumn.getColumn().addSelectionListener(columnChangeListener(1));
versionColumn.setLabelProvider(new ColumnLabelProvider() {
+ @Override
public String getText(Object element) {
if (element instanceof RemedyIUDetail) {
RemedyIUDetail iu = (RemedyIUDetail) element;
@@ -327,6 +339,7 @@ public class RemediationGroup {
idColumn.getColumn().addSelectionListener(columnChangeListener(2));
idColumn.setLabelProvider(new ColumnLabelProvider() {
+ @Override
public String getText(Object element) {
if (element instanceof RemedyIUDetail) {
RemedyIUDetail iu = (RemedyIUDetail) element;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationPage.java
index 3309f13b6..12c90c676 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationPage.java
@@ -41,6 +41,7 @@ public class RemediationPage extends ResolutionStatusPage {
}
}
+ @Override
public void createControl(Composite parent) {
mainComposite = new Composite(parent, SWT.NONE);
mainComposite.setLayout(new GridLayout());
@@ -61,6 +62,7 @@ public class RemediationPage extends ResolutionStatusPage {
return remediationGroup;
}
+ @Override
public boolean canFlipToNextPage() {
return isPageComplete() && remediationGroup.getCurrentRemedy() != null;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java
index 87d5b4752..a4f1cb751 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java
@@ -46,6 +46,7 @@ public class RepositoryManipulatorDropTarget extends URLDropAdapter {
this.control = control;
}
+ @Override
protected void handleDrop(String urlText, final DropTargetEvent event) {
event.detail = DND.DROP_NONE;
final URI[] location = new URI[1];
@@ -60,6 +61,7 @@ public class RepositoryManipulatorDropTarget extends URLDropAdapter {
Job job = new WorkbenchJob(ProvUIMessages.RepositoryManipulatorDropTarget_DragAndDropJobLabel) {
+ @Override
public IStatus runInUIThread(IProgressMonitor monitor) {
IStatus status = tracker.validateRepositoryLocation(ui.getSession(), location[0], false, monitor);
if (status.isOK()) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java
index af9c7e542..02e554472 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java
@@ -49,11 +49,13 @@ public class RepositoryNameAndLocationDialog extends StatusDialog {
setTitle(ProvUIMessages.RepositoryNameAndLocationDialog_Title);
}
+ @Override
protected void createButtonsForButtonBar(Composite parent) {
okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}
+ @Override
protected Control createDialogArea(Composite parent) {
Composite comp = new Composite(parent, SWT.NONE);
initializeDialogUnits(comp);
@@ -82,6 +84,7 @@ public class RepositoryNameAndLocationDialog extends StatusDialog {
return ui.getRepositoryTracker();
}
+ @Override
protected void okPressed() {
if (handleOk())
super.okPressed();
@@ -148,6 +151,7 @@ public class RepositoryNameAndLocationDialog extends StatusDialog {
status[0] = Status.OK_STATUS;
else
BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
+ @Override
public void run() {
status[0] = getRepositoryTracker().validateRepositoryLocation(ui.getSession(), userLocation, contactRepositories, null);
}
@@ -165,6 +169,7 @@ public class RepositoryNameAndLocationDialog extends StatusDialog {
}
+ @Override
protected void updateButtonsEnableState(IStatus status) {
setOkEnablement(!status.matches(IStatus.ERROR));
}
@@ -215,6 +220,7 @@ public class RepositoryNameAndLocationDialog extends StatusDialog {
target.setTransfer(new Transfer[] {URLTransfer.getInstance(), FileTransfer.getInstance()});
target.addDropListener(new TextURLDropAdapter(url, true));
url.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
validateRepositoryURL(false);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
index 8d0810169..cef599241 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
@@ -119,10 +119,12 @@ public class RepositorySelectionGroup {
repoCombo = new Combo(comboComposite, SWT.DROP_DOWN);
repoCombo.addSelectionListener(new SelectionListener() {
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
repoComboSelectionChanged();
}
+ @Override
public void widgetSelected(SelectionEvent e) {
repoComboSelectionChanged();
}
@@ -133,6 +135,7 @@ public class RepositorySelectionGroup {
repoCombo.setVisibleItemCount(COUNT_VISIBLE_ITEMS);
repoCombo.addKeyListener(new KeyAdapter() {
+ @Override
public void keyPressed(KeyEvent e) {
if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR)
addRepository(false);
@@ -142,6 +145,7 @@ public class RepositorySelectionGroup {
// We don't ever want this to be interpreted as a default
// button event
repoCombo.addTraverseListener(new TraverseListener() {
+ @Override
public void keyTraversed(TraverseEvent e) {
if (e.detail == SWT.TRAVERSE_RETURN) {
e.doit = false;
@@ -155,6 +159,7 @@ public class RepositorySelectionGroup {
repoCombo.setLayoutData(gd);
repoCombo.setFont(comboComposite.getFont());
repoCombo.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent event) {
URI location = null;
IStatus status = null;
@@ -185,6 +190,7 @@ public class RepositorySelectionGroup {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.dialogs.URLDropAdapter#handleURLString(java.lang.String, org.eclipse.swt.dnd.DropTargetEvent)
*/
+ @Override
protected void handleDrop(String urlText, DropTargetEvent event) {
repoCombo.setText(urlText);
event.detail = DND.DROP_LINK;
@@ -195,10 +201,12 @@ public class RepositorySelectionGroup {
Button button = new Button(comboComposite, SWT.PUSH);
button.setText(ProvUIMessages.AvailableIUsPage_AddButton);
button.addSelectionListener(new SelectionListener() {
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
addRepository(true);
}
+ @Override
public void widgetSelected(SelectionEvent e) {
addRepository(true);
}
@@ -208,6 +216,7 @@ public class RepositorySelectionGroup {
// Link to repository manipulator
repoManipulatorLink = createLink(comboComposite, new Action() {
+ @Override
public void runWithEvent(Event event) {
if (repositoryManipulationHook != null)
repositoryManipulationHook.preManipulateRepositories();
@@ -223,6 +232,7 @@ public class RepositorySelectionGroup {
addComboProvisioningListeners();
parent.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
removeProvisioningListeners();
}
@@ -298,6 +308,7 @@ public class RepositorySelectionGroup {
// use a delay to show the validation method because the very next
// selection or keystroke might fix it
repoCombo.getDisplay().timerExec(500, new Runnable() {
+ @Override
public void run() {
if (repoDec != null && repoDec.getImage() != info)
repoDec.showHoverText(status.getMessage());
@@ -336,6 +347,7 @@ public class RepositorySelectionGroup {
if (sites.length > 0)
sortRepoItems(items, comboRepos, hasLocalSites);
Runnable runnable = new Runnable() {
+ @Override
public void run() {
if (repoCombo == null || repoCombo.isDisposed())
return;
@@ -386,6 +398,7 @@ public class RepositorySelectionGroup {
link.setText(text);
link.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
IAction linkAction = getLinkAction(event.widget);
if (linkAction != null) {
@@ -417,11 +430,13 @@ public class RepositorySelectionGroup {
}
final Collator collator = Collator.getInstance(Locale.getDefault());
Comparator<String> stringComparator = new Comparator<String>() {
+ @Override
public int compare(String a, String b) {
return collator.compare(a, b);
}
};
Comparator<URI> uriComparator = new Comparator<URI>() {
+ @Override
public int compare(URI a, URI b) {
return collator.compare(uriToString.get(a), uriToString.get(b));
}
@@ -493,14 +508,17 @@ public class RepositorySelectionGroup {
void addComboProvisioningListeners() {
// We need to monitor repository events so that we can adjust the repo combo.
comboRepoListener = new ProvUIProvisioningListener(getClass().getName(), ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY, ui.getOperationRunner()) {
+ @Override
protected void repositoryAdded(RepositoryEvent e) {
fillRepoCombo(getSiteString(e.getRepositoryLocation()));
}
+ @Override
protected void repositoryRemoved(RepositoryEvent e) {
fillRepoCombo(null);
}
+ @Override
protected void refreshAll() {
fillRepoCombo(null);
}
@@ -532,6 +550,7 @@ public class RepositorySelectionGroup {
} else if (alwaysPrompt) {
AddRepositoryDialog dialog = new AddRepositoryDialog(repoCombo.getShell(), ui) {
+ @Override
protected String getInitialLocationText() {
if (isNewText) {
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=293068
@@ -565,6 +584,7 @@ public class RepositorySelectionGroup {
} else if (isNewText) {
try {
container.run(false, false, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) {
URI location;
IStatus status;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
index 4920d4ff2..ba7b09334 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
@@ -68,6 +68,7 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createControl(Composite parent) {
display = parent.getDisplay();
sashForm = new SashForm(parent, SWT.VERTICAL);
@@ -96,6 +97,7 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
nameColumn.getColumn().setWidth(400);
nameColumn.getColumn().setMoveable(true);
nameColumn.setLabelProvider(new ColumnLabelProvider() {
+ @Override
public String getText(Object element) {
IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
String label = iu.getProperty(IInstallableUnit.PROP_NAME, null);
@@ -104,6 +106,7 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
return label;
}
+ @Override
public Image getImage(Object element) {
if (element instanceof ProvElement)
return ((ProvElement) element).getImage(element);
@@ -112,6 +115,7 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
return null;
}
+ @Override
public String getToolTipText(Object element) {
if (element instanceof AvailableIUElement && ((AvailableIUElement) element).getImageOverlayId(null) == ProvUIImages.IMG_INFO)
return ProvUIMessages.RemedyElementNotHighestVersion;
@@ -122,6 +126,7 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
versionColumn.getColumn().setText(ProvUIMessages.ProvUI_VersionColumnTitle);
versionColumn.getColumn().setWidth(200);
versionColumn.setLabelProvider(new ColumnLabelProvider() {
+ @Override
public String getText(Object element) {
IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
if (element instanceof IIUElement) {
@@ -137,6 +142,7 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
idColumn.getColumn().setWidth(200);
idColumn.setLabelProvider(new ColumnLabelProvider() {
+ @Override
public String getText(Object element) {
IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
return iu.getId();
@@ -177,8 +183,10 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
controlsComposite.setLayoutData(gd);
final Runnable runnable = new Runnable() {
+ @Override
public void run() {
treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
setDetailText(resolvedOperation);
}
@@ -191,6 +199,7 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
if (resolvedOperation != null && !resolvedOperation.hasResolved()) {
try {
getContainer().run(true, false, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) {
resolvedOperation.resolveModal(monitor);
display.asyncExec(runnable);
@@ -231,10 +240,12 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
return null;
}
+ @Override
protected Object[] getSelectedElements() {
return ((IStructuredSelection) treeViewer.getSelection()).toArray();
}
+ @Override
protected IInstallableUnit getSelectedIU() {
java.util.List<IInstallableUnit> units = ElementUtils.elementsToIUs(getSelectedElements());
if (units.size() == 0)
@@ -242,6 +253,7 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
return units.get(0);
}
+ @Override
protected boolean shouldCompleteOnCancel() {
return false;
}
@@ -292,18 +304,22 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
protected abstract IQueryable<IInstallableUnit> getQueryable(IProvisioningPlan plan);
+ @Override
protected String getClipboardText(Control control) {
return CopyUtils.getIndentedClipboardText(getSelectedElements(), labelProvider);
}
+ @Override
protected IUDetailsGroup getDetailsGroup() {
return iuDetailsGroup;
}
+ @Override
protected boolean isCreated() {
return treeViewer != null;
}
+ @Override
protected void updateCaches(IUElementListRoot newRoot, ProfileChangeOperation op) {
resolvedOperation = op;
if (newRoot != null) {
@@ -318,14 +334,17 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
}
}
+ @Override
protected String getDialogSettingsName() {
return getWizard().getClass().getName() + "." + DIALOG_SETTINGS_SECTION; //$NON-NLS-1$
}
+ @Override
protected int getColumnWidth(int index) {
return treeViewer.getTree().getColumn(index).getWidth();
}
+ @Override
protected SashForm getSashForm() {
return sashForm;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java
index 390a7feae..deca8e8b1 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java
@@ -278,6 +278,7 @@ public abstract class ResolutionStatusPage extends ProvisioningWizardPage {
}
}
+ @Override
public void saveBoundsRelatedSettings() {
if (!isCreated())
return;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
index 93cec8be5..856e11341 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
@@ -71,6 +71,7 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createControl(Composite parent) {
display = parent.getDisplay();
sashForm = new SashForm(parent, SWT.VERTICAL);
@@ -103,12 +104,14 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
}
tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
setDetailText(resolvedOperation);
}
});
tableViewer.addCheckStateListener(new ICheckStateListener() {
+ @Override
public void checkStateChanged(CheckStateChangedEvent event) {
// If the checkEvent is on a locked update element, uncheck it and select it.
if (event.getElement() instanceof AvailableUpdateElement) {
@@ -183,6 +186,7 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
selectAll.setText(ProvUIMessages.SelectableIUsPage_Select_All);
setButtonLayoutData(selectAll);
selectAll.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
tableViewer.setAllChecked(true);
updateSelection();
@@ -193,6 +197,7 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
deselectAll.setText(ProvUIMessages.SelectableIUsPage_Deselect_All);
setButtonLayoutData(deselectAll);
deselectAll.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
tableViewer.setAllChecked(false);
updateSelection();
@@ -218,16 +223,19 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
return v;
}
+ @Override
public Object[] getCheckedIUElements() {
if (tableViewer == null)
return initialSelections;
return tableViewer.getCheckedElements();
}
+ @Override
public Object[] getSelectedIUElements() {
return ((IStructuredSelection) tableViewer.getSelection()).toArray();
}
+ @Override
protected Object[] getSelectedElements() {
return ((IStructuredSelection) tableViewer.getSelection()).toArray();
}
@@ -267,6 +275,7 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
* (non-Javadoc)
* @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
*/
+ @Override
public boolean canFlipToNextPage() {
return isPageComplete();
}
@@ -278,11 +287,13 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
* (non-Javadoc)
* @see org.eclipse.jface.wizard.WizardPage#getPreviousPage()
*/
+ @Override
public IWizardPage getPreviousPage() {
setPreviousPage(null);
return super.getPreviousPage();
}
+ @Override
protected String getClipboardText(Control control) {
StringBuffer buffer = new StringBuffer();
Object[] elements = getSelectedElements();
@@ -294,6 +305,7 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
return buffer.toString();
}
+ @Override
protected IInstallableUnit getSelectedIU() {
java.util.List<IInstallableUnit> units = ElementUtils.elementsToIUs(getSelectedElements());
if (units.size() == 0)
@@ -301,10 +313,12 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
return units.get(0);
}
+ @Override
protected IUDetailsGroup getDetailsGroup() {
return iuDetailsGroup;
}
+ @Override
protected boolean isCreated() {
return tableViewer != null;
}
@@ -313,6 +327,7 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionStatusPage#updateCaches(org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot, org.eclipse.equinox.p2.operations.ProfileChangeOperation)
*/
+ @Override
protected void updateCaches(IUElementListRoot newRoot, ProfileChangeOperation op) {
resolvedOperation = op;
if (newRoot != null && root != newRoot) {
@@ -326,6 +341,7 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage#setCheckedElements(java.lang.Object[])
*/
+ @Override
public void setCheckedElements(Object[] elements) {
if (tableViewer == null)
initialSelections = elements;
@@ -333,14 +349,17 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
tableViewer.setCheckedElements(elements);
}
+ @Override
protected SashForm getSashForm() {
return sashForm;
}
+ @Override
protected String getDialogSettingsName() {
return getWizard().getClass().getName() + "." + DIALOG_SETTINGS_SECTION; //$NON-NLS-1$
}
+ @Override
protected int getColumnWidth(int index) {
return tableViewer.getTable().getColumn(index).getWidth();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java
index d1ee90da3..62ef390ea 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java
@@ -59,12 +59,14 @@ public abstract class SizeComputingWizardPage extends ResolutionResultsWizardPag
if (sizingJob != null)
sizingJob.cancel();
sizingJob = new Job(ProvUIMessages.SizeComputingWizardPage_SizeJobTitle) {
+ @Override
protected IStatus run(IProgressMonitor monitor) {
size = ProvUI.getSize(ProvUI.getEngine(getProvisioningUI().getSession()), plan, provisioningContext, monitor);
if (monitor.isCanceled())
return Status.CANCEL_STATUS;
if (display != null) {
display.asyncExec(new Runnable() {
+ @Override
public void run() {
updateSizingInfo();
}
@@ -80,6 +82,7 @@ public abstract class SizeComputingWizardPage extends ResolutionResultsWizardPag
sizingJob.schedule();
}
+ @Override
protected void createSizingInfo(Composite parent) {
sizeInfo = new Label(parent, SWT.NONE);
GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
@@ -108,6 +111,7 @@ public abstract class SizeComputingWizardPage extends ResolutionResultsWizardPag
return NLS.bind(ProvUIMessages.IUDetailsLabelProvider_Bytes, NumberFormat.getInstance().format(new Long(size)));
}
+ @Override
public void dispose() {
if (sizingJob != null) {
sizingJob.cancel();
@@ -115,12 +119,14 @@ public abstract class SizeComputingWizardPage extends ResolutionResultsWizardPag
}
}
+ @Override
public void updateStatus(IUElementListRoot root, ProfileChangeOperation op) {
super.updateStatus(root, op);
if (op != null && op.getProvisioningPlan() != null)
computeSizing(op.getProvisioningPlan(), op.getProvisioningContext());
}
+ @Override
protected IQueryable<IInstallableUnit> getQueryable(IProvisioningPlan plan) {
return plan.getAdditions();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java
index f3eafc2f0..3733bdd46 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java
@@ -32,6 +32,7 @@ public class TextURLDropAdapter extends URLDropAdapter {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.dialogs.URLDropAdapter#handleURLString(java.lang.String, org.eclipse.swt.dnd.DropTargetEvent)
*/
+ @Override
protected void handleDrop(String urlText, DropTargetEvent event) {
text.setText(urlText);
event.detail = DND.DROP_LINK;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java
index fe2d68036..7c36e5ac4 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java
@@ -44,6 +44,7 @@ public class TrustCertificateDialog extends ListSelectionDialog {
detailsButton = new Button(composite, SWT.NONE);
detailsButton.setText(ProvUIMessages.TrustCertificateDialog_Details);
detailsButton.addSelectionListener(new SelectionListener() {
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
if (selectedCertificate != null) {
X509Certificate cert = (X509Certificate) ((TreeNode) selectedCertificate).getValue();
@@ -52,12 +53,14 @@ public class TrustCertificateDialog extends ListSelectionDialog {
}
}
+ @Override
public void widgetSelected(SelectionEvent e) {
widgetDefaultSelected(e);
}
});
}
+ @Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
certificateChainViewer = new TreeViewer(composite, SWT.BORDER);
@@ -89,6 +92,7 @@ public class TrustCertificateDialog extends ListSelectionDialog {
private ISelectionChangedListener getChainSelectionListener() {
return new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
if (selection instanceof StructuredSelection) {
@@ -104,6 +108,7 @@ public class TrustCertificateDialog extends ListSelectionDialog {
private IDoubleClickListener getDoubleClickListener() {
return new IDoubleClickListener() {
+ @Override
public void doubleClick(DoubleClickEvent event) {
StructuredSelection selection = (StructuredSelection) event.getSelection();
Object selectedElement = selection.getFirstElement();
@@ -119,6 +124,7 @@ public class TrustCertificateDialog extends ListSelectionDialog {
private ISelectionChangedListener getParentSelectionListener() {
return new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
if (selection instanceof StructuredSelection) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/URLDropAdapter.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/URLDropAdapter.java
index 924e28b60..faed6d8ce 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/URLDropAdapter.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/URLDropAdapter.java
@@ -35,6 +35,7 @@ public abstract class URLDropAdapter extends DropTargetAdapter {
this.convertFileToURL = convertFileToURL;
}
+ @Override
public void dragEnter(DropTargetEvent e) {
if (!dropTargetIsValid(e)) {
e.detail = DND.DROP_NONE;
@@ -44,11 +45,13 @@ public abstract class URLDropAdapter extends DropTargetAdapter {
e.detail = DND.DROP_LINK;
}
+ @Override
public void dragOperationChanged(DropTargetEvent e) {
if (e.detail == DND.DROP_NONE)
e.detail = DND.DROP_LINK;
}
+ @Override
public void drop(DropTargetEvent event) {
if (dropTargetIsValid(event)) {
String urlText = getURLText(event);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java
index bfcb6334f..f5135fa26 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java
@@ -35,6 +35,7 @@ public class UninstallWizard extends ProvisioningOperationWizard {
setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_UNINSTALL));
}
+ @Override
protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
mainPage = new SelectableIUsPage(ui, this, input, selections);
mainPage.setTitle(ProvUIMessages.UninstallIUOperationLabel);
@@ -43,10 +44,12 @@ public class UninstallWizard extends ProvisioningOperationWizard {
return mainPage;
}
+ @Override
protected ResolutionResultsWizardPage createResolutionPage() {
return new UninstallWizardPage(ui, this, root, (UninstallOperation) operation);
}
+ @Override
protected void initializeResolutionModelElements(Object[] selectedElements) {
root = new IUElementListRoot(ui);
ArrayList<InstalledIUElement> list = new ArrayList<InstalledIUElement>(selectedElements.length);
@@ -63,6 +66,7 @@ public class UninstallWizard extends ProvisioningOperationWizard {
planSelections = selections.toArray();
}
+ @Override
protected IResolutionErrorReportingPage createErrorReportingPage() {
return (SelectableIUsPage) mainPage;
}
@@ -71,6 +75,7 @@ public class UninstallWizard extends ProvisioningOperationWizard {
* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#getStartingPage()
*/
+ @Override
public IWizardPage getStartingPage() {
if (getCurrentStatus().isOK()) {
((SelectableIUsPage) mainPage).setPageComplete(true);
@@ -82,6 +87,7 @@ public class UninstallWizard extends ProvisioningOperationWizard {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getProfileChangeOperation(java.lang.Object[])
*/
+ @Override
protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) {
UninstallOperation op = new UninstallOperation(ui.getSession(), ElementUtils.elementsToIUs(elements));
op.setProfileId(getProfileId());
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java
index 8dea4ef18..7f3351aab 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java
@@ -26,14 +26,17 @@ public class UninstallWizardPage extends ResolutionResultsWizardPage {
setDescription(ProvUIMessages.UninstallWizardPage_Description);
}
+ @Override
protected String getOperationLabel() {
return ProvUIMessages.UninstallIUOperationLabel;
}
+ @Override
protected String getOperationTaskName() {
return ProvUIMessages.UninstallIUOperationTask;
}
+ @Override
protected IQueryable<IInstallableUnit> getQueryable(IProvisioningPlan plan) {
return plan.getRemovals();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java
index 5152bb53a..2bf698e3d 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java
@@ -43,6 +43,7 @@ public class UpdateSingleIUPage extends ProvisioningWizardPage {
this.operation = operation;
}
+ @Override
public void createControl(Composite parent) {
IInstallableUnit updateIU = getUpdate().replacement;
String url = null;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java
index 0f57d7384..6ff3382e4 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java
@@ -51,6 +51,7 @@ public class UpdateSingleIUWizard extends Wizard {
* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#addPages()
*/
+ @Override
public void addPages() {
mainPage = createMainPage();
addPage(mainPage);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
index fa252f22c..6f25bd834 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
@@ -101,6 +101,7 @@ public class UpdateWizard extends WizardWithLicenses {
recomputePlan(getContainer());
}
+ @Override
protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
mainPage = new SelectableIUsPage(ui, this, getAllPossibleUpdatesRoot(), selections);
mainPage.setTitle(ProvUIMessages.UpdateAction_UpdatesAvailableTitle);
@@ -109,10 +110,12 @@ public class UpdateWizard extends WizardWithLicenses {
return mainPage;
}
+ @Override
protected ResolutionResultsWizardPage createResolutionPage() {
return new UpdateWizardPage(ui, this, root, (UpdateOperation) operation);
}
+ @Override
protected void initializeResolutionModelElements(Object[] selectedElements) {
if (selectedElements == null)
return;
@@ -142,6 +145,7 @@ public class UpdateWizard extends WizardWithLicenses {
}
}
+ @Override
protected IResolutionErrorReportingPage createErrorReportingPage() {
return (SelectableIUsPage) mainPage;
}
@@ -150,6 +154,7 @@ public class UpdateWizard extends WizardWithLicenses {
this.skipSelectionsPage = skipSelectionsPage;
}
+ @Override
public IWizardPage getStartingPage() {
if (skipSelectionsPage) {
// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=276963
@@ -163,6 +168,7 @@ public class UpdateWizard extends WizardWithLicenses {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getProfileChangeOperation(java.lang.Object[])
*/
+ @Override
protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) {
if (operation == null) {
operation = new UpdateOperation(ui.getSession(), getIUsToReplace(elements));
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java
index 81f34fcd3..089c2ea8b 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java
@@ -26,6 +26,7 @@ public class UpdateWizardPage extends SizeComputingWizardPage {
setDescription(ProvUIMessages.UpdateWizardPage_Description);
}
+ @Override
protected String getIUDescription(IInstallableUnit iu) {
if (iu != null) {
IUpdateDescriptor updateDescriptor = iu.getUpdateDescriptor();
@@ -35,10 +36,12 @@ public class UpdateWizardPage extends SizeComputingWizardPage {
return super.getIUDescription(iu);
}
+ @Override
protected String getOperationLabel() {
return ProvUIMessages.UpdateIUOperationLabel;
}
+ @Override
protected String getOperationTaskName() {
return ProvUIMessages.UpdateIUOperationTask;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java
index c2cda21b2..b60ab5fcf 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java
@@ -74,12 +74,14 @@ public class UserValidationDialog extends Dialog {
this.dialogImageType = dialogImageType;
}
+ @Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setText(titleMessage);
newShell.setImage(titleImage);
}
+ @Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
@@ -139,6 +141,7 @@ public class UserValidationDialog extends Dialog {
saveButton.setSelection(saveResult());
}
+ @Override
protected void okPressed() {
this.result = new AuthenticationInfo(username.getText(), password.getText(), saveButton.getSelection());
super.okPressed();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
index 12b89fcc3..ea0b1901e 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
@@ -46,6 +46,7 @@ public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
this.bypassLicencePage = bypassLicencePage;
}
+ @Override
public void addPages() {
super.addPages();
@@ -72,6 +73,7 @@ public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
*/
+ @Override
public IWizardPage getNextPage(IWizardPage page) {
// If the license page is supposed to be the next page,
// ensure there are actually licenses that need acceptance.
@@ -90,6 +92,7 @@ public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
return proposedPage;
}
+ @Override
protected void planChanged() {
super.planChanged();
if (!bypassLicencePage) {
@@ -101,6 +104,7 @@ public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#performFinish()
*/
+ @Override
public boolean performFinish() {
if (!bypassLicencePage) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
index 28596ad10..97c5a3b86 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
@@ -35,18 +35,22 @@ public class ArtifactElement extends ProvElement {
*
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
*/
+ @Override
protected String getImageId(Object obj) {
return null;
}
+ @Override
public String getLabel(Object o) {
return key.getId() + " [" + key.getClassifier() + "]"; //$NON-NLS-1$//$NON-NLS-2$
}
+ @Override
public Object[] getChildren(Object o) {
return repo.getArtifactDescriptors(key);
}
+ @Override
@SuppressWarnings("unchecked")
public <T> T getAdapter(Class<T> adapter) {
if (adapter == IArtifactRepository.class)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java
index 5ad41d337..834ced34b 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java
@@ -28,6 +28,7 @@ public class ArtifactRepositories extends RootElement {
this.queryable = queryable;
}
+ @Override
protected int getDefaultQueryType() {
return QueryProvider.ARTIFACT_REPOS;
}
@@ -36,6 +37,7 @@ public class ArtifactRepositories extends RootElement {
* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
*/
+ @Override
public String getLabel(Object o) {
return ProvUIMessages.Label_Repositories;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
index 83f88d89e..b980a4995 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
@@ -43,6 +43,7 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
this.isEnabled = isEnabled;
}
+ @Override
@SuppressWarnings("unchecked")
public <T> T getAdapter(Class<T> adapter) {
if (adapter == IArtifactRepository.class)
@@ -52,10 +53,12 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
return super.getAdapter(adapter);
}
+ @Override
protected String getImageId(Object obj) {
return ProvUIImages.IMG_ARTIFACT_REPOSITORY;
}
+ @Override
public String getLabel(Object o) {
String name = getName();
if (name != null && name.length() > 0) {
@@ -64,6 +67,7 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
return URIUtil.toUnencodedString(getLocation());
}
+ @Override
public IArtifactRepository getRepository(IProgressMonitor monitor) {
if (repo == null)
try {
@@ -79,6 +83,7 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getURL()
*/
+ @Override
public URI getLocation() {
return location;
}
@@ -87,6 +92,7 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getName()
*/
+ @Override
public String getName() {
String name = getArtifactRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME);
if (name == null)
@@ -100,6 +106,7 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getDescription()
*/
+ @Override
public String getDescription() {
if (getProvisioningUI().getRepositoryTracker().hasNotFoundStatusBeenReported(location))
return ProvUIMessages.RepositoryElement_NotFound;
@@ -112,6 +119,7 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#isEnabled()
*/
+ @Override
public boolean isEnabled() {
return isEnabled;
}
@@ -119,6 +127,7 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement#setEnabled(boolean)
*/
+ @Override
public void setEnabled(boolean enabled) {
isEnabled = enabled;
}
@@ -126,6 +135,7 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
*/
+ @Override
protected int getDefaultQueryType() {
return QueryProvider.AVAILABLE_ARTIFACTS;
}
@@ -135,6 +145,7 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryable()
*/
+ @Override
public IQueryable<?> getQueryable() {
if (queryable == null)
queryable = getRepository(new NullProgressMonitor());
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
index a840b8694..dea59392e 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
@@ -69,6 +69,7 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
*
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
*/
+ @Override
protected String getImageId(Object obj) {
if (imageId != null)
return imageId;
@@ -85,6 +86,7 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
return ProvUIImages.IMG_IU;
}
+ @Override
public String getImageOverlayId(Object obj) {
if (imageOverlayId != null)
return imageOverlayId;
@@ -95,10 +97,12 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
return null;
}
+ @Override
public String getLabel(Object o) {
return iu.getId();
}
+ @Override
@SuppressWarnings("unchecked")
public <T> T getAdapter(Class<T> adapter) {
if (adapter == IInstallableUnit.class)
@@ -106,10 +110,12 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
return super.getAdapter(adapter);
}
+ @Override
public long getSize() {
return size;
}
+ @Override
public void computeSize(IProgressMonitor monitor) {
if (profileID == null)
return;
@@ -141,14 +147,17 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
return ProvUI.getProfileRegistry(getProvisioningUI().getSession());
}
+ @Override
public IInstallableUnit getIU() {
return iu;
}
+ @Override
public boolean shouldShowSize() {
return shouldShowSize;
}
+ @Override
public boolean shouldShowVersion() {
return true;
}
@@ -156,6 +165,7 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
*/
+ @Override
protected int getDefaultQueryType() {
return QueryProvider.AVAILABLE_IUS;
}
@@ -163,6 +173,7 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.model.IUElement#getRequirements()
*/
+ @Override
public Collection<IRequirement> getRequirements() {
return iu.getRequirements();
}
@@ -170,10 +181,12 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.model.IIUElement#shouldShowChildren()
*/
+ @Override
public boolean shouldShowChildren() {
return shouldShowChildren;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -195,12 +208,14 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
return false;
}
+ @Override
public int hashCode() {
if (iu == null)
return 0;
return iu.hashCode();
}
+ @Override
public String toString() {
if (iu == null)
return "NULL"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
index d89fcab37..764904412 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
@@ -59,6 +59,7 @@ public class AvailableUpdateElement extends AvailableIUElement {
return iuToBeUpdated;
}
+ @Override
protected IProvisioningPlan getSizingPlan(IProgressMonitor monitor) {
IPlanner planner = getPlanner();
IProfileChangeRequest request = ProfileChangeRequest.createByProfileId(getProvisioningUI().getSession().getProvisioningAgent(), profileID);
@@ -68,6 +69,7 @@ public class AvailableUpdateElement extends AvailableIUElement {
return planner.getProvisioningPlan(request, new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent()), monitor);
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -83,6 +85,7 @@ public class AvailableUpdateElement extends AvailableIUElement {
return iu.equals(other.getIU()) && iuToBeUpdated.equals(other.getIUToBeUpdated());
}
+ @Override
public int hashCode() {
final int prime = 31;
int result = 1;
@@ -95,6 +98,7 @@ public class AvailableUpdateElement extends AvailableIUElement {
return new Update(iuToBeUpdated, getIU());
}
+ @Override
protected String getImageId(Object obj) {
String imageId = super.getImageId(obj);
if (ProvUIImages.IMG_IU.equals(imageId) && isLockedForUpdate())
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
index 7d90524de..7f36e9a26 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
@@ -39,10 +39,12 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
*
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
*/
+ @Override
protected String getImageId(Object obj) {
return ProvUIImages.IMG_CATEGORY;
}
+ @Override
public String getLabel(Object o) {
IInstallableUnit iu = getIU();
if (iu != null)
@@ -50,6 +52,7 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
return null;
}
+ @Override
@SuppressWarnings("unchecked")
public <T> T getAdapter(Class<T> adapter) {
if (adapter == IInstallableUnit.class)
@@ -57,28 +60,34 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
return super.getAdapter(adapter);
}
+ @Override
protected int getDefaultQueryType() {
return QueryProvider.AVAILABLE_IUS;
}
+ @Override
public IInstallableUnit getIU() {
if (ius == null || ius.isEmpty())
return null;
return ius.get(0);
}
+ @Override
public long getSize() {
return ProvUI.SIZE_UNKNOWN;
}
+ @Override
public boolean shouldShowSize() {
return false;
}
+ @Override
public void computeSize(IProgressMonitor monitor) {
// Should never be called, since shouldShowSize() returns false
}
+ @Override
public boolean shouldShowVersion() {
return false;
}
@@ -102,6 +111,7 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
return mergeKey;
}
+ @Override
public Collection<IRequirement> getRequirements() {
if (ius == null || ius.isEmpty())
return Collections.<IRequirement> emptyList();
@@ -129,10 +139,12 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.model.IIUElement#shouldShowChildren()
*/
+ @Override
public boolean shouldShowChildren() {
return true;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -147,6 +159,7 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
return getMergeKey(myIU).equals(getMergeKey(objIU));
}
+ @Override
public int hashCode() {
IInstallableUnit iu = getIU();
final int prime = 23;
@@ -155,6 +168,7 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
return result;
}
+ @Override
public String toString() {
IInstallableUnit iu = getIU();
if (iu == null)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java
index e1a98b029..4df07ea51 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java
@@ -43,6 +43,7 @@ public class EmptyElementExplanation extends ProvElement {
*
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
*/
+ @Override
protected String getImageId(Object obj) {
if (severity == IStatus.ERROR)
return Dialog.DLG_IMG_MESSAGE_ERROR;
@@ -51,6 +52,7 @@ public class EmptyElementExplanation extends ProvElement {
return Dialog.DLG_IMG_MESSAGE_INFO;
}
+ @Override
public String getLabel(Object o) {
return explanation;
}
@@ -58,6 +60,7 @@ public class EmptyElementExplanation extends ProvElement {
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
*/
+ @Override
public Object[] getChildren(Object o) {
return new Object[0];
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java
index 99897e4ba..dc1885d66 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java
@@ -46,10 +46,12 @@ public class IUElementListRoot extends QueriedElement {
*
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
*/
+ @Override
protected String getImageId(Object obj) {
return null;
}
+ @Override
public String getLabel(Object o) {
return null;
}
@@ -57,6 +59,7 @@ public class IUElementListRoot extends QueriedElement {
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
*/
+ @Override
public Object[] getChildren(Object o) {
return children;
}
@@ -66,10 +69,12 @@ public class IUElementListRoot extends QueriedElement {
throw new UnsupportedOperationException();
}
+ @Override
public Policy getPolicy() {
return getProvisioningUI().getPolicy();
}
+ @Override
public ProvisioningUI getProvisioningUI() {
if (ui != null)
return ui;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
index fbc81c3ed..9e0997d24 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
@@ -42,14 +42,17 @@ public class InstalledIUElement extends QueriedElement implements IIUElement {
*
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
*/
+ @Override
protected String getImageId(Object obj) {
return isPatch ? ProvUIImages.IMG_PATCH_IU : ProvUIImages.IMG_IU;
}
+ @Override
public String getLabel(Object o) {
return iu.getId();
}
+ @Override
@SuppressWarnings("unchecked")
public <T> T getAdapter(Class<T> adapter) {
if (adapter == IInstallableUnit.class)
@@ -61,24 +64,29 @@ public class InstalledIUElement extends QueriedElement implements IIUElement {
return profileId;
}
+ @Override
public IInstallableUnit getIU() {
return iu;
}
// TODO Later we might consider showing this in the installed views,
// but it is less important than before install.
+ @Override
public long getSize() {
return ProvUI.SIZE_UNKNOWN;
}
+ @Override
public boolean shouldShowSize() {
return false;
}
+ @Override
public void computeSize(IProgressMonitor monitor) {
// Should never be called, as long as shouldShowSize() returns false
}
+ @Override
public boolean shouldShowVersion() {
return true;
}
@@ -86,6 +94,7 @@ public class InstalledIUElement extends QueriedElement implements IIUElement {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.model.IUElement#getRequirements()
*/
+ @Override
public Collection<IRequirement> getRequirements() {
return iu.getRequirements();
}
@@ -93,6 +102,7 @@ public class InstalledIUElement extends QueriedElement implements IIUElement {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
*/
+ @Override
protected int getDefaultQueryType() {
return QueryProvider.INSTALLED_IUS;
}
@@ -100,10 +110,12 @@ public class InstalledIUElement extends QueriedElement implements IIUElement {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.model.IIUElement#shouldShowChildren()
*/
+ @Override
public boolean shouldShowChildren() {
return true;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -125,12 +137,14 @@ public class InstalledIUElement extends QueriedElement implements IIUElement {
return false;
}
+ @Override
public int hashCode() {
if (iu == null)
return 0;
return iu.hashCode();
}
+ @Override
public String toString() {
if (iu == null)
return "NULL"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java
index bdc8bdfdd..001f39808 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java
@@ -70,12 +70,14 @@ public class MetadataRepositories extends RootElement {
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryType()
*/
+ @Override
public int getQueryType() {
if (getQueryContext() == null)
return getDefaultQueryType();
return getQueryContext().getQueryType();
}
+ @Override
protected int getDefaultQueryType() {
return QueryProvider.METADATA_REPOS;
}
@@ -84,6 +86,7 @@ public class MetadataRepositories extends RootElement {
* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
*/
+ @Override
public String getLabel(Object o) {
return ProvUIMessages.Label_Repositories;
}
@@ -93,6 +96,7 @@ public class MetadataRepositories extends RootElement {
* (type = METADATA_REPOSITORIES) rather than loading repos. If this
* is the case, we only care whether we have a queryable or not.
*/
+ @Override
public boolean hasQueryable() {
if (getQueryType() == QueryProvider.METADATA_REPOS)
return queryable != null;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
index 78c543c81..a6a0071a5 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
@@ -54,6 +54,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
this.isEnabled = isEnabled;
}
+ @Override
@SuppressWarnings("unchecked")
public <T> T getAdapter(Class<T> adapter) {
if (adapter == IMetadataRepository.class)
@@ -63,6 +64,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
return super.getAdapter(adapter);
}
+ @Override
protected Object[] fetchChildren(Object o, IProgressMonitor monitor) {
if (cache != null)
return cache;
@@ -83,14 +85,17 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
return cache;
}
+ @Override
protected String getImageId(Object obj) {
return ProvUIImages.IMG_METADATA_REPOSITORY;
}
+ @Override
protected int getDefaultQueryType() {
return QueryProvider.AVAILABLE_IUS;
}
+ @Override
public String getLabel(Object o) {
String n = getName();
if (n != null && n.length() > 0) {
@@ -104,12 +109,14 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryable()
*/
+ @Override
public IQueryable<?> getQueryable() {
if (queryable == null)
queryable = getRepository(new NullProgressMonitor());
return queryable;
}
+ @Override
public IMetadataRepository getRepository(IProgressMonitor monitor) {
try {
return getMetadataRepository(monitor);
@@ -135,6 +142,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#knowsQueryable()
*/
+ @Override
public boolean knowsQueryable() {
return location != null;
}
@@ -142,6 +150,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getURL()
*/
+ @Override
public URI getLocation() {
return location;
}
@@ -150,6 +159,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getName()
*/
+ @Override
public String getName() {
if (name == null) {
name = getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME);
@@ -174,6 +184,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getDescription()
*/
+ @Override
public String getDescription() {
if (getProvisioningUI().getRepositoryTracker().hasNotFoundStatusBeenReported(location))
return ProvUIMessages.RepositoryElement_NotFound;
@@ -186,6 +197,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#isEnabled()
*/
+ @Override
public boolean isEnabled() {
return isEnabled;
}
@@ -193,6 +205,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement#setEnabled(boolean)
*/
+ @Override
public void setEnabled(boolean enabled) {
isEnabled = enabled;
}
@@ -207,6 +220,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#hasQueryable()
*/
+ @Override
public boolean hasQueryable() {
if (queryable != null)
return true;
@@ -222,6 +236,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
return true;
}
+ @Override
public Policy getPolicy() {
Object parent = getParent(this);
if (parent == null)
@@ -231,6 +246,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
return getProvisioningUI().getPolicy();
}
+ @Override
public String toString() {
StringBuffer result = new StringBuffer();
result.append("Metadata Repository Element - "); //$NON-NLS-1$
@@ -251,6 +267,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
* When they are roots the should have a ui set directly. As children they should
* defer to the parent to get the ui.
*/
+ @Override
public ProvisioningUI getProvisioningUI() {
ProvisioningUI ui = super.getProvisioningUI();
if (ui != null)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
index b4af9bfbe..6259d39f4 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
@@ -29,6 +29,7 @@ public class ProfileElement extends RemoteQueriedElement {
this.profileId = profileId;
}
+ @Override
@SuppressWarnings("unchecked")
public <T> T getAdapter(Class<T> adapter) {
if (adapter == IProfile.class)
@@ -36,10 +37,12 @@ public class ProfileElement extends RemoteQueriedElement {
return super.getAdapter(adapter);
}
+ @Override
protected String getImageId(Object obj) {
return ProvUIImages.IMG_PROFILE;
}
+ @Override
public String getLabel(Object o) {
return profileId;
}
@@ -48,10 +51,12 @@ public class ProfileElement extends RemoteQueriedElement {
return profileId;
}
+ @Override
protected int getDefaultQueryType() {
return QueryProvider.INSTALLED_IUS;
}
+ @Override
public IQueryable<?> getQueryable() {
return ProvUI.getProfileRegistry(getProvisioningUI().getSession()).getProfile(profileId);
}
@@ -62,6 +67,7 @@ public class ProfileElement extends RemoteQueriedElement {
* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#knowsQueryable()
*/
+ @Override
public boolean knowsQueryable() {
return profileId != null;
}
@@ -76,6 +82,7 @@ public class ProfileElement extends RemoteQueriedElement {
* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.model.RemoteQueriedElement#isContainer()
*/
+ @Override
public boolean isContainer() {
return super.getChildren(this).length > 0;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java
index c8c8a1a94..39d4a5ba6 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java
@@ -44,6 +44,7 @@ public class ProfileSnapshots extends ProvElement implements IDeferredWorkbenchA
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
*/
+ @Override
public Object[] getChildren(Object o) {
IProfileRegistry registry = ProvUI.getProfileRegistry(session);
long[] timestamps = registry.listProfileTimestamps(profileId);
@@ -80,6 +81,7 @@ public class ProfileSnapshots extends ProvElement implements IDeferredWorkbenchA
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
*/
+ @Override
public String getLabel(Object o) {
return ProvUIMessages.ProfileSnapshots_Label;
}
@@ -87,6 +89,7 @@ public class ProfileSnapshots extends ProvElement implements IDeferredWorkbenchA
/* (non-Javadoc)
* @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#fetchDeferredChildren(java.lang.Object, org.eclipse.ui.progress.IElementCollector, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void fetchDeferredChildren(Object object, IElementCollector collector, IProgressMonitor monitor) {
Object[] children = getChildren(object);
collector.add(children, monitor);
@@ -95,6 +98,7 @@ public class ProfileSnapshots extends ProvElement implements IDeferredWorkbenchA
/* (non-Javadoc)
* @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#getRule(java.lang.Object)
*/
+ @Override
public ISchedulingRule getRule(Object object) {
return null;
}
@@ -102,6 +106,7 @@ public class ProfileSnapshots extends ProvElement implements IDeferredWorkbenchA
/* (non-Javadoc)
* @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#isContainer()
*/
+ @Override
public boolean isContainer() {
return false;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java
index 6f9540795..724baf469 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java
@@ -32,6 +32,7 @@ public class Profiles extends RootElement {
* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
*/
+ @Override
public String getLabel(Object o) {
return ProvUIMessages.Label_Profiles;
}
@@ -39,6 +40,7 @@ public class Profiles extends RootElement {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getDefaultQueryType()
*/
+ @Override
protected int getDefaultQueryType() {
return QueryProvider.PROFILES;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
index 3b48e50e6..8550c4ccc 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
@@ -37,6 +37,7 @@ public abstract class ProvElement implements IWorkbenchAdapter, IAdaptable {
this.parent = parent;
}
+ @Override
@SuppressWarnings("unchecked")
public <T> T getAdapter(Class<T> adapter) {
if (adapter == IWorkbenchAdapter.class)
@@ -68,6 +69,7 @@ public abstract class ProvElement implements IWorkbenchAdapter, IAdaptable {
*
* @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
*/
+ @Override
public ImageDescriptor getImageDescriptor(Object object) {
String id = getImageId(object);
if (id == null) {
@@ -133,6 +135,7 @@ public abstract class ProvElement implements IWorkbenchAdapter, IAdaptable {
* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
*/
+ @Override
public Object getParent(Object o) {
return parent;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
index b0fa3fa91..07f9597b8 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
@@ -65,6 +65,7 @@ public abstract class QueriedElement extends ProvElement {
return null;
}
+ @Override
public Object[] getChildren(Object o) {
return fetchChildren(o, new NullProgressMonitor());
}
@@ -73,6 +74,7 @@ public abstract class QueriedElement extends ProvElement {
* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
*/
+ @Override
public String getLabel(Object o) {
return null;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java
index f3a43e045..e2e518293 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java
@@ -44,6 +44,7 @@ public abstract class QueriedElementWrapper extends ElementWrapper {
/**
* Sets an item as Queryable if it is a QueriedElement
*/
+ @Override
protected Object wrap(Object item) {
if (item instanceof QueriedElement) {
QueriedElement element = (QueriedElement) item;
@@ -54,6 +55,7 @@ public abstract class QueriedElementWrapper extends ElementWrapper {
return item;
}
+ @Override
public Collection<?> getElements(Collector<?> collector) {
// Any previously stored explanations are not valid.
emptyExplanationString = null;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
index f2c19d926..b814f07a2 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
@@ -29,6 +29,7 @@ public abstract class RemoteQueriedElement extends QueriedElement implements IDe
super(parent);
}
+ @Override
public void fetchDeferredChildren(Object o, IElementCollector collector, IProgressMonitor monitor) {
try {
Object[] children = fetchChildren(o, monitor);
@@ -46,10 +47,12 @@ public abstract class RemoteQueriedElement extends QueriedElement implements IDe
collector.done();
}
+ @Override
public ISchedulingRule getRule(Object object) {
return null;
}
+ @Override
public boolean isContainer() {
return true;
}
@@ -69,6 +72,7 @@ public abstract class RemoteQueriedElement extends QueriedElement implements IDe
* @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#hasQueryable()
*/
+ @Override
public boolean hasQueryable() {
if (queryable instanceof QueryableMetadataRepositoryManager)
return ((QueryableMetadataRepositoryManager) queryable).areRepositoriesLoaded();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
index 15da99a69..b0450404f 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
@@ -48,16 +48,19 @@ public class RollbackProfileElement extends RemoteQueriedElement {
*
* @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
*/
+ @Override
protected String getImageId(Object obj) {
return ProvUIImages.IMG_PROFILE;
}
+ @Override
public String getLabel(Object o) {
if (isCurrent)
return ProvUIMessages.RollbackProfileElement_CurrentInstallation;
return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG).format(new Date(timestamp));
}
+ @Override
@SuppressWarnings("unchecked")
public <T> T getAdapter(Class<T> adapter) {
if (adapter == IProfile.class)
@@ -100,6 +103,7 @@ public class RollbackProfileElement extends RemoteQueriedElement {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
*/
+ @Override
protected int getDefaultQueryType() {
return QueryProvider.INSTALLED_IUS;
}
@@ -109,6 +113,7 @@ public class RollbackProfileElement extends RemoteQueriedElement {
* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getQueryable()
*/
+ @Override
public IQueryable<?> getQueryable() {
return getProfileSnapshot(new NullProgressMonitor());
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java
index 134baedd2..ef6f55cf6 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java
@@ -53,14 +53,17 @@ public abstract class RootElement extends RemoteQueriedElement {
queryContext = context;
}
+ @Override
public IUViewQueryContext getQueryContext() {
return queryContext;
}
+ @Override
public Policy getPolicy() {
return ui.getPolicy();
}
+ @Override
public ProvisioningUI getProvisioningUI() {
return ui;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java
index a563b7836..d3da954d6 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java
@@ -39,6 +39,7 @@ public class Updates extends QueriedElement {
* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
*/
+ @Override
public String getLabel(Object o) {
return ProvUIMessages.Updates_Label;
}
@@ -46,6 +47,7 @@ public class Updates extends QueriedElement {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getDefaultQueryType()
*/
+ @Override
protected int getDefaultQueryType() {
return QueryProvider.AVAILABLE_UPDATES;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java
index 0cc55e904..bded9d2e2 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java
@@ -30,6 +30,7 @@ public class ArtifactKeyWrapper extends QueriedElementWrapper {
this.repo = repo;
}
+ @Override
protected boolean shouldWrap(Object match) {
if ((match instanceof IArtifactKey))
return true;
@@ -39,6 +40,7 @@ public class ArtifactKeyWrapper extends QueriedElementWrapper {
/**
* Transforms the item to a UI element
*/
+ @Override
protected Object wrap(Object item) {
return super.wrap(new ArtifactElement(parent, (IArtifactKey) item, repo));
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java
index bd6ea58a6..925d80c61 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java
@@ -35,6 +35,7 @@ public class ArtifactRepositoryElementWrapper extends QueriedElementWrapper {
* @return <code>true</code> if the query should continue,
* or <code>false</code> to indicate the query should stop.
*/
+ @Override
protected boolean shouldWrap(Object match) {
if ((match instanceof URI))
return true;
@@ -44,6 +45,7 @@ public class ArtifactRepositoryElementWrapper extends QueriedElementWrapper {
/**
* Transforms the item to a UI element
*/
+ @Override
protected Object wrap(Object item) {
// Assume the item is enabled
boolean enabled = true;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java
index 50c75a7cb..f24cae3cf 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java
@@ -63,6 +63,7 @@ public class AvailableIUWrapper extends QueriedElementWrapper {
InformationCache cache = null;
+ @Override
protected boolean shouldWrap(Object match) {
IInstallableUnit iu = ProvUI.getAdapter(match, IInstallableUnit.class);
cache = computeIUInformation(iu); // Cache the result
@@ -99,6 +100,7 @@ public class AvailableIUWrapper extends QueriedElementWrapper {
return new InformationCache(iu, isUpdate, isInstalled, isPatch);
}
+ @Override
protected Object wrap(Object item) {
IInstallableUnit iu = ProvUI.getAdapter(item, IInstallableUnit.class);
boolean isUpdate = false;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java
index 0b8248f7b..a5e3e1cb9 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java
@@ -35,6 +35,7 @@ public class CategoryElementWrapper extends QueriedElementWrapper {
super(queryable, parent);
}
+ @Override
protected boolean shouldWrap(Object match) {
if (match instanceof IInstallableUnit) {
IInstallableUnit iu = (IInstallableUnit) match;
@@ -62,6 +63,7 @@ public class CategoryElementWrapper extends QueriedElementWrapper {
return false;
}
+ @Override
public Collection<?> getElements(Collector<?> collector) {
if (collector.isEmpty())
return super.getElements(collector);
@@ -70,6 +72,7 @@ public class CategoryElementWrapper extends QueriedElementWrapper {
return results;
}
+ @Override
protected Object wrap(Object item) {
IInstallableUnit iu = (IInstallableUnit) item;
return super.wrap(new CategoryElement(parent, iu));
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java
index 5d6bf3c27..038204d59 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java
@@ -36,6 +36,7 @@ public class InstalledIUElementWrapper extends QueriedElementWrapper {
* @return <code>true</code> if the query should continue,
* or <code>false</code> to indicate the query should stop.
*/
+ @Override
protected boolean shouldWrap(Object match) {
if (match instanceof IInstallableUnit)
return true;
@@ -45,6 +46,7 @@ public class InstalledIUElementWrapper extends QueriedElementWrapper {
/**
* Transforms the item to a UI element
*/
+ @Override
protected Object wrap(Object item) {
if (queryable instanceof IProfile)
return super.wrap(new InstalledIUElement(parent, ((IProfile) queryable).getProfileId(), (IInstallableUnit) item));
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java
index 67f3207d8..08faf2f1b 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java
@@ -37,6 +37,7 @@ public class MetadataRepositoryElementWrapper extends QueriedElementWrapper {
* @return <code>true</code> if the query should continue,
* or <code>false</code> to indicate the query should stop.
*/
+ @Override
protected boolean shouldWrap(Object match) {
if ((match instanceof URI))
return true;
@@ -46,6 +47,7 @@ public class MetadataRepositoryElementWrapper extends QueriedElementWrapper {
/**
* Transforms the item to a UI element
*/
+ @Override
protected Object wrap(Object item) {
// Assume the item is enabled
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java
index 973efa235..2e20461c7 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java
@@ -27,6 +27,7 @@ public class ProfileElementWrapper extends QueriedElementWrapper {
super(profile, parent);
}
+ @Override
protected boolean shouldWrap(Object match) {
if ((match instanceof IProfile))
return true;
@@ -36,6 +37,7 @@ public class ProfileElementWrapper extends QueriedElementWrapper {
/**
* Transforms the item to a UI element
*/
+ @Override
protected Object wrap(Object item) {
return super.wrap(new ProfileElement(parent, ((IProfile) item).getProfileId()));
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java
index 7e37c4c6d..05bae37f1 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java
@@ -31,6 +31,7 @@ public class QueryableProfileRegistry implements IQueryable<IProfile> {
this.ui = ui;
}
+ @Override
public IQueryResult<IProfile> query(IQuery<IProfile> query, IProgressMonitor monitor) {
IProfile[] profiles = ProvUI.getProfileRegistry(ui.getSession()).getProfiles();
SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.QueryableProfileRegistry_QueryProfileProgress, profiles.length);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
index 6c7f9c28a..78f1cc1c4 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
@@ -35,6 +35,7 @@ public class QueryableUpdates implements IQueryable<IInstallableUnit> {
this.iusToUpdate = iusToUpdate;
}
+ @Override
public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
if (monitor == null)
monitor = new NullProgressMonitor();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/CertificateLabelProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/CertificateLabelProvider.java
index d11086b89..c7a45a510 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/CertificateLabelProvider.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/CertificateLabelProvider.java
@@ -21,10 +21,12 @@ import org.eclipse.swt.graphics.Image;
*/
public class CertificateLabelProvider implements ILabelProvider {
+ @Override
public Image getImage(Object element) {
return null;
}
+ @Override
public String getText(Object element) {
Certificate cert = null;
if (element instanceof TreeNode) {
@@ -37,18 +39,22 @@ public class CertificateLabelProvider implements ILabelProvider {
return ""; //$NON-NLS-1$
}
+ @Override
public void addListener(ILabelProviderListener listener) {
// do nothing
}
+ @Override
public void dispose() {
// do nothing
}
+ @Override
public boolean isLabelProperty(Object element, String property) {
return false;
}
+ @Override
public void removeListener(ILabelProviderListener listener) {
// do nothing
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java
index 2de2199b7..dc0d0ce6e 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java
@@ -51,6 +51,7 @@ public class DeferredQueryContentProvider extends ProvElementContentProvider {
listeners.remove(listener);
}
+ @Override
public void inputChanged(Viewer v, Object oldInput, Object newInput) {
super.inputChanged(v, oldInput, newInput);
@@ -61,10 +62,12 @@ public class DeferredQueryContentProvider extends ProvElementContentProvider {
viewer = (AbstractTreeViewer) v;
manager.setListener(new IDeferredQueryTreeListener() {
+ @Override
public void fetchingDeferredChildren(Object parent, Object placeholder) {
alreadyQueried.put(parent, placeholder);
}
+ @Override
public void finishedFetchingDeferredChildren(Object parent, Object placeholder) {
queryCompleted.add(parent);
}
@@ -79,6 +82,7 @@ public class DeferredQueryContentProvider extends ProvElementContentProvider {
}
}
+ @Override
public Object[] getElements(Object input) {
if (input instanceof QueriedElement) {
return getChildren(input);
@@ -86,6 +90,7 @@ public class DeferredQueryContentProvider extends ProvElementContentProvider {
return super.getElements(input);
}
+ @Override
public void dispose() {
super.dispose();
if (manager != null) {
@@ -93,6 +98,7 @@ public class DeferredQueryContentProvider extends ProvElementContentProvider {
}
}
+ @Override
public boolean hasChildren(Object element) {
if (manager != null) {
if (manager.isDeferredAdapter(element))
@@ -101,6 +107,7 @@ public class DeferredQueryContentProvider extends ProvElementContentProvider {
return super.hasChildren(element);
}
+ @Override
public Object[] getChildren(final Object parent) {
if (parent instanceof RemoteQueriedElement) {
RemoteQueriedElement element = (RemoteQueriedElement) parent;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java
index 8ee7296b2..d59689ccf 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java
@@ -34,6 +34,7 @@ public class DeferredQueryTreeContentManager extends DeferredTreeContentManager
this.element = element;
}
+ @Override
public boolean isRemoved() {
return super.isRemoved();
}
@@ -52,6 +53,7 @@ public class DeferredQueryTreeContentManager extends DeferredTreeContentManager
* (non-Javadoc)
* @see org.eclipse.ui.progress.DeferredTreeContentManager#getChildren(java.lang.Object)
*/
+ @Override
public Object[] getChildren(final Object parent) {
elementRequested = parent;
return super.getChildren(parent);
@@ -62,12 +64,14 @@ public class DeferredQueryTreeContentManager extends DeferredTreeContentManager
* (non-Javadoc)
* @see org.eclipse.ui.progress.DeferredTreeContentManager#startFetchingDeferredChildren(java.lang.Object, org.eclipse.ui.progress.IDeferredWorkbenchAdapter, org.eclipse.ui.progress.PendingUpdateAdapter)
*/
+ @Override
protected void startFetchingDeferredChildren(final Object parent, final IDeferredWorkbenchAdapter adapter, final PendingUpdateAdapter placeholder) {
if (placeholder instanceof ElementPendingUpdateAdapter)
notifyListener(true, (ElementPendingUpdateAdapter) placeholder);
super.startFetchingDeferredChildren(parent, adapter, placeholder);
}
+ @Override
protected void runClearPlaceholderJob(final PendingUpdateAdapter placeholder) {
if (placeholder instanceof ElementPendingUpdateAdapter) {
if (((ElementPendingUpdateAdapter) placeholder).isRemoved() || !PlatformUI.isWorkbenchRunning())
@@ -77,6 +81,7 @@ public class DeferredQueryTreeContentManager extends DeferredTreeContentManager
super.runClearPlaceholderJob(placeholder);
}
+ @Override
protected PendingUpdateAdapter createPendingUpdateAdapter() {
return new ElementPendingUpdateAdapter(elementRequested);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java
index 35204f430..3348f6e4a 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java
@@ -41,6 +41,7 @@ public class IUComparator extends ViewerComparator {
}
}
+ @Override
public int compare(Viewer viewer, Object obj1, Object obj2) {
IInstallableUnit iu1 = ProvUI.getAdapter(obj1, IInstallableUnit.class);
IInstallableUnit iu2 = ProvUI.getAdapter(obj2, IInstallableUnit.class);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java
index d3c516912..082f9e063 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java
@@ -62,14 +62,17 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
this.shell = shell;
}
+ @Override
public String getText(Object obj) {
return getColumnText(obj, PRIMARY_COLUMN);
}
+ @Override
public Image getImage(Object obj) {
return getColumnImage(obj, PRIMARY_COLUMN);
}
+ @Override
public String getColumnText(Object element, int columnIndex) {
int columnContent = IUColumnConfig.COLUMN_ID;
if (columnIndex < columnConfig.length) {
@@ -125,6 +128,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
return BLANK;
}
+ @Override
public Image getColumnImage(Object element, int index) {
if (index == PRIMARY_COLUMN) {
if (element instanceof ProvElement)
@@ -144,6 +148,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
if (!jobs.containsKey(element)) {
Job resolveJob = new Job(element.getIU().getId()) {
+ @Override
protected IStatus run(IProgressMonitor monitor) {
if (monitor.isCanceled())
return Status.CANCEL_STATUS;
@@ -165,6 +170,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
shell.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
if (shell != null && !shell.isDisposed())
fireLabelProviderChanged(new LabelProviderChangedEvent(IUDetailsLabelProvider.this, element));
@@ -177,6 +183,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
jobs.put(element, resolveJob);
resolveJob.setSystem(true);
resolveJob.addJobChangeListener(new JobChangeAdapter() {
+ @Override
public void done(IJobChangeEvent event) {
jobs.remove(element);
}
@@ -214,6 +221,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
this.useBoldFont = useBoldFont;
}
+ @Override
public String getToolTipText(Object element) {
IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
if (iu == null || toolTipProperty == null)
@@ -224,6 +232,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
*/
+ @Override
public Font getFont(Object element) {
if (filteredTree != null && useBoldFont) {
return FilteredTree.getBoldFont(element, filteredTree, filteredTree.getPatternFilter());
@@ -231,6 +240,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
return null;
}
+ @Override
public void dispose() {
super.dispose();
for (Job job : jobs.values())
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java
index 2caaacf1b..f27c6879e 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java
@@ -41,6 +41,7 @@ public class IUDragAdapter extends DragSourceAdapter {
* Set the drag data to represent the local selection of IU's if possible.
* Fallback to using a text description of each IU.
*/
+ @Override
public void dragSetData(DragSourceEvent event) {
IInstallableUnit[] ius = getSelectedIUs();
@@ -71,6 +72,7 @@ public class IUDragAdapter extends DragSourceAdapter {
/**
* Start the drag only if the selection contains IUs.
*/
+ @Override
public void dragStart(DragSourceEvent event) {
// Focus workaround copied from navigator drag adapter
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/MetadataRepositoryElementComparator.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/MetadataRepositoryElementComparator.java
index c99157838..ccabcad4e 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/MetadataRepositoryElementComparator.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/MetadataRepositoryElementComparator.java
@@ -31,6 +31,7 @@ public class MetadataRepositoryElementComparator extends ViewerComparator {
this.key = sortKey;
}
+ @Override
public int compare(Viewer viewer, Object obj1, Object obj2) {
MetadataRepositoryElement repo1 = obj1 instanceof MetadataRepositoryElement ? (MetadataRepositoryElement) obj1 : null;
MetadataRepositoryElement repo2 = obj2 instanceof MetadataRepositoryElement ? (MetadataRepositoryElement) obj2 : null;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java
index 850e15c1c..dfa613509 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java
@@ -19,6 +19,7 @@ import org.eclipse.jface.viewers.IElementComparer;
public class ProvElementComparer implements IElementComparer {
+ @Override
public boolean equals(Object a, Object b) {
// We treat category elements specially because this
// is one case where resolving down to an IU will lose identity
@@ -40,6 +41,7 @@ public class ProvElementComparer implements IElementComparer {
return a.equals(b);
}
+ @Override
public int hashCode(Object element) {
if (element instanceof CategoryElement)
return element.hashCode();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java
index 0bf4635eb..7b9f6627d 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java
@@ -45,6 +45,7 @@ public class ProvElementContentProvider implements ITreeContentProvider {
* (non-Javadoc)
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
*/
+ @Override
public Object[] getElements(final Object input) {
// Simple deferred fetch handling for table viewers
if (fetchInBackground && input instanceof IDeferredWorkbenchAdapter && viewer instanceof AbstractTableViewer) {
@@ -53,22 +54,26 @@ public class ProvElementContentProvider implements ITreeContentProvider {
if (fetchJob != null)
fetchJob.cancel();
fetchJob = new Job(ProvUIMessages.ProvElementContentProvider_FetchJobTitle) {
+ @Override
protected IStatus run(final IProgressMonitor monitor) {
IDeferredWorkbenchAdapter parent = (IDeferredWorkbenchAdapter) input;
final ArrayList<Object> children = new ArrayList<Object>();
parent.fetchDeferredChildren(parent, new IElementCollector() {
+ @Override
public void add(Object element, IProgressMonitor mon) {
if (mon.isCanceled())
return;
children.add(element);
}
+ @Override
public void add(Object[] elements, IProgressMonitor mon) {
if (mon.isCanceled())
return;
children.addAll(Arrays.asList(elements));
}
+ @Override
public void done() {
// nothing special to do
}
@@ -76,6 +81,7 @@ public class ProvElementContentProvider implements ITreeContentProvider {
}, monitor);
if (!monitor.isCanceled()) {
display.asyncExec(new Runnable() {
+ @Override
public void run() {
AbstractTableViewer tableViewer = (AbstractTableViewer) viewer;
if (monitor.isCanceled() || tableViewer == null || tableViewer.getControl().isDisposed())
@@ -91,6 +97,7 @@ public class ProvElementContentProvider implements ITreeContentProvider {
return Status.OK_STATUS;
}
+ @Override
public boolean belongsTo(Object family) {
return family == fetchFamily;
}
@@ -108,6 +115,7 @@ public class ProvElementContentProvider implements ITreeContentProvider {
* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
*/
+ @Override
public Object getParent(Object child) {
if (child instanceof ProvElement) {
return ((ProvElement) child).getParent(child);
@@ -119,6 +127,7 @@ public class ProvElementContentProvider implements ITreeContentProvider {
* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
*/
+ @Override
public boolean hasChildren(Object element) {
if (element instanceof ProvElement)
return ((ProvElement) element).hasChildren(element);
@@ -129,6 +138,7 @@ public class ProvElementContentProvider implements ITreeContentProvider {
* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
*/
+ @Override
public Object[] getChildren(final Object parent) {
if (parent instanceof ProvElement) {
return ((ProvElement) parent).getChildren(parent);
@@ -139,6 +149,7 @@ public class ProvElementContentProvider implements ITreeContentProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
*/
+ @Override
public void dispose() {
viewer = null;
if (fetchJob != null) {
@@ -150,6 +161,7 @@ public class ProvElementContentProvider implements ITreeContentProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
+ @Override
public void inputChanged(Viewer aViewer, Object oldInput, Object newInput) {
this.viewer = aViewer;
if (fetchJob != null) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java
index f8e204130..fdb42fee2 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java
@@ -38,6 +38,7 @@ import org.eclipse.ui.PlatformUI;
*/
public class ProvElementLabelProvider extends LabelProvider implements ITableLabelProvider {
+ @Override
public String getText(Object obj) {
if (obj instanceof ProvElement) {
return ((ProvElement) obj).getLabel(obj);
@@ -80,6 +81,7 @@ public class ProvElementLabelProvider extends LabelProvider implements ITableLab
return obj.toString();
}
+ @Override
public Image getImage(Object obj) {
if (obj instanceof ProvElement) {
return ((ProvElement) obj).getImage(obj);
@@ -105,6 +107,7 @@ public class ProvElementLabelProvider extends LabelProvider implements ITableLab
return null;
}
+ @Override
public Image getColumnImage(Object element, int index) {
if (index == 0) {
return getImage(element);
@@ -112,6 +115,7 @@ public class ProvElementLabelProvider extends LabelProvider implements ITableLab
return null;
}
+ @Override
public String getColumnText(Object element, int columnIndex) {
switch (columnIndex) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java
index 41e316039..e06e92920 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java
@@ -23,6 +23,7 @@ import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
*/
public class RepositoryContentProvider extends DeferredQueryContentProvider {
+ @Override
public Object[] getChildren(final Object parent) {
Object[] children = super.getChildren(parent);
if (children != null)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java
index 086aa41e5..86f26578a 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java
@@ -34,6 +34,7 @@ public class RepositoryDetailsLabelProvider extends LabelProvider implements ITa
public static final int COL_LOCATION = 1;
public static final int COL_ENABLEMENT = 2;
+ @Override
public Image getImage(Object obj) {
if (obj instanceof ProvElement) {
return ((ProvElement) obj).getImage(obj);
@@ -47,6 +48,7 @@ public class RepositoryDetailsLabelProvider extends LabelProvider implements ITa
return null;
}
+ @Override
public Image getColumnImage(Object element, int index) {
if (index == 0) {
return getImage(element);
@@ -54,6 +56,7 @@ public class RepositoryDetailsLabelProvider extends LabelProvider implements ITa
return null;
}
+ @Override
public String getColumnText(Object element, int columnIndex) {
switch (columnIndex) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java
index ea51d5bd8..64b208144 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java
@@ -47,6 +47,7 @@ public class StructuredViewerProvisioningListener extends ProvUIProvisioningList
*
* @param event the RepositoryEvent describing the details
*/
+ @Override
protected void repositoryAdded(RepositoryEvent event) {
safeRefresh();
}
@@ -58,6 +59,7 @@ public class StructuredViewerProvisioningListener extends ProvUIProvisioningList
*
* @param event the RepositoryEvent describing the details
*/
+ @Override
protected void repositoryRemoved(RepositoryEvent event) {
safeRefresh();
}
@@ -68,6 +70,7 @@ public class StructuredViewerProvisioningListener extends ProvUIProvisioningList
*
* @param event the RepositoryEvent describing the details
*/
+ @Override
protected void repositoryDiscovered(RepositoryEvent event) {
// Do nothing for now
}
@@ -78,6 +81,7 @@ public class StructuredViewerProvisioningListener extends ProvUIProvisioningList
*
* @param event the RepositoryEvent describing the details
*/
+ @Override
protected void repositoryChanged(RepositoryEvent event) {
// Do nothing for now. When this event is actually used in
// the core, we may want to refresh particular elements the way
@@ -91,8 +95,10 @@ public class StructuredViewerProvisioningListener extends ProvUIProvisioningList
*
* @param profileId the id of the profile that changed.
*/
+ @Override
protected void profileChanged(final String profileId) {
display.asyncExec(new Runnable() {
+ @Override
public void run() {
if (isClosing())
return;
@@ -111,6 +117,7 @@ public class StructuredViewerProvisioningListener extends ProvUIProvisioningList
*
* @param profileId the id of the profile that has been added.
*/
+ @Override
protected void profileAdded(final String profileId) {
safeRefresh();
}
@@ -122,6 +129,7 @@ public class StructuredViewerProvisioningListener extends ProvUIProvisioningList
*
* @param profileId the id of the profile that has been removed.
*/
+ @Override
protected void profileRemoved(final String profileId) {
safeRefresh();
}
@@ -133,6 +141,7 @@ public class StructuredViewerProvisioningListener extends ProvUIProvisioningList
}
display.asyncExec(new Runnable() {
+ @Override
public void run() {
if (isClosing())
return;
@@ -141,6 +150,7 @@ public class StructuredViewerProvisioningListener extends ProvUIProvisioningList
});
}
+ @Override
protected void refreshAll() {
safeRefresh();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java
index 88a77abd1..b470d12a0 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java
@@ -63,6 +63,7 @@ public class AcceptLicensesWizardPage extends WizardPage {
}
class LicenseContentProvider implements ITreeContentProvider {
+ @Override
public Object[] getChildren(Object parentElement) {
if (!(parentElement instanceof ILicense))
return new Object[0];
@@ -79,6 +80,7 @@ public class AcceptLicensesWizardPage extends WizardPage {
return null;
}
+ @Override
public Object getParent(Object element) {
if (element instanceof IUWithLicenseParent) {
return ((IUWithLicenseParent) element).license;
@@ -86,28 +88,34 @@ public class AcceptLicensesWizardPage extends WizardPage {
return null;
}
+ @Override
public boolean hasChildren(Object element) {
return licensesToIUs.containsKey(element);
}
+ @Override
public Object[] getElements(Object inputElement) {
return licensesToIUs.keySet().toArray();
}
+ @Override
public void dispose() {
// Nothing to do
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// Nothing to do
}
}
class LicenseLabelProvider extends LabelProvider {
+ @Override
public Image getImage(Object element) {
return null;
}
+ @Override
public String getText(Object element) {
if (element instanceof License) {
return getFirstLine(((License) element).getBody());
@@ -174,6 +182,7 @@ public class AcceptLicensesWizardPage extends WizardPage {
* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createControl(Composite parent) {
initializeDialogUnits(parent);
List<IInstallableUnit> ius;
@@ -214,6 +223,7 @@ public class AcceptLicensesWizardPage extends WizardPage {
iuViewer.setInput(licensesToIUs);
iuViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
handleSelectionChanged((IStructuredSelection) event.getSelection());
}
@@ -239,6 +249,7 @@ public class AcceptLicensesWizardPage extends WizardPage {
acceptButton.setText(ProvUIMessages.AcceptLicensesWizardPage_AcceptSingle);
acceptButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
setPageComplete(acceptButton.getSelection());
}
@@ -249,6 +260,7 @@ public class AcceptLicensesWizardPage extends WizardPage {
else
declineButton.setText(ProvUIMessages.AcceptLicensesWizardPage_RejectSingle);
declineButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
setPageComplete(!declineButton.getSelection());
}
@@ -492,6 +504,7 @@ public class AcceptLicensesWizardPage extends WizardPage {
* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean)
*/
+ @Override
public void setVisible(boolean visible) {
super.setVisible(visible);
if (visible && hasLicensesToAccept() && iuViewer != null) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java
index 8afeafa91..d2df73082 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java
@@ -71,6 +71,7 @@ public class InstalledSoftwarePage extends InstallationPage implements ICopyable
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createControl(Composite parent) {
initializeDialogUnits(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IProvHelpContextIds.INSTALLED_SOFTWARE);
@@ -126,6 +127,7 @@ public class InstalledSoftwarePage extends InstallationPage implements ICopyable
* (non-Javadoc)
* @see org.eclipse.ui.about.InstallationPage#createPageButtons(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createPageButtons(Composite parent) {
if (profileId == null)
return;
@@ -136,10 +138,12 @@ public class InstalledSoftwarePage extends InstallationPage implements ICopyable
// is shown properly.
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=236495
UpdateAction updateAction = new UpdateAction(getProvisioningUI(), new ISelectionProvider() {
+ @Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
installedIUGroup.getStructuredViewer().addSelectionChangedListener(listener);
}
+ @Override
public ISelection getSelection() {
StructuredViewer viewer = installedIUGroup.getStructuredViewer();
ISelection selection = viewer.getSelection();
@@ -150,14 +154,17 @@ public class InstalledSoftwarePage extends InstallationPage implements ICopyable
return selection;
}
+ @Override
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
installedIUGroup.getStructuredViewer().removeSelectionChangedListener(listener);
}
+ @Override
public void setSelection(ISelection selection) {
installedIUGroup.getStructuredViewer().setSelection(selection);
}
}, profileId, true) {
+ @Override
public void run() {
super.run();
if (getReturnCode() == Window.OK)
@@ -169,6 +176,7 @@ public class InstalledSoftwarePage extends InstallationPage implements ICopyable
updateButton.setData(BUTTON_ACTION, updateAction);
// Uninstall action
Action uninstallAction = new UninstallAction(getProvisioningUI(), installedIUGroup.getStructuredViewer(), profileId) {
+ @Override
public void run() {
super.run();
if (getReturnCode() == Window.OK)
@@ -187,6 +195,7 @@ public class InstalledSoftwarePage extends InstallationPage implements ICopyable
// we rely on the enablement state of the action. So we don't hook
// the selection listener on our table until after actions are created.
installedIUGroup.getStructuredViewer().addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
updateDetailsArea();
updateEnablement();
@@ -196,6 +205,7 @@ public class InstalledSoftwarePage extends InstallationPage implements ICopyable
final IUPatternFilter searchFilter = new IUPatternFilter(getColumnConfig());
filterText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
if (filterText != null && !filterText.isDisposed()) {
searchFilter.setPattern(filterText.getText());
@@ -250,6 +260,7 @@ public class InstalledSoftwarePage extends InstallationPage implements ICopyable
* (non-Javadoc)
* @see org.eclipse.equinox.p2.ui.ICopyable#copyToClipboard(org.eclipse.swt.widgets.Control)
*/
+ @Override
public void copyToClipboard(Control activeControl) {
Object[] elements = installedIUGroup.getSelectedIUElements();
if (elements.length == 0)
@@ -260,6 +271,7 @@ public class InstalledSoftwarePage extends InstallationPage implements ICopyable
clipboard.dispose();
}
+ @Override
protected void buttonPressed(int buttonId) {
switch (buttonId) {
case UPDATE_ID :
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
index 19fef37dd..cb98e6fa5 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
@@ -89,6 +89,7 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
* (non-Javadoc)
* @see org.eclipse.equinox.p2.operations.ProvisioningJob#runModal(org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public IStatus runModal(IProgressMonitor monitor) {
if (locations == null || locations.length == 0)
return Status.OK_STATUS;
@@ -182,6 +183,7 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
*/
+ @Override
public boolean belongsTo(Object family) {
return family == LOAD_FAMILY;
}
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 b52071e11..92e8f42b9 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
@@ -325,6 +325,7 @@ public class ProvisioningUI {
TitleAreaDialog dialog = new TitleAreaDialog(shell) {
RepositoryManipulationPage page;
+ @Override
protected Control createDialogArea(Composite parent) {
page = new RepositoryManipulationPage();
page.setProvisioningUI(ProvisioningUI.this);
@@ -338,15 +339,18 @@ public class ProvisioningUI {
return page.getControl();
}
+ @Override
protected boolean isResizable() {
return true;
}
+ @Override
protected void okPressed() {
if (page.performOk())
super.okPressed();
}
+ @Override
protected void cancelPressed() {
if (page.performCancel())
super.cancelPressed();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java
index c0f2ca1f6..f77fa6a07 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java
@@ -122,10 +122,12 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
setIncludeDisabledRepositories(getPolicy().getRepositoriesVisible());
}
+ @Override
public int getQueryType() {
return QueryProvider.METADATA_REPOS;
}
+ @Override
public Object[] fetchChildren(Object o, IProgressMonitor monitor) {
if (cachedElements == null) {
Object[] children = super.fetchChildren(o, monitor);
@@ -171,6 +173,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
setIncludeLeadingWildcard(true);
}
+ @Override
public boolean isElementVisible(Viewer viewer, Object element) {
if (element instanceof MetadataRepositoryElement) {
return wordMatches(labelProvider.getColumnText(element, RepositoryDetailsLabelProvider.COL_NAME) + " " + labelProvider.getColumnText(element, RepositoryDetailsLabelProvider.COL_LOCATION)); //$NON-NLS-1$
@@ -200,6 +203,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
tracker = ui.getRepositoryTracker();
}
+ @Override
protected Control createContents(Composite parent) {
display = parent.getDisplay();
// The help refers to the full-blown dialog. No help if it's read only.
@@ -211,6 +215,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
// Filter box
pattern = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.SEARCH | SWT.CANCEL);
pattern.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+ @Override
public void getName(AccessibleEvent e) {
e.result = DEFAULT_FILTER_TEXT;
}
@@ -218,12 +223,14 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
pattern.setText(DEFAULT_FILTER_TEXT);
pattern.selectAll();
pattern.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
applyFilter();
}
});
pattern.addKeyListener(new KeyAdapter() {
+ @Override
public void keyPressed(KeyEvent e) {
if (e.keyCode == SWT.ARROW_DOWN) {
if (table.getItemCount() > 0) {
@@ -236,8 +243,10 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
});
pattern.addFocusListener(new FocusAdapter() {
+ @Override
public void focusGained(FocusEvent e) {
display.asyncExec(new Runnable() {
+ @Override
public void run() {
if (!pattern.isDisposed()) {
if (DEFAULT_FILTER_TEXT.equals(pattern.getText().trim())) {
@@ -259,6 +268,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
// Key listener for delete
table.addKeyListener(new KeyAdapter() {
+ @Override
public void keyPressed(KeyEvent e) {
if (e.keyCode == SWT.DEL) {
removeRepositories();
@@ -281,14 +291,17 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
// Edit the nickname
repositoryViewer.setCellModifier(new ICellModifier() {
+ @Override
public boolean canModify(Object element, String property) {
return element instanceof MetadataRepositoryElement;
}
+ @Override
public Object getValue(Object element, String property) {
return ((MetadataRepositoryElement) element).getName();
}
+ @Override
public void modify(Object element, String property, Object value) {
if (value != null && value.toString().length() >= 0) {
MetadataRepositoryElement repo;
@@ -315,6 +328,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
repositoryViewer.setCellEditors(new CellEditor[] {new TextCellEditor(repositoryViewer.getTable())});
repositoryViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
if (policy.getRepositoriesVisible())
validateButtons();
@@ -323,16 +337,19 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
});
repositoryViewer.setCheckStateProvider(new ICheckStateProvider() {
+ @Override
public boolean isChecked(Object element) {
return ((MetadataRepositoryElement) element).isEnabled();
}
+ @Override
public boolean isGrayed(Object element) {
return false;
}
});
repositoryViewer.addCheckStateListener(new ICheckStateListener() {
+ @Override
public void checkStateChanged(CheckStateChangedEvent event) {
MetadataRepositoryElement element = (MetadataRepositoryElement) event.getElement();
element.setEnabled(event.getChecked());
@@ -360,6 +377,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
ProvUI.getProvisioningEventBus(ui.getSession()).addListener(listener);
composite.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent event) {
ProvUI.getProvisioningEventBus(ui.getSession()).removeListener(listener);
}
@@ -432,10 +450,12 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
tc.setWidth(convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH));
}
tc.addSelectionListener(new SelectionListener() {
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
columnSelected((TableColumn) e.widget);
}
+ @Override
public void widgetSelected(SelectionEvent e) {
columnSelected((TableColumn) e.widget);
}
@@ -471,6 +491,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
private void createVerticalButtons(Composite parent) {
addButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Add, false);
addButton.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
addRepository();
}
@@ -478,6 +499,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
editButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Edit, false);
editButton.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
changeRepositoryProperties();
}
@@ -485,6 +507,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
removeButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Remove, false);
removeButton.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
removeRepositories();
}
@@ -492,6 +515,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
refreshButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_RefreshConnection, false);
refreshButton.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
refreshRepository();
}
@@ -499,6 +523,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
disableButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_DisableButton, false);
disableButton.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
toggleRepositoryEnablement();
}
@@ -506,6 +531,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
Button button = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Import, false);
button.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
importRepositories();
}
@@ -513,6 +539,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
exportButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Export, false);
exportButton.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
exportRepositories();
}
@@ -529,6 +556,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
* (non-Javadoc)
* @see org.eclipse.jface.preference.PreferencePage#performOk()
*/
+ @Override
public boolean performOk() {
if (changed)
ElementUtils.updateRepositoryUsingElements(ui, getElements());
@@ -539,10 +567,12 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
private StructuredViewerProvisioningListener getViewerProvisioningListener() {
return new StructuredViewerProvisioningListener(RepositoryManipulationPage.this.getClass().getName(), repositoryViewer, ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY, ui.getOperationRunner()) {
+ @Override
protected void repositoryDiscovered(RepositoryEvent e) {
RepositoryManipulationPage.this.safeRefresh(null);
}
+ @Override
protected void repositoryChanged(RepositoryEvent e) {
RepositoryManipulationPage.this.safeRefresh(null);
}
@@ -583,6 +613,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
void addRepository() {
AddRepositoryDialog dialog = new AddRepositoryDialog(getShell(), ui) {
+ @Override
protected RepositoryTracker getRepositoryTracker() {
return RepositoryManipulationPage.this.getLocalCacheRepoTracker();
}
@@ -602,6 +633,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
try {
dialog.run(true, true, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) {
monitor.beginTask(NLS.bind(ProvUIMessages.RepositoryManipulationPage_ContactingSiteMessage, location), 100);
try {
@@ -708,6 +740,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
void importRepositories() {
BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
+ @Override
public void run() {
MetadataRepositoryElement[] imported = UpdateManagerCompatibility.importSites(getShell());
if (imported.length > 0) {
@@ -722,6 +755,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
void exportRepositories() {
BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
+ @Override
public void run() {
MetadataRepositoryElement[] elements = getSelectedElements();
if (elements.length == 0)
@@ -748,10 +782,12 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
originalName = selected[0].getName();
final URI existingLocation = originalLocation;
RepositoryNameAndLocationDialog dialog = new RepositoryNameAndLocationDialog(getShell(), ui) {
+ @Override
protected String getInitialLocationText() {
return URIUtil.toUnencodedString(selected[0].getLocation());
}
+ @Override
protected String getInitialNameText() {
return selected[0].getName();
}
@@ -811,6 +847,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
void safeRefresh(final MetadataRepositoryElement elementToSelect) {
Runnable runnable = new Runnable() {
+ @Override
public void run() {
repositoryViewer.refresh();
if (elementToSelect != null)
@@ -834,6 +871,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
if (filterJob != null)
filterJob.cancel();
filterJob = new WorkbenchJob("filter job") { //$NON-NLS-1$
+ @Override
public IStatus runInUIThread(IProgressMonitor monitor) {
if (monitor.isCanceled())
return Status.CANCEL_STATUS;
@@ -859,6 +897,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
+ @Override
public void init(IWorkbench workbench) {
noDefaultAndApplyButton();
if (ui == null) {
@@ -888,6 +927,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
RepositoryTracker getLocalCacheRepoTracker() {
if (localCacheRepoManipulator == null)
localCacheRepoManipulator = new RepositoryTracker() {
+ @Override
public void addRepository(URI location, String nickname, ProvisioningSession session) {
MetadataRepositoryElement element = getInput().get(location);
if (element == null) {
@@ -900,18 +940,22 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
safeRefresh(element);
}
+ @Override
public URI[] getKnownRepositories(ProvisioningSession session) {
return RepositoryManipulationPage.this.getKnownRepositories();
}
+ @Override
public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
RepositoryManipulationPage.this.removeRepositories();
}
+ @Override
public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
// Nothing to refresh in the local cache
}
+ @Override
public IStatus validateRepositoryLocation(ProvisioningSession session, URI location, boolean contactRepositories, IProgressMonitor monitor) {
IStatus status = super.validateRepositoryLocation(session, location, contactRepositories, monitor);
if (status.isOK()) {
@@ -937,6 +981,7 @@ public class RepositoryManipulationPage extends PreferencePage implements IWorkb
* (non-Javadoc)
* @see org.eclipse.equinox.p2.ui.ICopyable#copyToClipboard(org.eclipse.swt.widgets.Control)
*/
+ @Override
public void copyToClipboard(Control activeControl) {
MetadataRepositoryElement[] elements = getSelectedElements();
if (elements.length == 0)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java
index d85252c02..9e65824bc 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java
@@ -76,14 +76,17 @@ public class RevertProfilePage extends InstallationPage implements ICopyable {
this.ui = ui;
}
+ @Override
protected CellEditor getCellEditor(Object element) {
return new TextCellEditor(((TableViewer) getViewer()).getTable());
}
+ @Override
protected boolean canEdit(Object element) {
return element instanceof RollbackProfileElement;
}
+ @Override
protected Object getValue(Object element) {
if (element instanceof RollbackProfileElement) {
return ((RollbackProfileElement) element).getProfileTag() != null ? ((RollbackProfileElement) element).getProfileTag() : ""; //$NON-NLS-1$
@@ -91,6 +94,7 @@ public class RevertProfilePage extends InstallationPage implements ICopyable {
return null;
}
+ @Override
protected void setValue(Object element, Object value) {
if (element instanceof RollbackProfileElement && value instanceof String) {
RollbackProfileElement ele = ((RollbackProfileElement) element);
@@ -117,6 +121,7 @@ public class RevertProfilePage extends InstallationPage implements ICopyable {
* (non-Javadoc)
* @see org.eclipse.ui.about.InstallationPage#createPageButtons(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createPageButtons(Composite parent) {
if (profileId == null)
return;
@@ -132,6 +137,7 @@ public class RevertProfilePage extends InstallationPage implements ICopyable {
* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createControl(Composite parent) {
profileId = getProvisioningUI().getProfileId();
if (profileId == null) {
@@ -175,6 +181,7 @@ public class RevertProfilePage extends InstallationPage implements ICopyable {
label.setText(ProvUIMessages.RevertDialog_ConfigsLabel);
configsViewer = new TableViewer(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION);
ProvElementContentProvider provider = new ProvElementContentProvider() {
+ @Override
protected void finishedFetchingElements(Object o) {
Object element = configsViewer.getElementAt(0);
if (element != null)
@@ -191,6 +198,7 @@ public class RevertProfilePage extends InstallationPage implements ICopyable {
// We override the ViewerComparator so that we don't get the labels of the elements
// for comparison, but rather get the timestamps and compare them.
// Reverse sorting is used so that newest is first.
+ @Override
public int compare(Viewer viewer, Object o1, Object o2) {
if (o1 instanceof RollbackProfileElement && o2 instanceof RollbackProfileElement) {
long timestamp1 = ((RollbackProfileElement) o1).getTimestamp();
@@ -206,6 +214,7 @@ public class RevertProfilePage extends InstallationPage implements ICopyable {
configsViewer.setInput(getInput());
configsViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
handleSelectionChanged((IStructuredSelection) event.getSelection());
}
@@ -263,6 +272,7 @@ public class RevertProfilePage extends InstallationPage implements ICopyable {
private void createRevertAction() {
revertAction = new Action() {
+ @Override
public void run() {
boolean result = MessageDialog.openQuestion(getShell(), ProvUIMessages.RevertDialog_Title, ProvUIMessages.RevertDialog_ConfirmRestartMessage);
if (!result)
@@ -282,6 +292,7 @@ public class RevertProfilePage extends InstallationPage implements ICopyable {
return element;
}
+ @Override
protected void buttonPressed(int buttonId) {
switch (buttonId) {
case REVERT_ID :
@@ -371,6 +382,7 @@ public class RevertProfilePage extends InstallationPage implements ICopyable {
return false;
final IProvisioningPlan[] plan = new IProvisioningPlan[1];
IRunnableWithProgress runnable = new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) {
IProfile currentProfile;
IProfileRegistry registry = ProvUI.getProfileRegistry(getSession());
@@ -415,6 +427,7 @@ public class RevertProfilePage extends InstallationPage implements ICopyable {
* (non-Javadoc)
* @see org.eclipse.equinox.p2.ui.ICopyable#copyToClipboard(org.eclipse.swt.widgets.Control)
*/
+ @Override
public void copyToClipboard(Control activeControl) {
String text = ""; //$NON-NLS-1$
if (activeControl == configContentsViewer.getControl()) {

Back to the top