Lambdas convert.

Convert to lambdas where feasible and found.

Change-Id: I0521c88a41b7a22012cc8e53bc621cc4bc2e8c88
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Reviewed-on: https://git.eclipse.org/r/65092
Tested-by: Hudson CI
diff --git a/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/helpers/EditorHelper.java b/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/helpers/EditorHelper.java
index e3ffb38..41dd228 100644
--- a/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/helpers/EditorHelper.java
+++ b/changelog/org.eclipse.linuxtools.changelog.tests/src/org/eclipse/linuxtools/changelog/tests/helpers/EditorHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc. and others.
+ * Copyright (c) 2010, 2016 Red Hat Inc. and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,14 +44,8 @@
      */
     public static void closeEditor(final IEditorPart editor) {
         if (editor.getSite().getWorkbenchWindow().getActivePage() != null) {
-            PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-                @Override
-                public void run() {
-                    // close editor
-                    editor.getSite().getWorkbenchWindow().getActivePage()
-                            .closeEditor(editor, false);
-                }
-            });
+            PlatformUI.getWorkbench().getDisplay().syncExec(() -> editor.getSite().getWorkbenchWindow().getActivePage()
+			        .closeEditor(editor, false));
         }
     }
 
diff --git a/changelog/org.eclipse.linuxtools.changelog.ui.tests/src/org/eclipse/linuxtools/changelog/ui/tests/utils/ContextMenuHelper.java b/changelog/org.eclipse.linuxtools.changelog.ui.tests/src/org/eclipse/linuxtools/changelog/ui/tests/utils/ContextMenuHelper.java
index c1b4cdf..ee6c852 100644
--- a/changelog/org.eclipse.linuxtools.changelog.ui.tests/src/org/eclipse/linuxtools/changelog/ui/tests/utils/ContextMenuHelper.java
+++ b/changelog/org.eclipse.linuxtools.changelog.ui.tests/src/org/eclipse/linuxtools/changelog/ui/tests/utils/ContextMenuHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, SAP AG
+ * Copyright (c) 2010, 2016 SAP AG
  *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -27,7 +27,6 @@
 import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
 import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
-import org.eclipse.swtbot.swt.finder.results.VoidResult;
 import org.eclipse.swtbot.swt.finder.results.WidgetResult;
 import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot;
 import org.hamcrest.Matcher;
@@ -52,17 +51,13 @@
 
         // show
         final MenuItem menuItem = UIThreadRunnable
-                .syncExec(new WidgetResult<MenuItem>() {
-                    @Override
-                    public MenuItem run() {
-                        MenuItem theItem = getMenuItem(bot, texts);
-                        if (theItem != null && !theItem.isEnabled())
-                            throw new IllegalStateException(
-                                    "Menu item is diabled");
+				.syncExec((WidgetResult<MenuItem>) () -> {
+					MenuItem theItem = getMenuItem(bot, texts);
+					if (theItem != null && !theItem.isEnabled())
+						throw new IllegalStateException("Menu item is diabled");
 
-                        return theItem;
-                    }
-                });
+					return theItem;
+				});
         if (menuItem == null) {
             throw new WidgetNotFoundException("Could not find menu: "
                     + Arrays.asList(texts));
@@ -72,14 +67,11 @@
         click(menuItem);
 
         // hide
-        UIThreadRunnable.syncExec(new VoidResult() {
-            @Override
-            public void run() {
-                if (menuItem.isDisposed())
-                    return; // menu already gone
-                hide(menuItem.getParent());
-            }
-        });
+		UIThreadRunnable.syncExec(() -> {
+			if (menuItem.isDisposed())
+				return; // menu already gone
+			hide(menuItem.getParent());
+		});
     }
 
     private static MenuItem getMenuItem(final AbstractSWTBot<?> bot,
@@ -120,28 +112,22 @@
         final AtomicBoolean enabled = new AtomicBoolean(false);
         // show
         final MenuItem menuItem = UIThreadRunnable
-                .syncExec(new WidgetResult<MenuItem>() {
-                    @Override
-                    public MenuItem run() {
-                        MenuItem theItem = getMenuItem(bot, texts);
-                        if (theItem != null && theItem.isEnabled())
-                            enabled.set(true);
-                        return theItem;
-                    }
-                });
+				.syncExec((WidgetResult<MenuItem>) () -> {
+					MenuItem theItem = getMenuItem(bot, texts);
+					if (theItem != null && theItem.isEnabled())
+						enabled.set(true);
+					return theItem;
+				});
         if (menuItem == null) {
             throw new WidgetNotFoundException("Could not find menu: "
                     + Arrays.asList(texts));
         }
         // hide
-        UIThreadRunnable.syncExec(new VoidResult() {
-            @Override
-            public void run() {
-                if (menuItem.isDisposed())
-                    return; // menu already gone
-                hide(menuItem.getParent());
-            }
-        });
+		UIThreadRunnable.syncExec(() -> {
+			if (menuItem.isDisposed())
+				return; // menu already gone
+			hide(menuItem.getParent());
+		});
         return enabled.get();
     }
 
@@ -166,12 +152,7 @@
         event.display = menuItem.getDisplay();
         event.type = SWT.Selection;
 
-        UIThreadRunnable.asyncExec(menuItem.getDisplay(), new VoidResult() {
-            @Override
-            public void run() {
-                menuItem.notifyListeners(SWT.Selection, event);
-            }
-        });
+		UIThreadRunnable.asyncExec(menuItem.getDisplay(), () -> menuItem.notifyListeners(SWT.Selection, event));
     }
 
     private static void hide(final Menu menu) {
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java
index 36e7f12..47cda85 100644
--- a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011-2015 STMicroelectronics and others.
+ * Copyright (c) 2011, 2016 STMicroelectronics and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -75,21 +75,18 @@
     @BeforeClass
     public static void init() {
         display = Display.getDefault();
-        display.syncExec(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-                    IWorkbenchPart part = window.getActivePage().getActivePart();
-                    if (part.getTitle().equals("Welcome")) {
-                        part.dispose();
-                    }
-                    PlatformUI.getWorkbench().showPerspective(CUIPlugin.ID_CPERSPECTIVE, window);
-                } catch (WorkbenchException e) {
-                    Assert.fail("Couldn't open C/C++ perspective.");
-                }
-            }
-        });
+        display.syncExec(() -> {
+		    try {
+		        window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		        IWorkbenchPart part = window.getActivePage().getActivePart();
+		        if (part.getTitle().equals("Welcome")) {
+		            part.dispose();
+		        }
+		        PlatformUI.getWorkbench().showPerspective(CUIPlugin.ID_CPERSPECTIVE, window);
+		    } catch (WorkbenchException e) {
+		        Assert.fail("Couldn't open C/C++ perspective.");
+		    }
+		});
     }
 
     @Before
@@ -112,19 +109,16 @@
 
     @After
     public void cleanUp() {
-        display.syncExec(new Runnable() {
-            @Override
-            public void run() {
-                Shell[] shells = Display.getCurrent().getShells();
-                for (final Shell shell : shells) {
-                    String shellTitle = shell.getText();
-                    if (!shellTitle.isEmpty() && !shellTitle.startsWith("Quick Access")
-                            && shell.getParent() != null) {
-                        shell.close();
-                    }
-                }
-            }
-        });
+        display.syncExec(() -> {
+		    Shell[] shells = Display.getCurrent().getShells();
+		    for (final Shell shell : shells) {
+		        String shellTitle = shell.getText();
+		        if (!shellTitle.isEmpty() && !shellTitle.startsWith("Quick Access")
+		                && shell.getParent() != null) {
+		            shell.close();
+		        }
+		    }
+		});
     }
 
     @AfterClass
@@ -149,28 +143,25 @@
     private void testGcovFileDetails(final String filename, final String binPath) {
         openGcovResult(project.getFile(filename), binPath, false);
 
-        display.syncExec(new Runnable() {
-            @Override
-            public void run() {
-                final IWorkbenchPage page = window.getActivePage();
-                final IEditorPart editorPart = page.getActiveEditor();
-                final IFile openedFile = project.getFile(editorPart.getEditorInput().getName());
-                final IFile targetFile = project.getFile(
-                        new Path(filename).removeFileExtension().addFileExtension(
-                                isCppProject ? "cpp" : "c"));
-                if (!targetFile.equals(openedFile)) {
-                    System.err.println("WARNING: editor for " + targetFile
-                            + " is not in focus.");
-                    for (IEditorReference ref : page.getEditorReferences()) {
-                        if (targetFile.equals(project.getFile(ref.getName()))) {
-                            return;
-                        }
-                    }
-                    Assert.fail("Editor for file " + targetFile + " was not opened,"
-                            + " instead opened " + openedFile + ".");
-                }
-            }
-        });
+        display.syncExec(() -> {
+		    final IWorkbenchPage page = window.getActivePage();
+		    final IEditorPart editorPart = page.getActiveEditor();
+		    final IFile openedFile = project.getFile(editorPart.getEditorInput().getName());
+		    final IFile targetFile = project.getFile(
+		            new Path(filename).removeFileExtension().addFileExtension(
+		                    isCppProject ? "cpp" : "c"));
+		    if (!targetFile.equals(openedFile)) {
+		        System.err.println("WARNING: editor for " + targetFile
+		                + " is not in focus.");
+		        for (IEditorReference ref : page.getEditorReferences()) {
+		            if (targetFile.equals(project.getFile(ref.getName()))) {
+		                return;
+		            }
+		        }
+		        Assert.fail("Editor for file " + targetFile + " was not opened,"
+		                + " instead opened " + openedFile + ".");
+		    }
+		});
     }
 
     @Test
@@ -217,12 +208,7 @@
     }
 
     private void dumpCSV(final IAction sortAction, final STExportToCSVAction csvAction, String type, boolean testProducedReference) {
-        display.asyncExec(new Runnable() {
-            @Override
-            public void run() {
-                sortAction.run();
-            }
-        });
+        display.asyncExec(() -> sortAction.run());
 
         String s = project.getLocation() + "/" + type + "-dump.csv";
         new File(s).delete();
@@ -257,30 +243,27 @@
 
     @Test
     public void testGcovSummaryByLaunch() {
-        display.syncExec(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    CommonNavigator vc = (CommonNavigator) window.getActivePage().showView(ProjectExplorer.VIEW_ID);
-                    vc.selectReveal(new StructuredSelection(project.getFile(getBinName())));
-                    Menu menu = new MenuManager().createContextMenu(vc.getCommonViewer().getControl());
-                    new ProfileContextualLaunchAction(menu);
-                    for (MenuItem item : menu.getItems()) {
-                        if (item.getText().endsWith("Profile Code Coverage")) {
-                            ((ActionContributionItem) item.getData()).getAction().run();
-                            break;
-                        }
-                    }
-                } catch (PartInitException e) {
-                    Assert.fail("Cannot show Project Explorer.");
-                }
-                try {
-                    window.getActivePage().showView("org.eclipse.linuxtools.gcov.view");
-                } catch (PartInitException e) {
-                    Assert.fail("Cannot show GCov View.");
-                }
-            }
-        });
+        display.syncExec(() -> {
+		    try {
+		        CommonNavigator vc = (CommonNavigator) window.getActivePage().showView(ProjectExplorer.VIEW_ID);
+		        vc.selectReveal(new StructuredSelection(project.getFile(getBinName())));
+		        Menu menu = new MenuManager().createContextMenu(vc.getCommonViewer().getControl());
+		        new ProfileContextualLaunchAction(menu);
+		        for (MenuItem item : menu.getItems()) {
+		            if (item.getText().endsWith("Profile Code Coverage")) {
+		                ((ActionContributionItem) item.getData()).getAction().run();
+		                break;
+		            }
+		        }
+		    } catch (PartInitException e1) {
+		        Assert.fail("Cannot show Project Explorer.");
+		    }
+		    try {
+		        window.getActivePage().showView("org.eclipse.linuxtools.gcov.view");
+		    } catch (PartInitException e2) {
+		        Assert.fail("Cannot show GCov View.");
+		    }
+		});
 
         // Wait for the build job to finish (note: DebugUIPlugin doesn't put launch jobs in a family)
         Job[] jobs = Job.getJobManager().find(null);
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java
index 1932124..5176833 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/FileTestCase.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009, 2010 Red Hat, Inc.
+ * Copyright (c) 2008, 2016 Red Hat, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,14 +64,8 @@
 
     public static void closeEditor(final IEditorPart editor) {
         if (editor.getSite().getWorkbenchWindow().getActivePage() != null) {
-            PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-                @Override
-                public void run() {
-                    // close editor
-                    editor.getSite().getWorkbenchWindow().getActivePage()
-                            .closeEditor(editor, false);
-                }
-            });
+            PlatformUI.getWorkbench().getDisplay().syncExec(() -> editor.getSite().getWorkbenchWindow().getActivePage()
+			        .closeEditor(editor, false));
         }
     }
 
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphing.core.tests/src/org/eclipse/linuxtools/systemtap/graphing/core/tests/structures/UpdateManagerTest.java b/systemtap/org.eclipse.linuxtools.systemtap.graphing.core.tests/src/org/eclipse/linuxtools/systemtap/graphing/core/tests/structures/UpdateManagerTest.java
index 9799a1f..783a53b 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphing.core.tests/src/org/eclipse/linuxtools/systemtap/graphing/core/tests/structures/UpdateManagerTest.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphing.core.tests/src/org/eclipse/linuxtools/systemtap/graphing/core/tests/structures/UpdateManagerTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010 IBM Corporation.
+ * Copyright (c) 2010, 2016 IBM Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,10 +52,7 @@
     }
 
     private UpdateManager manager;
-    private IUpdateListener listener = new IUpdateListener() {
-        @Override
-        public void handleUpdateEvent() {
-            //Do nothing;
-        }
-    };
+    private IUpdateListener listener = () -> {
+	    //Do nothing;
+	};
 }
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/charts/AbstractChartBuilder.java b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/charts/AbstractChartBuilder.java
index c39a381..75cfbe9 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/charts/AbstractChartBuilder.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/charts/AbstractChartBuilder.java
@@ -1,5 +1,5 @@
 /****************************************************************
- * Copyright (c) 2006-2015 IBM Corporation and others.
+ * Copyright (c) 2006, 2016 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -375,17 +375,14 @@
     }
 
     private void repaint() {
-        getDisplay().asyncExec(new Runnable() {
-            @Override
-            public void run() {
-                if (!chart.isDisposed()) {
-                    updateDataSet();
-                    for (IUpdateListener l : listeners) {
-                        l.handleUpdateEvent();
-                    }
-                }
-            }
-        });
+        getDisplay().asyncExec(() -> {
+		    if (!chart.isDisposed()) {
+		        updateDataSet();
+		        for (IUpdateListener l : listeners) {
+		            l.handleUpdateEvent();
+		        }
+		    }
+		});
     }
 
     /**
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/datadisplay/DataGrid.java b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/datadisplay/DataGrid.java
index 4e145b1..59ba834 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/datadisplay/DataGrid.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/datadisplay/DataGrid.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
+ * Copyright (c) 2006, 2016 IBM Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -333,12 +333,7 @@
 		    //Use if we want to set focus to newly added item.
 		    //Run async so the table can be fully constructed before jumping to an entry.
 		    if (jumpToEntryMenuItem.getSelection() && table.getItemCount() > 0) {
-		        table.getDisplay().asyncExec(new Runnable() {
-		            @Override
-		            public void run() {
-		                table.showItem(table.getItem(table.getItemCount()-1));
-		            }
-		        });
+		        table.getDisplay().asyncExec(() -> table.showItem(table.getItem(table.getItemCount()-1)));
 		    }
 		    formatMenuItem.setEnabled(table.getItemCount() > 0);
 		});
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/swtbot/TestCreateSystemtapScript.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/swtbot/TestCreateSystemtapScript.java
index cd8ad4f..2f1f2d2 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/swtbot/TestCreateSystemtapScript.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/swtbot/TestCreateSystemtapScript.java
@@ -1391,14 +1391,11 @@
         } else {
             // The "Add Graph" button is actually a tab that doesn't get activated when clicked.
             // Use a background thread to supress the wait for tab activation.
-            new Thread(new Runnable() {
-                @Override
-                public void run() {
-                    try {
-                        bot.activeEditor().bot().cTabItem(1).activate();
-                    } catch (TimeoutException e) {}
-                }
-            }).start();
+            new Thread(() -> {
+			    try {
+			        bot.activeEditor().bot().cTabItem(1).activate();
+			    } catch (TimeoutException e) {}
+			}).start();
         }
     }
 
diff --git a/vagrant/org.eclipse.linuxtools.vagrant.ui/src/org/eclipse/linuxtools/internal/vagrant/ui/commands/OpenVagrantfileCommandHandler.java b/vagrant/org.eclipse.linuxtools.vagrant.ui/src/org/eclipse/linuxtools/internal/vagrant/ui/commands/OpenVagrantfileCommandHandler.java
index f817e1f..ca11399 100644
--- a/vagrant/org.eclipse.linuxtools.vagrant.ui/src/org/eclipse/linuxtools/internal/vagrant/ui/commands/OpenVagrantfileCommandHandler.java
+++ b/vagrant/org.eclipse.linuxtools.vagrant.ui/src/org/eclipse/linuxtools/internal/vagrant/ui/commands/OpenVagrantfileCommandHandler.java
@@ -43,19 +43,16 @@
 
 	@Override
 	void executeInJob(IVagrantVM vm, IProgressMonitor monitor) {
-		Display.getDefault().asyncExec(new Runnable() {
-			@Override
-			public void run() {
-				IWorkbenchPage activePage = Activator.getDefault().getWorkbench()
-						.getActiveWorkbenchWindow().getActivePage();
-				IPath vgFilePath = new Path(vm.directory().getAbsolutePath())
-						.append("Vagrantfile"); //$NON-NLS-1$
-				IFileStore file = EFS.getLocalFileSystem().getStore(vgFilePath);
-				try {
-					IDE.openEditorOnFileStore(activePage, file);
-				} catch (PartInitException e) {
-					Activator.log(e);
-				}
+		Display.getDefault().asyncExec(() -> {
+			IWorkbenchPage activePage = Activator.getDefault().getWorkbench()
+					.getActiveWorkbenchWindow().getActivePage();
+			IPath vgFilePath = new Path(vm.directory().getAbsolutePath())
+					.append("Vagrantfile"); //$NON-NLS-1$
+			IFileStore file = EFS.getLocalFileSystem().getStore(vgFilePath);
+			try {
+				IDE.openEditorOnFileStore(activePage, file);
+			} catch (PartInitException e) {
+				Activator.log(e);
 			}
 		});
 	}
diff --git a/vagrant/org.eclipse.linuxtools.vagrant.ui/src/org/eclipse/linuxtools/internal/vagrant/ui/wizards/CreateVMPage.java b/vagrant/org.eclipse.linuxtools.vagrant.ui/src/org/eclipse/linuxtools/internal/vagrant/ui/wizards/CreateVMPage.java
index ed7cadd..586c92f 100644
--- a/vagrant/org.eclipse.linuxtools.vagrant.ui/src/org/eclipse/linuxtools/internal/vagrant/ui/wizards/CreateVMPage.java
+++ b/vagrant/org.eclipse.linuxtools.vagrant.ui/src/org/eclipse/linuxtools/internal/vagrant/ui/wizards/CreateVMPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2015 Red Hat.
+ * Copyright (c) 2015, 2016 Red Hat.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,8 +34,6 @@
 import org.eclipse.linuxtools.vagrant.core.IVagrantBox;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
@@ -174,12 +172,7 @@
 				.observe(model);
 		dbc.bindValue(WidgetProperties.text(SWT.Modify).observe(boxLocText),
 				boxLocObservable);
-		boxLocText.addModifyListener(new ModifyListener() {
-			@Override
-			public void modifyText(ModifyEvent e) {
-				vmFileChanged(boxLocText.getText());
-			}
-		});
+		boxLocText.addModifyListener(e -> vmFileChanged(boxLocText.getText()));
 
 		// Vagrantfile search
 		final Button vgFilesearchButton = new Button(container, SWT.NONE);
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/internal/valgrind/massif/tests/ExportWizardTest.java b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/internal/valgrind/massif/tests/ExportWizardTest.java
index e8b3b02..76bb802 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/internal/valgrind/massif/tests/ExportWizardTest.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif.tests/src/org/eclipse/linuxtools/internal/valgrind/massif/tests/ExportWizardTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011 Red Hat, Inc.
+ * Copyright (c) 2011, 2016 Red Hat, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -191,24 +191,20 @@
     }
 
     protected void createWizard() {
-        Display.getDefault().syncExec(new Runnable() {
-            @Override
-            public void run() {
-                wizard = new ValgrindExportWizard();
-                wizard.init(PlatformUI.getWorkbench(), null);
+        Display.getDefault().syncExec(() -> {
+		    wizard = new ValgrindExportWizard();
+		    wizard.init(PlatformUI.getWorkbench(), null);
 
-                dialog = new WizardDialog(PlatformUI.getWorkbench()
-                        .getActiveWorkbenchWindow().getShell(), wizard);
-                dialog.setBlockOnOpen(false);
-                dialog.open();
+		    dialog = new WizardDialog(PlatformUI.getWorkbench()
+		            .getActiveWorkbenchWindow().getShell(), wizard);
+		    dialog.setBlockOnOpen(false);
+		    dialog.open();
 
-                assertFalse(wizard.canFinish());
+		    assertFalse(wizard.canFinish());
 
-                page = (ValgrindExportWizardPage) wizard.getPages()[0];
-                assertFalse(page.isPageComplete());
+		    page = (ValgrindExportWizardPage) wizard.getPages()[0];
+		    assertFalse(page.isPageComplete());
 
-            }
-
-        });
+		});
     }
 }