Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2020-06-15 08:11:21 +0000
committerLars Vogel2020-06-16 08:26:52 +0000
commit7ca6d22fbdb4d06855a684b6c99705643310e6fd (patch)
treee6250e3c6e9a01985f8d6e5651857651cfd78ee6 /org.eclipse.debug.ui
parent7a663a44380ebdfc13df2796fca835e4be1ff0b5 (diff)
downloadeclipse.platform.debug-7ca6d22fbdb4d06855a684b6c99705643310e6fd.tar.gz
eclipse.platform.debug-7ca6d22fbdb4d06855a684b6c99705643310e6fd.tar.xz
eclipse.platform.debug-7ca6d22fbdb4d06855a684b6c99705643310e6fd.zip
Using lambdas in BreakpointOrganizerManager.javaI20200616-0620
This allows to remove a cast as the types are inferred. Change-Id: Ia454fa87f24c91feb03ee7d97956bd7991fe91ea Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java16
1 files changed, 3 insertions, 13 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java
index 2721701cc..87333a254 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java
@@ -16,7 +16,6 @@ package org.eclipse.debug.internal.ui.views.breakpoints;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
-import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -28,7 +27,6 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
/**
* Manager which provides access to the breakpoint organizers
@@ -78,10 +76,7 @@ public class BreakpointOrganizerManager {
*/
private void start(String organizerId) {
IBreakpointOrganizer organizer = getOrganizer(organizerId);
- IPropertyChangeListener listener = new IPropertyChangeListener() {
- @Override
- public void propertyChange(PropertyChangeEvent event) {
- }
+ IPropertyChangeListener listener = event -> {
};
organizer.addPropertyChangeListener(listener);
organizer.removePropertyChangeListener(listener);
@@ -122,13 +117,8 @@ public class BreakpointOrganizerManager {
Collection<IBreakpointOrganizer> collection = fOrganizers.values();
fSorted = new ArrayList<>();
fSorted.addAll(collection);
- Collections.sort(fSorted, new Comparator<Object>() {
- @Override
- public int compare(Object o1, Object o2) {
- IBreakpointOrganizer b1 = (IBreakpointOrganizer)o1;
- IBreakpointOrganizer b2 = (IBreakpointOrganizer)o2;
- return b1.getLabel().compareTo(b2.getLabel());
- }
+ Collections.sort(fSorted, (o1, o2) -> {
+ return o1.getLabel().compareTo(o2.getLabel());
});
}
return fSorted.toArray(new IBreakpointOrganizer[fSorted.size()]);

Back to the top