Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-10-05 08:55:21 +0000
committerAlexander Kurtakov2017-10-05 08:55:21 +0000
commit54f9c77dda57a5588fb8c1595a60db34eab5738c (patch)
tree3fd524c6f9f0a01551dc8479b266a28ce3ff03c7 /bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2
parentbd3528e84c08e849f893e78ea1051b55c7c9e943 (diff)
downloadrt.equinox.p2-54f9c77dda57a5588fb8c1595a60db34eab5738c.tar.gz
rt.equinox.p2-54f9c77dda57a5588fb8c1595a60db34eab5738c.tar.xz
rt.equinox.p2-54f9c77dda57a5588fb8c1595a60db34eab5738c.zip
Bug 525599 - Move p2 ui.admin bundles to Java 8I20171005-2000
* Bump BREEs * Bump minor versions * Enable warnings for newer Java versions features * Remove redundant type arguments * Add missing override annotations * Convert to lambdas Change-Id: I22c34216df3004d11b7fbe64104a8674db8f4712 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2')
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java14
27 files changed, 163 insertions, 178 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java
index 120f0d366..13591428b 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ public class AddProfileJob extends ProvisioningJob {
this.profileProperties = profileProperties;
}
+ @Override
public IStatus runModal(IProgressMonitor monitor) {
IStatus status = Status.OK_STATUS;
try {
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
index dcd0d1cea..69aedc749 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -33,37 +33,37 @@ public class ArtifactRepositoriesView extends RepositoriesView {
// constructor
}
+ @Override
protected Object getInput() {
return new ArtifactRepositories(getProvisioningUI(), new QueryableArtifactRepositoryManager(getProvisioningUI(), false));
}
+ @Override
protected String getAddCommandLabel() {
return ProvAdminUIMessages.ArtifactRepositoriesView_AddRepositoryLabel;
}
+ @Override
protected String getAddCommandTooltip() {
return ProvAdminUIMessages.ArtifactRepositoriesView_AddRepositoryTooltip;
}
+ @Override
protected String getRemoveCommandTooltip() {
return ProvAdminUIMessages.ArtifactRepositoriesView_RemoveRepositoryTooltip;
}
+ @Override
protected int openAddRepositoryDialog(Shell shell) {
return new AddArtifactRepositoryDialog(shell, getProvisioningUI()).open();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getListenerEventTypes()
- */
+ @Override
protected int getListenerEventTypes() {
return ProvUIProvisioningListener.PROV_EVENT_ARTIFACT_REPOSITORY;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getRepositoryTracker()
- */
+ @Override
protected RepositoryTracker getRepositoryTracker() {
if (tracker == null)
tracker = new ArtifactRepositoryTracker(getProvisioningUI());
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
index 105880bc7..ec4f4265f 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
@@ -31,10 +31,12 @@ public class ArtifactRepositoryTracker extends RepositoryTracker {
this.ui = ui;
}
+ @Override
public URI[] getKnownRepositories(ProvisioningSession session) {
return getArtifactRepositoryManager().getKnownRepositories(getArtifactRepositoryFlags());
}
+ @Override
public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
ui.signalRepositoryOperationStart();
try {
@@ -46,9 +48,7 @@ public class ArtifactRepositoryTracker 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 {
@@ -64,6 +64,7 @@ public class ArtifactRepositoryTracker 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);
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java
index f19ec30bb..b4271313e 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -39,10 +39,7 @@ public class InstallAction extends ProfileModificationAction {
userChosenProfileId = ui.getProfileId();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#isEnabledFor(java.lang.Object[])
- */
+ @Override
protected boolean isEnabledFor(Object[] selectionArray) {
if (selectionArray.length == 0)
return false;
@@ -61,13 +58,13 @@ public class InstallAction extends ProfileModificationAction {
/*
* Overridden to reject categories and nested IU's (parent is a non-category IU)
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#isSelectable(org.eclipse.equinox.internal.p2.ui.model.IUElement)
*/
+ @Override
protected boolean isSelectable(IIUElement element) {
return super.isSelectable(element) && !(element.getParent(element) instanceof AvailableIUElement);
}
+ @Override
protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
ProvisioningUI ui = ProvAdminUIActivator.getDefault().getProvisioningUI(userChosenProfileId);
operation.setProfileId(userChosenProfileId);
@@ -76,12 +73,14 @@ public class InstallAction extends ProfileModificationAction {
return ret;
}
+ @Override
protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
InstallOperation op = new InstallOperation(getSession(), ius);
op.setProfileId(userChosenProfileId);
return op;
}
+ @Override
protected boolean isInvalidProfileId() {
if (userChosenProfileId == null) {
userChosenProfileId = getUserChosenProfileId();
@@ -114,6 +113,7 @@ public class InstallAction extends ProfileModificationAction {
return null;
}
+ @Override
protected void runCanceled() {
super.runCanceled();
userChosenProfileId = null;
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java
index 6b00deea6..70fda2cb6 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -84,6 +84,7 @@ public class InstallIUDropAdapter extends ViewerDropAdapter {
*
* @see org.eclipse.swt.dnd.DropTargetListener#drop(org.eclipse.swt.dnd.DropTargetEvent)
*/
+ @Override
public boolean performDrop(final Object data) {
if (DEBUG) {
System.out.println("Perform drop on target: " + getCurrentTarget() + " with data: " + data); //$NON-NLS-1$//$NON-NLS-2$
@@ -100,16 +101,12 @@ public class InstallIUDropAdapter extends ViewerDropAdapter {
final IStructuredSelection structuredSelection = (IStructuredSelection) selection;
ISelectionProvider selectionProvider = new ISelectionProvider() {
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
+ @Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
// Ignore because the selection won't change
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
- */
+ @Override
public ISelection getSelection() {
if (DEBUG) {
System.out.println("Selection was queried by action"); //$NON-NLS-1$
@@ -118,16 +115,12 @@ public class InstallIUDropAdapter extends ViewerDropAdapter {
return structuredSelection;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
+ @Override
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
// ignore because the selection is static
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
- */
+ @Override
public void setSelection(ISelection sel) {
throw new UnsupportedOperationException("This ISelectionProvider is static, and cannot be modified."); //$NON-NLS-1$
}
@@ -144,6 +137,7 @@ public class InstallIUDropAdapter extends ViewerDropAdapter {
/**
* Validate whether the drop is valid for the target
*/
+ @Override
public boolean validateDrop(Object target, int dragOperation, TransferData transferType) {
if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType)) {
@@ -158,11 +152,8 @@ public class InstallIUDropAdapter extends ViewerDropAdapter {
/*
* Overridden to force a copy when the drag is valid.
- *
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ViewerDropAdapter#dragEnter(org.eclipse.swt.dnd.DropTargetEvent)
*/
+ @Override
public void dragEnter(DropTargetEvent event) {
event.detail = DND.DROP_COPY;
super.dragEnter(event);
@@ -193,7 +184,7 @@ public class InstallIUDropAdapter extends ViewerDropAdapter {
*/
private IInstallableUnit[] getSelectedIUs() {
ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
- List<IInstallableUnit> ius = new ArrayList<IInstallableUnit>();
+ List<IInstallableUnit> ius = new ArrayList<>();
if (!(selection instanceof IStructuredSelection) || selection.isEmpty()) {
return null;
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
index f0388fd20..982c82520 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -47,6 +47,7 @@ public class MetadataRepositoriesView extends RepositoriesView {
// constructor
}
+ @Override
protected Object getInput() {
if (input == null) {
// view by repo
@@ -62,27 +63,33 @@ public class MetadataRepositoriesView extends RepositoriesView {
return input;
}
+ @Override
protected String getAddCommandLabel() {
return ProvAdminUIMessages.MetadataRepositoriesView_AddRepositoryLabel;
}
+ @Override
protected String getAddCommandTooltip() {
return ProvAdminUIMessages.MetadataRepositoriesView_AddRepositoryTooltip;
}
+ @Override
protected String getRemoveCommandTooltip() {
return ProvAdminUIMessages.MetadataRepositoriesView_RemoveRepositoryTooltip;
}
+ @Override
protected int openAddRepositoryDialog(Shell shell) {
return new AddMetadataRepositoryDialog(shell, getProvisioningUI()).open();
}
+ @Override
protected void makeActions() {
super.makeActions();
installAction = new InstallAction(getProvisioningUI(), viewer);
}
+ @Override
protected void fillContextMenu(IMenuManager manager) {
if (installAction.isEnabled()) {
manager.add(new Separator());
@@ -91,6 +98,7 @@ public class MetadataRepositoriesView extends RepositoriesView {
super.fillContextMenu(manager);
}
+ @Override
protected void configureViewer(final TreeViewer treeViewer) {
super.configureViewer(treeViewer);
// Add drag support for IU's
@@ -104,14 +112,12 @@ public class MetadataRepositoriesView extends RepositoriesView {
return IRepositoryManager.REPOSITORIES_ALL;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getListenerEventTypes()
- */
+ @Override
protected int getListenerEventTypes() {
return ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY;
}
+ @Override
protected List<String> getVisualProperties() {
List<String> list = super.getVisualProperties();
list.add(PreferenceConstants.PREF_USE_CATEGORIES);
@@ -119,14 +125,13 @@ public class MetadataRepositoriesView extends RepositoriesView {
return list;
}
+ @Override
protected void updateCachesForPreferences() {
// We want to reconstruct the input's query context based on the latest preferences
input = null;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getRepositoryTracker()
- */
+ @Override
protected RepositoryTracker getRepositoryTracker() {
if (tracker == null)
tracker = new MetadataRepositoryTracker(getProvisioningUI());
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java
index efe7fc9ac..c932ab4b0 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -31,10 +31,12 @@ public class MetadataRepositoryTracker extends RepositoryTracker {
this.ui = ui;
}
+ @Override
public URI[] getKnownRepositories(ProvisioningSession session) {
return getMetadataRepositoryManager().getKnownRepositories(getArtifactRepositoryFlags());
}
+ @Override
public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
ui.signalRepositoryOperationStart();
try {
@@ -47,9 +49,7 @@ public class MetadataRepositoryTracker 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 {
@@ -61,10 +61,7 @@ public class MetadataRepositoryTracker 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);
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java
index 76356cb3b..8bec03875 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -34,7 +34,7 @@ public class ProfileFactory {
static private EnvironmentInfo info;
public static IProfile makeProfile(String profileId) {
- Map<String, String> profileProperties = new HashMap<String, String>();
+ Map<String, String> profileProperties = new HashMap<>();
profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getDefaultLocation());
profileProperties.put(IProfile.PROP_ENVIRONMENTS, getDefaultEnvironments());
profileProperties.put(IProfile.PROP_NL, getDefaultNL());
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
index 73ca264c7..ff801c720 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -52,9 +52,10 @@ public class ProfilesView extends ProvView {
}
+ @Override
public void run() {
Object[] selections = getSelection().toArray();
- List<String> profilesOnly = new ArrayList<String>();
+ List<String> profilesOnly = new ArrayList<>();
for (int i = 0; i < selections.length; i++) {
if (selections[i] instanceof ProfileElement)
profilesOnly.add(((ProfileElement) selections[i]).getProfileId());
@@ -71,6 +72,7 @@ public class ProfilesView extends ProvView {
setImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.IMG_PROFILE));
}
+ @Override
public void run() {
new AddProfileDialog(viewer.getControl().getShell(), getKnownProfileIds()).open();
}
@@ -80,17 +82,20 @@ public class ProfilesView extends ProvView {
// constructor
}
+ @Override
protected void addListeners() {
super.addListeners();
listener = new StructuredViewerProvisioningListener(getClass().getName(), viewer, ProvUIProvisioningListener.PROV_EVENT_IU | ProvUIProvisioningListener.PROV_EVENT_PROFILE, getProvisioningUI().getOperationRunner());
ProvUI.getProvisioningEventBus(getProvisioningUI().getSession()).addListener(listener);
}
+ @Override
protected void removeListeners() {
super.removeListeners();
ProvUI.getProvisioningEventBus(getProvisioningUI().getSession()).removeListener(listener);
}
+ @Override
protected void configureViewer(TreeViewer treeViewer) {
super.configureViewer(treeViewer);
InstallIUDropAdapter adapter = new InstallIUDropAdapter(treeViewer);
@@ -99,6 +104,7 @@ public class ProfilesView extends ProvView {
treeViewer.addDropSupport(DND.DROP_COPY, transfers, adapter);
}
+ @Override
protected void fillLocalPullDown(IMenuManager manager) {
manager.add(addProfileAction);
manager.add(removeProfileAction);
@@ -108,6 +114,7 @@ public class ProfilesView extends ProvView {
manager.add(uninstallAction);
}
+ @Override
protected void fillContextMenu(IMenuManager manager) {
manager.add(addProfileAction);
if (removeProfileAction.isEnabled()) {
@@ -123,12 +130,14 @@ public class ProfilesView extends ProvView {
}
}
+ @Override
protected void fillLocalToolBar(IToolBarManager manager) {
manager.add(new Separator());
manager.add(addProfileAction);
manager.add(removeProfileAction);
}
+ @Override
protected void makeActions() {
super.makeActions();
addProfileAction = new AddProfileAction();
@@ -139,17 +148,16 @@ public class ProfilesView extends ProvView {
updateAction.setSkipSelectionPage(true);
getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection ss = (IStructuredSelection) event.getSelection();
- ProfilesView.this.selectionChanged(ss);
- }
+ viewer.addSelectionChangedListener(event -> {
+ IStructuredSelection ss = event.getStructuredSelection();
+ ProfilesView.this.selectionChanged(ss);
});
// prime the action validation
selectionChanged((IStructuredSelection) viewer.getSelection());
}
+ @Override
protected void selectionChanged(IStructuredSelection ss) {
super.selectionChanged(ss);
propertiesAction.setEnabled(false);
@@ -170,18 +178,22 @@ public class ProfilesView extends ProvView {
}
}
+ @Override
protected IAction getDoubleClickAction() {
return propertiesAction;
}
+ @Override
protected IContentProvider getContentProvider() {
return new ProvElementContentProvider();
}
+ @Override
protected Object getInput() {
return new Profiles(getProvisioningUI());
}
+ @Override
protected String getProfileId() {
Object firstElement = getSelection().getFirstElement();
if (firstElement instanceof InstalledIUElement) {
@@ -193,6 +205,7 @@ public class ProfilesView extends ProvView {
return null;
}
+ @Override
protected List<String> getVisualProperties() {
List<String> list = super.getVisualProperties();
list.add(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY);
@@ -207,6 +220,7 @@ public class ProfilesView extends ProvView {
return ids;
}
+ @Override
protected ProvisioningUI getProvisioningUI() {
ProvisioningUI ui = ProvAdminUIActivator.getDefault().getProvisioningUI(getProfileId());
if (ui != null)
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
index 447822780..8d48d63bf 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -23,7 +23,6 @@ import org.eclipse.equinox.p2.ui.Policy;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -71,11 +70,7 @@ public class ProvAdminUIActivator extends AbstractUIPlugin {
// constructor
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
+ @Override
public void start(BundleContext bundleContext) throws Exception {
super.start(bundleContext);
plugin = this;
@@ -84,6 +79,7 @@ public class ProvAdminUIActivator extends AbstractUIPlugin {
getPreferenceStore().addPropertyChangeListener(getPreferenceListener());
}
+ @Override
public void stop(BundleContext bundleContext) throws Exception {
plugin = null;
getPreferenceStore().removePropertyChangeListener(preferenceListener);
@@ -93,11 +89,7 @@ public class ProvAdminUIActivator extends AbstractUIPlugin {
private IPropertyChangeListener getPreferenceListener() {
if (preferenceListener == null) {
- preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- updateForPreferences();
- }
- };
+ preferenceListener = event -> updateForPreferences();
}
return preferenceListener;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
index 40bc5d7f1..3006594d2 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -22,7 +22,6 @@ import org.eclipse.equinox.p2.ui.ProvisioningUI;
import org.eclipse.jface.action.*;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.*;
@@ -54,6 +53,7 @@ abstract class ProvView extends ViewPart {
/**
* Create and initialize the viewer
*/
+ @Override
public void createPartControl(Composite parent) {
// Store the display so we can make async calls from listeners
display = parent.getDisplay();
@@ -81,13 +81,11 @@ abstract class ProvView extends ViewPart {
private void hookContextMenu() {
MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- ProvView.this.fillContextMenu(manager);
- manager.add(new Separator());
- manager.add(refreshAction);
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
+ menuMgr.addMenuListener(manager -> {
+ ProvView.this.fillContextMenu(manager);
+ manager.add(new Separator());
+ manager.add(refreshAction);
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
});
Menu menu = menuMgr.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
@@ -95,12 +93,10 @@ abstract class ProvView extends ViewPart {
}
private void hookDoubleClickAction() {
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- IAction action = getDoubleClickAction();
- if (action != null && action.isEnabled()) {
- action.run();
- }
+ viewer.addDoubleClickListener(event -> {
+ IAction action = getDoubleClickAction();
+ if (action != null && action.isEnabled()) {
+ action.run();
}
});
}
@@ -125,6 +121,7 @@ abstract class ProvView extends ViewPart {
protected void makeActions() {
refreshAction = new RefreshAction(ProvisioningUI.getDefaultUI(), viewer, viewer.getControl()) {
+ @Override
protected void refresh() {
refreshAll(true);
}
@@ -135,15 +132,12 @@ abstract class ProvView extends ViewPart {
/**
* Passing the focus request to the viewer's control.
*/
+ @Override
public void setFocus() {
viewer.getControl().setFocus();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.part.WorkbenchPart#dispose()
- */
+ @Override
public void dispose() {
removeListeners();
super.dispose();
@@ -151,14 +145,11 @@ abstract class ProvView extends ViewPart {
protected void addListeners() {
IPreferenceStore store = ProvAdminUIActivator.getDefault().getPreferenceStore();
- preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (getVisualProperties().contains(event.getProperty())) {
- updateCachesForPreferences();
- ProvView.this.refreshAll(false);
- }
+ preferenceListener = event -> {
+ if (getVisualProperties().contains(event.getProperty())) {
+ updateCachesForPreferences();
+ ProvView.this.refreshAll(false);
}
-
};
store.addPropertyChangeListener(preferenceListener);
}
@@ -228,7 +219,7 @@ abstract class ProvView extends ViewPart {
}
protected List<String> getVisualProperties() {
- ArrayList<String> list = new ArrayList<String>(1);
+ ArrayList<String> list = new ArrayList<>(1);
list.add(PreferenceConstants.PREF_SHOW_GROUPS_ONLY);
return list;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java
index 4a5e01d56..5b8c21cc3 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ public class ProvisioningPerspective implements IPerspectiveFactory {
super();
}
+ @Override
public void createInitialLayout(IPageLayout layout) {
this.factory = layout;
addViews();
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java
index 0e6bdd9cd..013971697 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,6 +27,7 @@ public class RemoveProfilesJob extends ProvisioningJob {
this.profileIds = profileIds;
}
+ @Override
public IStatus runModal(IProgressMonitor monitor) {
for (int i = 0; i < profileIds.length; i++) {
ProvAdminUIActivator.getDefault().getProfileRegistry().removeProfile(profileIds[i]);
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
index ea553e446..6a926e519 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,7 +15,6 @@ import java.lang.reflect.InvocationTargetException;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.ui.ProvUI;
import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
@@ -26,7 +25,6 @@ import org.eclipse.equinox.internal.p2.ui.viewers.StructuredViewerProvisioningLi
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.operations.RepositoryTracker;
import org.eclipse.jface.action.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.ISharedImages;
@@ -53,10 +51,11 @@ abstract class RepositoriesView extends ProvView {
}
+ @Override
public void run() {
RepositoryTracker tracker = RepositoriesView.this.getRepositoryTracker();
Object[] elements = getSelection().toArray();
- ArrayList<URI> uris = new ArrayList<URI>(elements.length);
+ ArrayList<URI> uris = new ArrayList<>(elements.length);
for (int i = 0; i < elements.length; i++) {
if (elements[i] instanceof IRepositoryElement<?>)
uris.add(((IRepositoryElement<?>) elements[i]).getLocation());
@@ -73,9 +72,10 @@ abstract class RepositoriesView extends ProvView {
}
+ @Override
public void run() {
Object[] elements = ((ITreeContentProvider) viewer.getContentProvider()).getElements(getInput());
- ArrayList<URI> urls = new ArrayList<URI>();
+ ArrayList<URI> urls = new ArrayList<>();
for (int i = 0; i < elements.length; i++)
if (elements[i] instanceof IRepositoryElement<?>)
urls.add(((IRepositoryElement<?>) elements[i]).getLocation());
@@ -95,9 +95,11 @@ abstract class RepositoriesView extends ProvView {
// nothing to do
}
+ @Override
protected void addListeners() {
super.addListeners();
listener = new StructuredViewerProvisioningListener(getClass().getName(), viewer, getListenerEventTypes(), ui.getOperationRunner()) {
+ @Override
protected void refreshViewer() {
RepositoriesView.this.refreshAll(false);
}
@@ -105,17 +107,20 @@ abstract class RepositoriesView extends ProvView {
ProvUI.getProvisioningEventBus(ui.getSession()).addListener(listener);
}
+ @Override
protected void removeListeners() {
super.removeListeners();
ProvUI.getProvisioningEventBus(ui.getSession()).removeListener(listener);
}
+ @Override
protected void fillLocalPullDown(IMenuManager manager) {
manager.add(addRepositoryAction);
manager.add(removeRepositoryAction);
manager.add(propertiesAction);
}
+ @Override
protected void fillContextMenu(IMenuManager manager) {
manager.add(addRepositoryAction);
if (removeRepositoryAction.isEnabled()) {
@@ -127,11 +132,13 @@ abstract class RepositoriesView extends ProvView {
}
}
+ @Override
protected void fillLocalToolBar(IToolBarManager manager) {
manager.add(addRepositoryAction);
manager.add(removeRepositoryAction);
}
+ @Override
protected void makeActions() {
super.makeActions();
addRepositoryAction = new AddRepositoryAction();
@@ -148,18 +155,18 @@ abstract class RepositoriesView extends ProvView {
propertiesAction.setEnabled(false);
removeRepositoryAction.setEnabled(false);
}
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection ss = (IStructuredSelection) event.getSelection();
- RepositoriesView.this.selectionChanged(ss);
- }
+ viewer.addSelectionChangedListener(event -> {
+ IStructuredSelection ss = (IStructuredSelection) event.getSelection();
+ RepositoriesView.this.selectionChanged(ss);
});
}
+ @Override
protected IAction getDoubleClickAction() {
return propertiesAction;
}
+ @Override
protected void selectionChanged(IStructuredSelection selection) {
propertiesAction.setEnabled(selection.size() == 1 && ((ProvUI.getAdapter(selection.getFirstElement(), IInstallableUnit.class) != null) || (isRepository(selection.getFirstElement()))));
boolean enabled = false;
@@ -174,6 +181,7 @@ abstract class RepositoriesView extends ProvView {
removeRepositoryAction.setEnabled(enabled);
}
+ @Override
protected IContentProvider getContentProvider() {
return new RepositoryContentProvider();
@@ -199,21 +207,19 @@ abstract class RepositoriesView extends ProvView {
protected abstract int getListenerEventTypes();
+ @Override
protected List<String> getVisualProperties() {
List<String> list = super.getVisualProperties();
list.add(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS);
return list;
}
+ @Override
protected void refreshUnderlyingModel() {
IWorkbenchSiteProgressService service = getSite().getAdapter(IWorkbenchSiteProgressService.class);
if (service != null) {
try {
- service.run(true, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- getRepositoryTracker().refreshRepositories(getRepositoryTracker().getKnownRepositories(getProvisioningUI().getSession()), getProvisioningUI().getSession(), monitor);
- }
- });
+ service.run(true, false, monitor -> getRepositoryTracker().refreshRepositories(getRepositoryTracker().getKnownRepositories(getProvisioningUI().getSession()), getProvisioningUI().getSession(), monitor));
} catch (InvocationTargetException e) {
ProvUI.handleException(e, null, StatusManager.SHOW);
} catch (InterruptedException e) {
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
index f92ea8530..f02bf6036 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ public class AddArtifactRepositoryDialog extends AddRepositoryDialog {
super(parentShell, ui);
}
+ @Override
protected RepositoryTracker getRepositoryTracker() {
if (tracker == null) {
tracker = new ArtifactRepositoryTracker(getProvisioningUI());
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
index be6d58021..c91862a34 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ public class AddMetadataRepositoryDialog extends AddRepositoryDialog {
super(parentShell, ui);
}
+ @Override
protected RepositoryTracker getRepositoryTracker() {
if (tracker == null) {
tracker = new MetadataRepositoryTracker(getProvisioningUI());
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
index 9b454cf8f..8eecaebac 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,10 +15,9 @@ import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.ui.admin.*;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.*;
import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.StatusDialog;
import org.eclipse.swt.widgets.*;
/**
@@ -41,21 +40,20 @@ public class AddProfileDialog extends StatusDialog {
setTitle(ProvAdminUIMessages.AddProfileDialog_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) {
- profileGroup = new ProfileGroup(parent, null, new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- verifyComplete();
- }
- });
+ profileGroup = new ProfileGroup(parent, null, event -> verifyComplete());
Dialog.applyDialogFont(profileGroup.getComposite());
return profileGroup.getComposite();
}
+ @Override
protected void okPressed() {
verifyComplete();
if (okButton.isEnabled()) {
@@ -111,6 +109,7 @@ public class AddProfileDialog extends StatusDialog {
return false;
}
+ @Override
protected void updateButtonsEnableState(IStatus status) {
setOkEnablement(!status.matches(IStatus.ERROR));
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
index 7e12cf262..b02bed0b1 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,15 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
import java.util.Collection;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator;
import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
@@ -51,6 +49,7 @@ public class IUImplementationGroup extends IUGroup {
super(parent, iu, listener);
}
+ @Override
protected Composite createGroupComposite(Composite parent, ModifyListener listener) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -179,6 +178,7 @@ public class IUImplementationGroup extends IUGroup {
providedCapabilities.setItems(items);
}
+ @Override
public void updateIU() {
// If it's not an InstallableUnit it is not editable
if (iuElement == null || iuElement instanceof IInstallableUnit) {
@@ -211,16 +211,12 @@ public class IUImplementationGroup extends IUGroup {
Menu copyMenu = new Menu(list);
MenuItem copyItem = new MenuItem(copyMenu, SWT.NONE);
copyItem.addSelectionListener(new SelectionListener() {
- /*
- * @see SelectionListener.widgetSelected (SelectionEvent)
- */
+ @Override
public void widgetSelected(SelectionEvent e) {
copySelectionsToClipboard(list);
}
- /*
- * @see SelectionListener.widgetDefaultSelected(SelectionEvent)
- */
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
copySelectionsToClipboard(list);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
index f9489663c..9765bd1f6 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -16,8 +16,6 @@ import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.*;
import org.eclipse.ui.dialogs.PropertyPage;
@@ -30,22 +28,20 @@ public class IUImplementationPropertyPage extends PropertyPage {
private IUImplementationGroup iuGroup;
+ @Override
protected Control createContents(Composite parent) {
IInstallableUnit iu = ProvUI.getAdapter(getElement(), IInstallableUnit.class);
if (iu == null) {
Label label = new Label(parent, SWT.DEFAULT);
label.setText(ProvAdminUIMessages.No_Property_Item_Selected);
}
- iuGroup = new IUImplementationGroup(parent, iu, new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- verifyComplete();
- }
- });
+ iuGroup = new IUImplementationGroup(parent, iu, event -> verifyComplete());
Dialog.applyDialogFont(iuGroup.getComposite());
verifyComplete();
return iuGroup.getComposite();
}
+ @Override
public boolean performOk() {
return true;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
index 5704e6443..c270c904a 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -35,6 +35,7 @@ public class IUProfilePropertiesGroup extends IUGroup {
super(parent, iuElement, listener);
}
+ @Override
protected Composite createGroupComposite(Composite parent, ModifyListener listener) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
index 82ba93344..982a5e339 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -34,6 +34,7 @@ public class IUPropertiesGroup extends IUGroup {
super(parent, iu, listener);
}
+ @Override
protected Composite createGroupComposite(Composite parent, ModifyListener listener) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
index 39521007d..f54972f53 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -14,8 +14,6 @@ import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.*;
import org.eclipse.ui.dialogs.PropertyPage;
@@ -28,6 +26,7 @@ public class InstalledIUPropertyPage extends PropertyPage {
private IUProfilePropertiesGroup iuGroup;
+ @Override
protected Control createContents(Composite parent) {
Object element = getElement();
if (!(element instanceof InstalledIUElement)) {
@@ -35,15 +34,14 @@ public class InstalledIUPropertyPage extends PropertyPage {
label.setText(ProvAdminUIMessages.InstalledIUPropertyPage_NoInfoAvailable);
return label;
}
- iuGroup = new IUProfilePropertiesGroup(parent, (InstalledIUElement) element, new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- // not editable
- }
+ iuGroup = new IUProfilePropertiesGroup(parent, (InstalledIUElement) element, event -> {
+ // not editable
});
Dialog.applyDialogFont(iuGroup.getComposite());
return iuGroup.getComposite();
}
+ @Override
public boolean performOk() {
return true;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
index 5292e7324..784c78f37 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -74,6 +74,7 @@ public class ProfileGroup {
Button locationButton = new Button(composite, SWT.PUSH);
locationButton.setText(ProvAdminUIMessages.ProfileGroup_Browse);
locationButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent event) {
DirectoryDialog dialog = new DirectoryDialog(parent.getShell(), SWT.APPLICATION_MODAL);
dialog.setMessage(ProvAdminUIMessages.ProfileGroup_SelectProfileMessage);
@@ -94,6 +95,7 @@ public class ProfileGroup {
locationButton = new Button(composite, SWT.PUSH);
locationButton.setText(ProvAdminUIMessages.ProfileGroup_Browse2);
locationButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent event) {
DirectoryDialog dialog = new DirectoryDialog(parent.getShell(), SWT.APPLICATION_MODAL);
dialog.setMessage(ProvAdminUIMessages.ProfileGroup_SelectBundlePoolCache);
@@ -176,7 +178,7 @@ public class ProfileGroup {
public Map<String, String> getProfileProperties() {
if (profile == null) {
- Map<String, String> profileProperties = new HashMap<String, String>();
+ Map<String, String> profileProperties = new HashMap<>();
String value = location.getText().trim();
if (value.length() > 0) {
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
index b3200c75d..32c24fc98 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,6 +27,7 @@ public class ProfilePropertyPage extends PropertyPage {
private ProfileGroup profileGroup;
+ @Override
protected Control createContents(Composite parent) {
IProfile profile = ProvUI.getAdapter(getElement(), IProfile.class);
if (profile == null) {
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
index d1c79091f..a52eeffe7 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -35,6 +35,7 @@ public class RepositoryImplementationPropertyPage extends PropertyPage {
private Text description;
private Table propertiesTable;
+ @Override
protected Control createContents(Composite parent) {
this.repositoryElement = getRepositoryElement();
if (repositoryElement == null) {
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java
index b16f0017f..5204a9b17 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,11 +21,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
*/
public class ProvUIPreferenceInitializer extends AbstractPreferenceInitializer {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
+ @Override
public void initializeDefaultPreferences() {
IPreferenceStore store = ProvAdminUIActivator.getDefault().getPreferenceStore();
store.setDefault(PreferenceConstants.PREF_SHOW_GROUPS_ONLY, true);
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java
index 3de6e31ed..8c58b2b4c 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,11 +30,7 @@ public class ProvisioningPrefPage extends FieldEditorPreferencePage implements I
setPreferenceStore(ProvAdminUIActivator.getDefault().getPreferenceStore());
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
+ @Override
public void createFieldEditors() {
addField(new BooleanFieldEditor(PreferenceConstants.PREF_SHOW_GROUPS_ONLY, ProvAdminUIMessages.ProvisioningPrefPage_ShowGroupsOnly, getFieldEditorParent()));
addField(new BooleanFieldEditor(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY, ProvAdminUIMessages.ProvisioningPrefPage_ShowInstallRootsOnly, getFieldEditorParent()));
@@ -43,11 +39,7 @@ public class ProvisioningPrefPage extends FieldEditorPreferencePage implements I
addField(new BooleanFieldEditor(PreferenceConstants.PREF_USE_CATEGORIES, ProvAdminUIMessages.ProvisioningPrefPage_UseCategories, getFieldEditorParent()));
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
+ @Override
public void init(IWorkbench workbench) {
// nothing to do
}

Back to the top