Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2020-01-27 08:44:43 +0000
committerLars Vogel2020-02-04 09:27:09 +0000
commit439ed53aab73abadad2279f7e2cab56d9c76594f (patch)
tree2497f69e37b1231ccbdc040c9d604d71b653643e /org.eclipse.debug.ui/ui/org
parent034cac2c534b426f1018932b824bbe818b878797 (diff)
downloadeclipse.platform.debug-439ed53aab73abadad2279f7e2cab56d9c76594f.tar.gz
eclipse.platform.debug-439ed53aab73abadad2279f7e2cab56d9c76594f.tar.xz
eclipse.platform.debug-439ed53aab73abadad2279f7e2cab56d9c76594f.zip
Use method reference instead of lambdasI20200205-0030I20200204-1800
Method references are slightly faster than lambdas and better readable. Change-Id: I1eb012c76a425358503f171d291d6abe9a45d219 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'org.eclipse.debug.ui/ui/org')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java2
3 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java
index ab90d0230..08ba613b2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java
@@ -43,9 +43,9 @@ public class OpenBreakpointMarkerAction extends SelectionProviderAction {
super(selectionProvider, ActionMessages.OpenBreakpointMarkerAction__Go_to_File_1);
setToolTipText(ActionMessages.OpenBreakpointMarkerAction_Go_to_File_for_Breakpoint_2);
ResourceLocator.imageDescriptorFromBundle("org.eclipse.ui.ide", "icons/full/elcl16/gotoobj_tsk.png") //$NON-NLS-1$ //$NON-NLS-2$
- .ifPresent(d -> setImageDescriptor(d));
+ .ifPresent(this::setImageDescriptor);
ResourceLocator.imageDescriptorFromBundle("org.eclipse.ui.ide", "icons/full/dlcl16/gotoobj_tsk.png") //$NON-NLS-1$ //$NON-NLS-2$
- .ifPresent(d -> setDisabledImageDescriptor(d));
+ .ifPresent(this::setDisabledImageDescriptor);
PlatformUI.getWorkbench().getHelpSystem().setHelp(
this,
IDebugHelpContextIds.OPEN_BREAKPOINT_ACTION);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java
index 12cd30d9a..6c07aaae3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java
@@ -664,7 +664,7 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
protected void createDetailContextMenu(Control menuControl) {
MenuManager menuMgr= new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(mgr -> fillDetailContextMenu(mgr));
+ menuMgr.addMenuListener(this::fillDetailContextMenu);
Menu menu= menuMgr.createContextMenu(menuControl);
menuControl.setMenu(menu);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
index ae81f0b27..0ce851a65 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
@@ -311,7 +311,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
environmentTable.setContentProvider(new EnvironmentVariableContentProvider());
environmentTable.setLabelProvider(new EnvironmentVariableLabelProvider());
environmentTable.setColumnProperties(new String[] { P_VARIABLE, P_VALUE });
- environmentTable.addSelectionChangedListener(event -> handleTableSelectionChanged(event));
+ environmentTable.addSelectionChangedListener(this::handleTableSelectionChanged);
// Setup right-click context menu
Menu menuTable = new Menu(table);

Back to the top