Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-12-19 20:06:54 +0000
committerLars Vogel2019-12-19 20:06:54 +0000
commit127bd0bf5482a1979e8bec3199c751c52db08832 (patch)
tree461331c0829df079f5bbe0f4acd2f4c8256bbf43
parent43fb9501aff0736a22cc502da4bb150e85b56a2c (diff)
downloadorg.eclipse.e4.tools-127bd0bf5482a1979e8bec3199c751c52db08832.tar.gz
org.eclipse.e4.tools-127bd0bf5482a1979e8bec3199c751c52db08832.tar.xz
org.eclipse.e4.tools-127bd0bf5482a1979e8bec3199c751c52db08832.zip
Use lambdas where possible
Using the batch cleanup operation via Source -> Cleanup -> "Use lambdas where possible" from standard JDT. Change-Id: Ifb1fa56d76fb66d6b26e83c4946852aa58500c4d Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyPart.java9
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java11
2 files changed, 4 insertions, 16 deletions
diff --git a/bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyPart.java b/bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyPart.java
index f152db28..4a4306fe 100644
--- a/bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyPart.java
+++ b/bundles/org.eclipse.e4.tools.bundle.spy/src/org/eclipse/e4/tools/bundles/spy/BundleSpyPart.java
@@ -30,9 +30,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn;
import org.eclipse.jface.viewers.Viewer;
@@ -218,12 +216,7 @@ public class BundleSpyPart {
BundleContext bc = FrameworkUtil.getBundle(BundleSpyPart.class).getBundleContext();
bundlesTableViewer.setInput(bc.getBundles());
- bundlesTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- updateButtonStatuses((IStructuredSelection) event.getSelection());
- }
- });
+ bundlesTableViewer.addSelectionChangedListener(event -> updateButtonStatuses((IStructuredSelection) event.getSelection()));
ColumnViewerToolTipSupport.enableFor(bundlesTableViewer);
diff --git a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
index 60934442..8a974132 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
+++ b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
@@ -50,9 +50,7 @@ import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.EditingSupport;
import org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn;
@@ -656,12 +654,9 @@ public class CssSpyPart {
}
});
- widgetTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- updateForWidgetSelection(event.getSelection());
- showCssFragment.setEnabled(!event.getSelection().isEmpty());
- }
+ widgetTreeViewer.addSelectionChangedListener(event -> {
+ updateForWidgetSelection(event.getSelection());
+ showCssFragment.setEnabled(!event.getSelection().isEmpty());
});
if (isLive()) {
container.addMouseMoveListener(e -> {

Back to the top