Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-12-19 15:05:15 -0500
committerLars Vogel2019-12-19 15:05:15 -0500
commit671605a99f821bce364a352818cc66776c508335 (patch)
tree73943981139d67b0c7db1b211f47b33048f4e144
parent9d0747d59ae02dadc6b9dd5c9fcc3b4037bbce23 (diff)
downloadeclipse.platform.ua-I20191221-2205.tar.gz
eclipse.platform.ua-I20191221-2205.tar.xz
eclipse.platform.ua-I20191221-2205.zip
Using the batch cleanup operation via Source -> Cleanup -> "Use lambdas where possible" from standard JDT. Change-Id: I93fa87e9eea2894832ce3b7b456adbca4a41ca48 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java30
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/NavigateAction.java9
-rw-r--r--org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java9
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/CompositeCheatSheetPage.java15
4 files changed, 23 insertions, 40 deletions
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java
index 0058a341a..aea27da76 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java
@@ -421,23 +421,19 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
EngineDescriptor desc = descriptors[i];
loadEngine(desc, container, toolkit);
}
- engineObserver = new Observer() {
-
- @Override
- public void update(Observable o, Object arg) {
- EngineDescriptorManager.DescriptorEvent event = (EngineDescriptorManager.DescriptorEvent) arg;
- int kind = event.getKind();
- EngineDescriptor desc = event.getDescriptor();
- if (kind == IHelpUIConstants.ADD) {
- advancedLink.dispose();
- loadEngine(desc, container, toolkit);
- createAdvancedLink(container, toolkit);
- parent.reflow();
- } else if (kind == IHelpUIConstants.REMOVE) {
- removeEngine(desc);
- } else {
- updateEngine(desc);
- }
+ engineObserver = (o, arg) -> {
+ EngineDescriptorManager.DescriptorEvent event = (EngineDescriptorManager.DescriptorEvent) arg;
+ int kind = event.getKind();
+ EngineDescriptor desc = event.getDescriptor();
+ if (kind == IHelpUIConstants.ADD) {
+ advancedLink.dispose();
+ loadEngine(desc, container, toolkit);
+ createAdvancedLink(container, toolkit);
+ parent.reflow();
+ } else if (kind == IHelpUIConstants.REMOVE) {
+ removeEngine(desc);
+ } else {
+ updateEngine(desc);
}
};
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/NavigateAction.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/NavigateAction.java
index 4746eb1b3..852f388e6 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/NavigateAction.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/util/NavigateAction.java
@@ -24,12 +24,9 @@ public class NavigateAction extends Action implements ICheatSheetAction {
private static void go(String newSheet) {
final String finalNewSheet = newSheet;
try {
- Display.getCurrent().asyncExec( new Runnable() {
- @Override
- public void run() {
- OpenCheatSheetAction csAction = new OpenCheatSheetAction( finalNewSheet );
- csAction.run();
- }
+ Display.getCurrent().asyncExec( () -> {
+ OpenCheatSheetAction csAction = new OpenCheatSheetAction( finalNewSheet );
+ csAction.run();
} );
}
catch(Exception ex) {
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java
index 8a874a28e..e3567437a 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java
@@ -34,8 +34,6 @@ import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot;
import org.eclipse.ui.internal.intro.impl.model.IntroPage;
import org.eclipse.ui.internal.intro.impl.model.loader.ExtensionPointManager;
import org.eclipse.ui.internal.intro.impl.presentations.BrowserIntroPartImplementation;
-import org.eclipse.ui.intro.config.IIntroContentProvider;
-import org.eclipse.ui.intro.config.IIntroContentProviderSite;
import org.junit.Before;
import org.junit.Test;
@@ -134,11 +132,8 @@ public class IntroModelSerializerTest {
while (iter.hasNext()) {
AbstractIntroPage page = iter.next();
BrowserIntroPartImplementation impl = new BrowserIntroPartImplementation();
- String xhtml = impl.generateXHTMLPage(page, new IIntroContentProviderSite() {
- @Override
- public void reflow(IIntroContentProvider provider, boolean incremental) {
- // dummy site
- }
+ String xhtml = impl.generateXHTMLPage(page, (provider, incremental) -> {
+ // dummy site
});
xhtml = XHTMLUtil.removeEnvironmentSpecificContent(xhtml);
// filter windows-specific newline
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/CompositeCheatSheetPage.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/CompositeCheatSheetPage.java
index fadd60d20..f2ad22591 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/CompositeCheatSheetPage.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/composite/views/CompositeCheatSheetPage.java
@@ -16,8 +16,6 @@ package org.eclipse.ui.internal.cheatsheets.composite.views;
import java.util.HashMap;
import java.util.Map;
-import java.util.Observable;
-import java.util.Observer;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -205,14 +203,11 @@ public class CompositeCheatSheetPage extends Page implements ISelectionChangedLi
} else {
updateSelectedTask(model.getRootTask());
}
- model.addObserver(new Observer() {
- @Override
- public void update(Observable o, Object arg) {
- ICompositeCheatSheetTask task = (ICompositeCheatSheetTask)arg;
- if (currentExplorer!=null)
- currentExplorer.taskUpdated(task);
- updateTask(task);
- }
+ model.addObserver((o, arg) -> {
+ ICompositeCheatSheetTask task = (ICompositeCheatSheetTask)arg;
+ if (currentExplorer!=null)
+ currentExplorer.taskUpdated(task);
+ updateTask(task);
});
}

Back to the top