Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2020-07-27 10:01:59 +0000
committerLars Vogel2020-07-31 10:05:26 +0000
commitf8c56ca7efb4ad3a77ffbe8047c4234df0aa651e (patch)
tree1e7975ed32dc2c7a3bbc28664e2d0306be6fae33
parentf55bfc045dc1826fa6ca672779c5b27f1010b561 (diff)
downloadrt.equinox.p2-I20200803-1800.tar.gz
rt.equinox.p2-I20200803-1800.tar.xz
rt.equinox.p2-I20200803-1800.zip
Done via JDT cleanup actions Change-Id: I5e9085d4f3bfa6cf6dbe06d1d339ccd0ead89a32 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AgentFromInstall.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java2
-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/dialogs/AvailableIUGroup.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java2
11 files changed, 14 insertions, 22 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java
index c7f44a01e..353aab166 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java
@@ -113,12 +113,9 @@ public class ExecutablesDescriptor {
}
private static ExecutablesDescriptor createMacDescriptor(String os, String executable, File location) {
- File files[] = location.listFiles(new FilenameFilter() {
- @Override
- public boolean accept(File dir, String name) {
- int length = name.length();
- return length > 3 && name.substring(length - 4, length).equalsIgnoreCase(".app"); //$NON-NLS-1$
- }
+ File files[] = location.listFiles((FilenameFilter) (dir, name) -> {
+ int length = name.length();
+ return length > 3 && name.substring(length - 4, length).equalsIgnoreCase(".app"); //$NON-NLS-1$
});
ExecutablesDescriptor result = new ExecutablesDescriptor(os, executable, location, files);
result.iniFile = new File(location, executable + ".ini"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java
index de8373cda..34897df6e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java
@@ -201,7 +201,7 @@ public abstract class AbstractSharedInstallTest extends AbstractReconcilerTest {
public static void reallyReadOnly(File folder, boolean recurse) {
reallyReadOnly(folder);
if (folder.exists() && recurse) {
- File[] dirs = folder.listFiles((FileFilter) pathname -> pathname.isDirectory());
+ File[] dirs = folder.listFiles((FileFilter) File::isDirectory);
for (File dir : dirs) {
reallyReadOnly(dir, true);
}
@@ -228,7 +228,7 @@ public abstract class AbstractSharedInstallTest extends AbstractReconcilerTest {
public static void removeReallyReadOnly(File folder, boolean recurse) {
removeReallyReadOnly(folder);
if (folder.exists() && recurse) {
- File[] dirs = folder.listFiles((FileFilter) pathname -> pathname.isDirectory());
+ File[] dirs = folder.listFiles((FileFilter) File::isDirectory);
for (File dir : dirs) {
removeReallyReadOnly(dir, true);
}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AgentFromInstall.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AgentFromInstall.java
index ed3090ac8..85f0d8b1c 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AgentFromInstall.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AgentFromInstall.java
@@ -139,12 +139,7 @@ public class AgentFromInstall {
private static String findProfile(File profileDirectory) {
final String PROFILE_EXT = ".profile"; //$NON-NLS-1$
- File[] profileDirectories = profileDirectory.listFiles(new FileFilter() {
- @Override
- public boolean accept(File pathname) {
- return pathname.getName().endsWith(PROFILE_EXT) && pathname.isDirectory();
- }
- });
+ File[] profileDirectories = profileDirectory.listFiles((FileFilter) pathname -> pathname.getName().endsWith(PROFILE_EXT) && pathname.isDirectory());
if (profileDirectories.length == 1) {
String directoryName = profileDirectories[0].getName();
return SimpleProfileRegistry.unescape(directoryName.substring(0, directoryName.lastIndexOf(PROFILE_EXT)));
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java
index 676333bc9..075f603fa 100644
--- a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportWizard.java
@@ -126,7 +126,7 @@ public class ImportWizard extends InstallWizard implements IImportWizard {
computeRemediationOperation(operation, ui, monitor);
}
}
- Display.getDefault().asyncExec(() -> planChanged());
+ Display.getDefault().asyncExec(this::planChanged);
});
} catch (InterruptedException e) {
operation = new InstallOperation(new ProvisioningSession(AbstractPage.agent), new ArrayList<IInstallableUnit>()) {
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
index d375e77a0..a3346d2ed 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
@@ -113,7 +113,7 @@ public class AutomaticUpdater implements IUpdateListener {
if (!status.isOK() || operation.getPossibleUpdates() == null || operation.getPossibleUpdates().length == 0) {
if (PlatformUI.isWorkbenchRunning()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(() -> clearUpdateAffordances());
+ PlatformUI.getWorkbench().getDisplay().asyncExec(this::clearUpdateAffordances);
}
return;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
index c2609fda3..4521018f3 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
@@ -128,7 +128,7 @@ public class AutomaticUpdatesPopup extends PopupDialog {
@Override
public int open() {
- prefListener = event -> handlePreferenceChange(event);
+ prefListener = this::handlePreferenceChange;
prefs.addPropertyChangeListener(prefListener);
return super.open();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
index e850dd502..19b86bccb 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
@@ -67,7 +67,7 @@ abstract class PreloadingRepositoryHandler extends AbstractHandler {
// Log the detailed message
StatusManager.getManager().handle(ProvSDKUIActivator.getNoSelfProfileStatus());
} else {
- BusyIndicator.showWhile(getShell().getDisplay(), () -> doExecuteAndLoad());
+ BusyIndicator.showWhile(getShell().getDisplay(), this::doExecuteAndLoad);
}
return null;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java
index 4f1bd7c8a..913a38b71 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java
@@ -104,7 +104,7 @@ public class ProvisioningPreferencePage extends PreferencePage implements IWorkb
//See https://bugs.eclipse.org/bugs/show_bug.cgi?id=313242
Link link = new Link(container, SWT.PUSH);
link.setText(ProvSDKMessages.ProvisioningPreferencePage_UninstallUpdateLink);
- link.addListener(SWT.Selection, event -> ProvUI.openInstallationDialog(event));
+ link.addListener(SWT.Selection, ProvUI::openInstallationDialog);
initialize();
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 c5612cd2c..f9487e45a 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
@@ -38,7 +38,7 @@ public abstract class RefreshAction extends ProvisioningAction {
}
private void hookKeyListener(Control control) {
- control.addKeyListener(KeyListener.keyReleasedAdapter(e -> handleKeyReleased(e)));
+ control.addKeyListener(KeyListener.keyReleasedAdapter(this::handleKeyReleased));
}
@Override
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 54d8287d7..084d5cafe 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
@@ -339,7 +339,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
// to make a repo visible.
if (!(queryContext.getViewType() == IUViewQueryContext.AVAILABLE_VIEW_BY_REPO)) {
if (Display.getCurrent() == null)
- display.asyncExec(() -> updateAvailableViewState());
+ display.asyncExec(this::updateAvailableViewState);
else
updateAvailableViewState();
return;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java
index dbeb62bb5..1275b3ecd 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java
@@ -229,7 +229,7 @@ public class InstallWizard extends WizardWithLicenses {
new String[] { ProvUIMessages.LaunchUpdateManagerButton, IDialogConstants.CANCEL_LABEL },
0);
if (dialog.open() == 0)
- BusyIndicator.showWhile(shell.getDisplay(), () -> UpdateManagerCompatibility.openInstaller());
+ BusyIndicator.showWhile(shell.getDisplay(), UpdateManagerCompatibility::openInstaller);
});
}
return installHandlerStatus;

Back to the top