Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-08-26 16:00:53 -0400
committerKarsten Thoms2019-09-16 18:06:11 -0400
commit53ba660dc2c4542476dc9b816dd27f7c0bd61d34 (patch)
treed34728decda1eb3b0599e0512a0c1ca7f877eea3
parent7e8d6f09746cb5de747ba892f8b01e5f45242c69 (diff)
downloadeclipse.platform.debug-53ba660dc2c4542476dc9b816dd27f7c0bd61d34.tar.gz
eclipse.platform.debug-53ba660dc2c4542476dc9b816dd27f7c0bd61d34.tar.xz
eclipse.platform.debug-53ba660dc2c4542476dc9b816dd27f7c0bd61d34.zip
Convert to lambda or member referenceI20190918-0300I20190917-1800
Convert anonymous inner classes to lambda expressions or member references. Change-Id: I232b73cdb76810568d3e1ffdeba3a6bf42a6a337 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/MemoryRenderingManager.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/RenderingBindings.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java7
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java7
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java7
5 files changed, 5 insertions, 32 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/MemoryRenderingManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/MemoryRenderingManager.java
index 8b1703df1..16989ba40 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/MemoryRenderingManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/MemoryRenderingManager.java
@@ -29,7 +29,6 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.memory.AbstractMemoryRenderingBindingsProvider;
import org.eclipse.debug.ui.memory.IMemoryRendering;
-import org.eclipse.debug.ui.memory.IMemoryRenderingBindingsListener;
import org.eclipse.debug.ui.memory.IMemoryRenderingManager;
import org.eclipse.debug.ui.memory.IMemoryRenderingType;
@@ -158,12 +157,7 @@ public class MemoryRenderingManager extends AbstractMemoryRenderingBindingsProvi
try {
bindings.validate();
fBindings.add(bindings);
- bindings.addListener(new IMemoryRenderingBindingsListener() {
- @Override
- public void memoryRenderingBindingsChanged() {
- fireBindingsChanged();
- }
- });
+ bindings.addListener(this::fireBindingsChanged);
} catch (CoreException e) {
DebugUIPlugin.log(e);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/RenderingBindings.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/RenderingBindings.java
index 1e5e9b3db..fdea4f74c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/RenderingBindings.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/RenderingBindings.java
@@ -30,7 +30,6 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.memory.AbstractMemoryRenderingBindingsProvider;
-import org.eclipse.debug.ui.memory.IMemoryRenderingBindingsListener;
import org.eclipse.debug.ui.memory.IMemoryRenderingBindingsProvider;
import org.eclipse.debug.ui.memory.IMemoryRenderingManager;
import org.eclipse.debug.ui.memory.IMemoryRenderingType;
@@ -164,12 +163,7 @@ class RenderingBindings extends AbstractMemoryRenderingBindingsProvider implemen
}
if (fProvider != null) {
- fProvider.addListener(new IMemoryRenderingBindingsListener() {
- @Override
- public void memoryRenderingBindingsChanged() {
- fireBindingsChanged();
- }
- });
+ fProvider.addListener(this::fireBindingsChanged);
}
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java
index 5819b2685..62700cfdf 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java
@@ -127,12 +127,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
}
};
- private IDebugContextListener fDebugContextListener = new IDebugContextListener() {
- @Override
- public void debugContextChanged(DebugContextEvent event) {
- InputData.this.debugContextChanged(event);
- }
- };
+ private IDebugContextListener fDebugContextListener = InputData.this::debugContextChanged;
/**
* Constructor
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java
index c3ce545d2..a649bda36 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java
@@ -82,12 +82,7 @@ public abstract class DebugCommandAction extends Action implements IDebugContext
*/
private IAction fAction;
- private IEnabledTarget fEnabledTarget = new IEnabledTarget() {
- @Override
- public void setEnabled(boolean enabled) {
- DebugCommandAction.this.setEnabled(enabled);
- }
- };
+ private IEnabledTarget fEnabledTarget = DebugCommandAction.this::setEnabled;
/**
* Constructor
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java
index 5f020524e..ca2d2c969 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java
@@ -52,12 +52,7 @@ public class ToggleBreakpointAction extends Action implements IUpdate {
private IWorkbenchPart fPart;
private IDocument fDocument;
private IVerticalRulerInfo fRulerInfo;
- private IToggleBreakpointsTargetManagerListener fListener = new IToggleBreakpointsTargetManagerListener() {
- @Override
- public void preferredTargetsChanged() {
- update();
- }
- };
+ private IToggleBreakpointsTargetManagerListener fListener = this::update;
/**
* Constructs a new action to toggle a breakpoint in the given

Back to the top