Bug 521035 - Replaced anonymous Runnable classes by lambda expression

For plugin org.eclipse.platform also changed BREE to 1.8 and updated
classpath.

Change-Id: I88b19ad70741a38a1c2cb5f69780103d99df92a8
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
diff --git a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchDelegate.java b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchDelegate.java
index 6501c24..1891988 100644
--- a/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchDelegate.java
+++ b/ant/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchDelegate.java
@@ -263,17 +263,14 @@
 		boolean debug = fMode.equals(ILaunchManager.DEBUG_MODE);
 		if (debug || AntLaunchingUtil.isLaunchInBackground(configuration)) {
 			final AntRunner finalRunner = runner;
-			Runnable r = new Runnable() {
-				@Override
-				public void run() {
-					try {
-						finalRunner.run(process);
-					}
-					catch (CoreException e) {
-						handleException(e, AntLaunchConfigurationMessages.AntLaunchDelegate_Failure);
-					}
-					process.terminated();
+			Runnable r = () -> {
+				try {
+					finalRunner.run(process);
 				}
+				catch (CoreException e) {
+					handleException(e, AntLaunchConfigurationMessages.AntLaunchDelegate_Failure);
+				}
+				process.terminated();
 			};
 			Thread background = new Thread(r);
 			background.setDaemon(true);
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/AbstractAntDebugTest.java b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/AbstractAntDebugTest.java
index 830b266..a7a627c 100644
--- a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/AbstractAntDebugTest.java
+++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/AbstractAntDebugTest.java
@@ -809,20 +809,17 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see junit.framework.TestCase#setUp()
 	 */
 	@Override
 	protected void setUp() throws Exception {
 		super.setUp();
 		setPreferences();
-		DebugUIPlugin.getStandardDisplay().syncExec(new Runnable() {
-			@Override
-			public void run() {
-				IWorkbench workbench = PlatformUI.getWorkbench();
-				IPerspectiveDescriptor descriptor = workbench.getPerspectiveRegistry().findPerspectiveWithId(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
-				workbench.getActiveWorkbenchWindow().getActivePage().setPerspective(descriptor);
-			}
+		DebugUIPlugin.getStandardDisplay().syncExec(() -> {
+			IWorkbench workbench = PlatformUI.getWorkbench();
+			IPerspectiveDescriptor descriptor = workbench.getPerspectiveRegistry().findPerspectiveWithId(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
+			workbench.getActiveWorkbenchWindow().getActivePage().setPerspective(descriptor);
 		});
 	}
 }
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/RunToLineTests.java b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/RunToLineTests.java
index dff6eac..3740c1d 100644
--- a/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/RunToLineTests.java
+++ b/ant/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/RunToLineTests.java
@@ -165,13 +165,10 @@
 		final IPerspectiveListener2 listener = new MyListener();
 		try {
 			// close all editors
-			Runnable closeAll = new Runnable() {
-				@Override
-				public void run() {
-					IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-					activeWorkbenchWindow.getActivePage().closeAllEditors(false);
-					activeWorkbenchWindow.addPerspectiveListener(listener);
-				}
+			Runnable closeAll = () -> {
+				IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+				activeWorkbenchWindow.getActivePage().closeAllEditors(false);
+				activeWorkbenchWindow.addPerspectiveListener(listener);
 			};
 			Display display = DebugUIPlugin.getStandardDisplay();
 			display.syncExec(closeAll);
@@ -191,31 +188,28 @@
 
 			final Exception[] exs = new Exception[1];
 			final IThread suspendee = thread;
-			Runnable r = new Runnable() {
-				@Override
-				public void run() {
-					ITextEditor editor = (ITextEditor) fEditor;
-					IRunToLineTarget adapter = editor.getAdapter(IRunToLineTarget.class);
-					assertNotNull("no run to line adapter", adapter); //$NON-NLS-1$
-					IDocumentProvider documentProvider = editor.getDocumentProvider();
-					assertNotNull("The document provider should not be null for: " + editor.getTitle(), documentProvider); //$NON-NLS-1$
-					try {
-						// position cursor to line
-						documentProvider.connect(this);
-						IDocument document = documentProvider.getDocument(editor.getEditorInput());
-						assertNotNull("The document should be available for: " + editor.getTitle(), document); //$NON-NLS-1$
-						int lineOffset = document.getLineOffset(lineNumber - 1); // document is 0 based!
-						documentProvider.disconnect(this);
-						editor.selectAndReveal(lineOffset, 0);
-						// run to line
-						adapter.runToLine(editor, editor.getSelectionProvider().getSelection(), suspendee);
-					}
-					catch (CoreException e) {
-						exs[0] = e;
-					}
-					catch (BadLocationException e) {
-						exs[0] = e;
-					}
+			Runnable r = () -> {
+				ITextEditor editor = (ITextEditor) fEditor;
+				IRunToLineTarget adapter = editor.getAdapter(IRunToLineTarget.class);
+				assertNotNull("no run to line adapter", adapter); //$NON-NLS-1$
+				IDocumentProvider documentProvider = editor.getDocumentProvider();
+				assertNotNull("The document provider should not be null for: " + editor.getTitle(), documentProvider); //$NON-NLS-1$
+				try {
+					// position cursor to line
+					documentProvider.connect(this);
+					IDocument document = documentProvider.getDocument(editor.getEditorInput());
+					assertNotNull("The document should be available for: " + editor.getTitle(), document); //$NON-NLS-1$
+					int lineOffset = document.getLineOffset(lineNumber - 1); // document is 0 based!
+					documentProvider.disconnect(this);
+					editor.selectAndReveal(lineOffset, 0);
+					// run to line
+					adapter.runToLine(editor, editor.getSelectionProvider().getSelection(), suspendee);
+				}
+				catch (CoreException e) {
+					exs[0] = e;
+				}
+				catch (BadLocationException e) {
+					exs[0] = e;
 				}
 			};
 			DebugElementEventWaiter waiter = new DebugElementEventWaiter(DebugEvent.SUSPEND, thread);
@@ -232,12 +226,9 @@
 			terminateAndRemove(thread);
 			removeAllBreakpoints();
 			DebugUITools.getPreferenceStore().setValue(IDebugUIConstants.PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE, restore);
-			Runnable cleanup = new Runnable() {
-				@Override
-				public void run() {
-					IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-					activeWorkbenchWindow.removePerspectiveListener(listener);
-				}
+			Runnable cleanup = () -> {
+				IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+				activeWorkbenchWindow.removePerspectiveListener(listener);
 			};
 			Display display = DebugUIPlugin.getStandardDisplay();
 			display.asyncExec(cleanup);
diff --git a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java
index 1dad110..6169cb4 100644
--- a/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java
+++ b/ant/org.eclipse.ant.tests.ui/Ant Tests/org/eclipse/ant/tests/ui/AbstractAntUIBuildTest.java
@@ -38,13 +38,10 @@
 		final Display display = Display.getCurrent();
 		Thread thread = null;
 		try {
-			Runnable r = new Runnable() {
-				@Override
-				public void run() {
-					AbstractAntUIBuildTest.super.run(result);
-					testing = false;
-					display.wake();
-				}
+			Runnable r = () -> {
+				AbstractAntUIBuildTest.super.run(result);
+				testing = false;
+				display.wake();
 			};
 			thread = new Thread(r);
 			thread.start();
@@ -78,7 +75,7 @@
 
 	/**
 	 * Launches the launch configuration Waits for all of the lines to be appended to the console.
-	 * 
+	 *
 	 * @param config
 	 *            the config to execute
 	 * @return thread in which the first suspend event occurred
@@ -88,17 +85,12 @@
 	}
 
 	protected void activateLink(final IHyperlink link) {
-		Display.getDefault().asyncExec(new Runnable() {
-			@Override
-			public void run() {
-				link.linkActivated();
-			}
-		});
+		Display.getDefault().asyncExec(() -> link.linkActivated());
 	}
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.ant.tests.ui.testplugin.AbstractAntUITest#launch(java.lang.String, java.lang.String)
 	 */
 	@Override
diff --git a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditor.java b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditor.java
index 86c3ef0..eb2b79a 100644
--- a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditor.java
+++ b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditor.java
@@ -1140,17 +1140,14 @@
 	private void postImageChange(final AntElementNode node) {
 		Shell shell = getSite().getShell();
 		if (shell != null && !shell.isDisposed()) {
-			shell.getDisplay().asyncExec(new Runnable() {
-				@Override
-				public void run() {
-					if (getSite().getShell() == null || getSite().getShell().isDisposed()) {
-						return;
-					}
-					Image titleImage = getTitleImage();
-					Image newImage = node.getImage();
-					if (titleImage != newImage) {
-						setTitleImage(newImage);
-					}
+			shell.getDisplay().asyncExec(() -> {
+				if (getSite().getShell() == null || getSite().getShell().isDisposed()) {
+					return;
+				}
+				Image titleImage = getTitleImage();
+				Image newImage = node.getImage();
+				if (titleImage != newImage) {
+					setTitleImage(newImage);
 				}
 			});
 		}
@@ -1225,14 +1222,11 @@
 
 		Shell shell = getSite().getShell();
 		if (shell != null && !shell.isDisposed()) {
-			shell.getDisplay().asyncExec(new Runnable() {
-				@Override
-				public void run() {
-					if (getSite().getShell() == null || getSite().getShell().isDisposed()) {
-						return;
-					}
-					synchronize(true);
+			shell.getDisplay().asyncExec(() -> {
+				if (getSite().getShell() == null || getSite().getShell().isDisposed()) {
+					return;
 				}
+				synchronize(true);
 			});
 		}
 	}
diff --git a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorContentOutlinePage.java b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorContentOutlinePage.java
index 4813e74..e89d5ad 100644
--- a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorContentOutlinePage.java
+++ b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorContentOutlinePage.java
@@ -391,14 +391,11 @@
 			@Override
 			public void antModelChanged(final AntModelChangeEvent event) {
 				if (event.getModel() == fModel && !getControl().isDisposed()) {
-					getControl().getDisplay().asyncExec(new Runnable() {
-						@Override
-						public void run() {
-							Control ctrl = getControl();
-							if (ctrl != null && !ctrl.isDisposed()) {
-								getTreeViewer().refresh();
-								updateTreeExpansion();
-							}
+					getControl().getDisplay().asyncExec(() -> {
+						Control ctrl = getControl();
+						if (ctrl != null && !ctrl.isDisposed()) {
+							getTreeViewer().refresh();
+							updateTreeExpansion();
 						}
 					});
 				}
diff --git a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterImportedElementsAction.java b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterImportedElementsAction.java
index 8e59487..e497721 100644
--- a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterImportedElementsAction.java
+++ b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterImportedElementsAction.java
@@ -32,16 +32,11 @@
 
 	/**
 	 * Toggles the filtering of imported elements from the Ant outline
-	 * 
+	 *
 	 * @see org.eclipse.jface.action.IAction#run()
 	 */
 	@Override
 	public void run() {
-		BusyIndicator.showWhile(fPage.getControl().getDisplay(), new Runnable() {
-			@Override
-			public void run() {
-				fPage.setFilterImportedElements(isChecked());
-			}
-		});
+		BusyIndicator.showWhile(fPage.getControl().getDisplay(), () -> fPage.setFilterImportedElements(isChecked()));
 	}
 }
\ No newline at end of file
diff --git a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterInternalTargetsAction.java b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterInternalTargetsAction.java
index 235a3ba..9d0a82f 100644
--- a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterInternalTargetsAction.java
+++ b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterInternalTargetsAction.java
@@ -32,16 +32,11 @@
 
 	/**
 	 * Toggles the filtering of internal targets from the Ant outline
-	 * 
+	 *
 	 * @see org.eclipse.jface.action.IAction#run()
 	 */
 	@Override
 	public void run() {
-		BusyIndicator.showWhile(fPage.getControl().getDisplay(), new Runnable() {
-			@Override
-			public void run() {
-				fPage.setFilterInternalTargets(isChecked());
-			}
-		});
+		BusyIndicator.showWhile(fPage.getControl().getDisplay(), () -> fPage.setFilterInternalTargets(isChecked()));
 	}
 }
diff --git a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterPropertiesAction.java b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterPropertiesAction.java
index 5d74eda..69b8cac 100644
--- a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterPropertiesAction.java
+++ b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterPropertiesAction.java
@@ -32,16 +32,11 @@
 
 	/**
 	 * Toggles the filtering of properties from the Ant outline
-	 * 
+	 *
 	 * @see org.eclipse.jface.action.IAction#run()
 	 */
 	@Override
 	public void run() {
-		BusyIndicator.showWhile(fPage.getControl().getDisplay(), new Runnable() {
-			@Override
-			public void run() {
-				fPage.setFilterProperties(isChecked());
-			}
-		});
+		BusyIndicator.showWhile(fPage.getControl().getDisplay(), () -> fPage.setFilterProperties(isChecked()));
 	}
 }
diff --git a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterTopLevelAction.java b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterTopLevelAction.java
index e540f95..1729bab 100644
--- a/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterTopLevelAction.java
+++ b/ant/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/FilterTopLevelAction.java
@@ -32,16 +32,11 @@
 
 	/**
 	 * Toggles the filtering of top level tasks and types from the Ant outline
-	 * 
+	 *
 	 * @see org.eclipse.jface.action.IAction#run()
 	 */
 	@Override
 	public void run() {
-		BusyIndicator.showWhile(fPage.getControl().getDisplay(), new Runnable() {
-			@Override
-			public void run() {
-				fPage.setFilterTopLevel(isChecked());
-			}
-		});
+		BusyIndicator.showWhile(fPage.getControl().getDisplay(), () -> fPage.setFilterTopLevel(isChecked()));
 	}
 }
diff --git a/ant/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/AntInputHandler.java b/ant/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/AntInputHandler.java
index 5e5b517..b057d9f 100644
--- a/ant/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/AntInputHandler.java
+++ b/ant/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/AntInputHandler.java
@@ -46,48 +46,45 @@
 	}
 
 	protected Runnable getHandleInputRunnable(final InputRequest request, final BuildException[] problem) {
-		return new Runnable() {
-			@Override
-			public void run() {
-				String prompt = getPrompt(request);
-				String title = AntSupportMessages.AntInputHandler_Ant_Input_Request_1;
-				IInputValidator validator = new IInputValidator() {
-					private boolean fFirstValidation = true;
+		return () -> {
+			String prompt = getPrompt(request);
+			String title = AntSupportMessages.AntInputHandler_Ant_Input_Request_1;
+			IInputValidator validator = new IInputValidator() {
+				private boolean fFirstValidation = true;
 
-					@Override
-					public String isValid(String value) {
-						request.setInput(value);
-						if (request.isInputValid()) {
-							return null;
-						}
-						if (fFirstValidation) {
-							fFirstValidation = false;
-							return IAntCoreConstants.EMPTY_STRING;
-						}
-						return AntSupportMessages.AntInputHandler_Invalid_input_2;
+				@Override
+				public String isValid(String value) {
+					request.setInput(value);
+					if (request.isInputValid()) {
+						return null;
 					}
-				};
+					if (fFirstValidation) {
+						fFirstValidation = false;
+						return IAntCoreConstants.EMPTY_STRING;
+					}
+					return AntSupportMessages.AntInputHandler_Invalid_input_2;
+				}
+			};
 
-				String initialValue = null;
-				try {
-					request.getClass().getMethod("getDefaultValue", new Class[0]); //$NON-NLS-1$
-					initialValue = request.getDefaultValue();
+			String initialValue = null;
+			try {
+				request.getClass().getMethod("getDefaultValue", new Class[0]); //$NON-NLS-1$
+				initialValue = request.getDefaultValue();
+			}
+			catch (SecurityException e1) {
+				// do nothing
+			}
+			catch (NoSuchMethodException e2) {
+				// pre Ant 1.7.0
+			}
+			InputDialog dialog = new InputDialog(null, title, prompt, initialValue, validator) {
+				@Override
+				protected int getShellStyle() {
+					return super.getShellStyle() | SWT.RESIZE;
 				}
-				catch (SecurityException e) {
-					// do nothing
-				}
-				catch (NoSuchMethodException e) {
-					// pre Ant 1.7.0
-				}
-				InputDialog dialog = new InputDialog(null, title, prompt, initialValue, validator) {
-					@Override
-					protected int getShellStyle() {
-						return super.getShellStyle() | SWT.RESIZE;
-					}
-				};
-				if (dialog.open() != Window.OK) {
-					problem[0] = new BuildException(AntSupportMessages.AntInputHandler_Unable_to_respond_to__input__request_4);
-				}
+			};
+			if (dialog.open() != Window.OK) {
+				problem[0] = new BuildException(AntSupportMessages.AntInputHandler_Unable_to_respond_to__input__request_4);
 			}
 		};
 	}
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java
index 105811a..a134f4e 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java
@@ -573,7 +573,7 @@
 
 	/**
 	 * Opens an external browser on the provided <code>urlString</code>
-	 * 
+	 *
 	 * @param urlString
 	 *            The url to open
 	 * @param shell
@@ -582,39 +582,36 @@
 	 *            the title of any error dialog
 	 */
 	public static void openBrowser(final String urlString, final Shell shell, final String errorDialogTitle) {
-		shell.getDisplay().syncExec(new Runnable() {
-			@Override
-			public void run() {
-				IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
-				try {
-					IWebBrowser browser = support.createBrowser(fgBrowserId);
-					fgBrowserId = browser.getId();
-					browser.openURL(new URL(urlString));
-					return;
-				}
-				catch (PartInitException e) {
-					AntUIPlugin.log(e.getStatus());
-				}
-				catch (MalformedURLException e) {
-					AntUIPlugin.log(e);
-				}
+		shell.getDisplay().syncExec(() -> {
+			IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
+			try {
+				IWebBrowser browser = support.createBrowser(fgBrowserId);
+				fgBrowserId = browser.getId();
+				browser.openURL(new URL(urlString));
+				return;
+			}
+			catch (PartInitException e1) {
+				AntUIPlugin.log(e1.getStatus());
+			}
+			catch (MalformedURLException e2) {
+				AntUIPlugin.log(e2);
+			}
 
-				String platform = SWT.getPlatform();
-				boolean succeeded = true;
-				if ("motif".equals(platform) || "gtk".equals(platform)) { //$NON-NLS-1$ //$NON-NLS-2$
-					Program program = Program.findProgram("html"); //$NON-NLS-1$
-					if (program == null) {
-						program = Program.findProgram("htm"); //$NON-NLS-1$
-					}
-					if (program != null) {
-						succeeded = program.execute(urlString.toString());
-					}
-				} else {
-					succeeded = Program.launch(urlString.toString());
+			String platform = SWT.getPlatform();
+			boolean succeeded = true;
+			if ("motif".equals(platform) || "gtk".equals(platform)) { //$NON-NLS-1$ //$NON-NLS-2$
+				Program program = Program.findProgram("html"); //$NON-NLS-1$
+				if (program == null) {
+					program = Program.findProgram("htm"); //$NON-NLS-1$
 				}
-				if (!succeeded) {
-					MessageDialog.openInformation(shell, errorDialogTitle, AntUIModelMessages.AntUtil_1);
+				if (program != null) {
+					succeeded = program.execute(urlString.toString());
 				}
+			} else {
+				succeeded = Program.launch(urlString.toString());
+			}
+			if (!succeeded) {
+				MessageDialog.openInformation(shell, errorDialogTitle, AntUIModelMessages.AntUtil_1);
 			}
 		});
 	}
@@ -625,10 +622,10 @@
 
 	/**
 	 * Returns if the given extension is a known extension to Ant i.e. a supported content type extension.
-	 * 
+	 *
 	 * @param resource
 	 * @return true if the file extension is supported false otherwise
-	 * 
+	 *
 	 * @since 3.6
 	 */
 	public static boolean isKnownAntFile(IResource resource) {
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ImageDescriptorRegistry.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ImageDescriptorRegistry.java
index 5c0758e..dc18e8f 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ImageDescriptorRegistry.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ImageDescriptorRegistry.java
@@ -82,16 +82,6 @@
 	}
 
 	private void hookDisplay() {
-		fDisplay.asyncExec(new Runnable() {
-			@Override
-			public void run() {
-				fDisplay.disposeExec(new Runnable() {
-					@Override
-					public void run() {
-						dispose();
-					}
-				});
-			}
-		});
+		fDisplay.asyncExec(() -> fDisplay.disposeExec(() -> dispose()));
 	}
 }
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/AntConsoleColorProvider.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/AntConsoleColorProvider.java
index 4c87339..47c335c 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/AntConsoleColorProvider.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/AntConsoleColorProvider.java
@@ -72,7 +72,7 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.debug.ui.console.IConsoleColorProvider#isReadOnly()
 	 */
 	@Override
@@ -82,20 +82,17 @@
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
 	 */
 	@Override
 	public void propertyChange(PropertyChangeEvent event) {
 		final String streamId = getStreamId(event.getProperty());
 		if (streamId != null) {
-			AntUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
-				@Override
-				public void run() {
-					IOConsoleOutputStream stream = getConsole().getStream(streamId);
-					if (stream != null) {
-						stream.setColor(getColor(streamId));
-					}
+			AntUIPlugin.getStandardDisplay().asyncExec(() -> {
+				IOConsoleOutputStream stream = getConsole().getStream(streamId);
+				if (stream != null) {
+					stream.setColor(getColor(streamId));
 				}
 			});
 		}
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java
index ccbf0c1..71a5165 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java
@@ -378,13 +378,7 @@
 
 		final MinimizedFileSystemElement[] results = new MinimizedFileSystemElement[1];
 
-		BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
-			@Override
-			public void run() {
-				// Create the root element from the supplied file system object
-				results[0] = createRootElement(rootFileSystemObject, structureProvider);
-			}
-		});
+		BusyIndicator.showWhile(getShell().getDisplay(), () -> results[0] = createRootElement(rootFileSystemObject, structureProvider));
 
 		return results[0];
 	}
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreferencePage.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreferencePage.java
index 3a470cc..ce19653 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreferencePage.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreferencePage.java
@@ -349,13 +349,10 @@
 		for (int i = 0; i < fAppearanceColorListModel.length; i++) {
 			fConsoleColorList.add(fAppearanceColorListModel[i][0]);
 		}
-		fConsoleColorList.getDisplay().asyncExec(new Runnable() {
-			@Override
-			public void run() {
-				if (fConsoleColorList != null && !fConsoleColorList.isDisposed()) {
-					fConsoleColorList.select(0);
-					handleAppearanceColorListSelection();
-				}
+		fConsoleColorList.getDisplay().asyncExec(() -> {
+			if (fConsoleColorList != null && !fConsoleColorList.isDisposed()) {
+				fConsoleColorList.select(0);
+				handleAppearanceColorListSelection();
 			}
 		});
 	}
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileFilter.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileFilter.java
index 92a30a7..2ab550b 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileFilter.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileFilter.java
@@ -72,12 +72,9 @@
 	 * Search for all the matching files in the workspace.
 	 */
 	private void init() {
-		BusyIndicator.showWhile(AntUIPlugin.getStandardDisplay(), new Runnable() {
-			@Override
-			public void run() {
-				fFiles = new HashSet<>();
-				traverse(ResourcesPlugin.getWorkspace().getRoot(), fFiles);
-			}
+		BusyIndicator.showWhile(AntUIPlugin.getStandardDisplay(), () -> {
+			fFiles = new HashSet<>();
+			traverse(ResourcesPlugin.getWorkspace().getRoot(), fFiles);
 		});
 	}
 
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java
index 65310ce..72a00bc 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java
@@ -158,20 +158,17 @@
 	 */
 	private void handleBuildFileChanged(AntProjectNode project) {
 		((AntProjectNodeProxy) project).parseBuildFile(true);
-		Display.getDefault().asyncExec(new Runnable() {
-			@Override
-			public void run() {
-				// must do a full refresh to re-sort
-				projectViewer.refresh();
-				// update the status line
-				handleSelectionChanged((IStructuredSelection) projectViewer.getSelection());
-			}
+		Display.getDefault().asyncExec(() -> {
+			// must do a full refresh to re-sort
+			projectViewer.refresh();
+			// update the status line
+			handleSelectionChanged((IStructuredSelection) projectViewer.getSelection());
 		});
 	}
 
 	/*
 	 * (non-Javadoc)
-	 * 
+	 *
 	 * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
 	 */
 	@Override
@@ -679,12 +676,7 @@
 			return;
 		}
 		if (delta.getKind() == IResourceDelta.REMOVED) {
-			Display.getDefault().asyncExec(new Runnable() {
-				@Override
-				public void run() {
-					removeProject(project);
-				}
-			});
+			Display.getDefault().asyncExec(() -> removeProject(project));
 		} else if (delta.getKind() == IResourceDelta.CHANGED && (delta.getFlags() & IResourceDelta.CONTENT) != 0) {
 			handleBuildFileChanged(project);
 		}
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntViewDropAdapter.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntViewDropAdapter.java
index ee1a8dc..3d97745 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntViewDropAdapter.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntViewDropAdapter.java
@@ -44,12 +44,9 @@
 		Object data = event.data;
 		if (data instanceof String[]) {
 			final String[] strings = (String[]) data;
-			BusyIndicator.showWhile(null, new Runnable() {
-				@Override
-				public void run() {
-					for (int i = 0; i < strings.length; i++) {
-						processString(strings[i]);
-					}
+			BusyIndicator.showWhile(null, () -> {
+				for (int i = 0; i < strings.length; i++) {
+					processString(strings[i]);
 				}
 			});
 		}
@@ -58,7 +55,7 @@
 	/**
 	 * Attempts to process the given string as a path to an XML file. If the string is determined to be a path to an XML file in the workspace, that
 	 * file is added to the Ant view.
-	 * 
+	 *
 	 * @param buildFileName
 	 *            the string to process
 	 */
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/AddBuildFilesAction.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/AddBuildFilesAction.java
index b5af124..868826b 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/AddBuildFilesAction.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/AddBuildFilesAction.java
@@ -74,12 +74,7 @@
 							final AntProjectNode project = new AntProjectNodeProxy(buildFileName);
 							project.getName();
 							monitor.worked(1);
-							Display.getDefault().asyncExec(new Runnable() {
-								@Override
-								public void run() {
-									view.addProject(project);
-								}
-							});
+							Display.getDefault().asyncExec(() -> view.addProject(project));
 						}
 					}
 				}
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesAction.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesAction.java
index ae3f524..1724dfd 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesAction.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesAction.java
@@ -68,12 +68,7 @@
 							project.parseBuildFile();
 							monitor.worked(1);
 							if (includeErrorNodes || !(project.isErrorNode())) {
-								Display.getDefault().asyncExec(new Runnable() {
-									@Override
-									public void run() {
-										view.addProject(project);
-									}
-								});
+								Display.getDefault().asyncExec(() -> view.addProject(project));
 							}
 						}
 					}
diff --git a/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java b/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java
index a38c107..966ff29 100644
--- a/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java
+++ b/ant/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java
@@ -69,22 +69,19 @@
 	}
 
 	protected Runnable getHandleInputRunnable(final BuildException[] problem) {
-		return new Runnable() {
-			@Override
-			public void run() {
-				String prompt;
-				if (fRequest instanceof MultipleChoiceInputRequest) {
-					prompt = fRequest.getPrompt();
-				} else {
-					prompt = getPrompt(fRequest);
-				}
-				String title = RemoteAntMessages.getString("SWTInputHandler.1"); //$NON-NLS-1$
-				boolean[] result = new boolean[1];
-				open(title, prompt, result);
+		return () -> {
+			String prompt;
+			if (fRequest instanceof MultipleChoiceInputRequest) {
+				prompt = fRequest.getPrompt();
+			} else {
+				prompt = getPrompt(fRequest);
+			}
+			String title = RemoteAntMessages.getString("SWTInputHandler.1"); //$NON-NLS-1$
+			boolean[] result = new boolean[1];
+			open(title, prompt, result);
 
-				if (!result[0]) {
-					problem[0] = new BuildException(RemoteAntMessages.getString("SWTInputHandler.2")); //$NON-NLS-1$
-				}
+			if (!result[0]) {
+				problem[0] = new BuildException(RemoteAntMessages.getString("SWTInputHandler.2")); //$NON-NLS-1$
 			}
 		};
 	}
diff --git a/platform/org.eclipse.platform/.classpath b/platform/org.eclipse.platform/.classpath
index 36d4c39..e69b1eb 100644
--- a/platform/org.eclipse.platform/.classpath
+++ b/platform/org.eclipse.platform/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" output="bin-intro" path="src-intro"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" output="bin-intro" path="src-intro"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/platform/org.eclipse.platform/.settings/org.eclipse.jdt.core.prefs b/platform/org.eclipse.platform/.settings/org.eclipse.jdt.core.prefs
index da82a02..1b7358e 100644
--- a/platform/org.eclipse.platform/.settings/org.eclipse.jdt.core.prefs
+++ b/platform/org.eclipse.platform/.settings/org.eclipse.jdt.core.prefs
@@ -1,9 +1,10 @@
 eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -71,7 +72,12 @@
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/platform/org.eclipse.platform/META-INF/MANIFEST.MF b/platform/org.eclipse.platform/META-INF/MANIFEST.MF
index 4bad290..54383e6 100644
--- a/platform/org.eclipse.platform/META-INF/MANIFEST.MF
+++ b/platform/org.eclipse.platform/META-INF/MANIFEST.MF
@@ -11,8 +11,6 @@
  org.eclipse.ui.forms;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
  org.eclipse.ui;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
  org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.0/Foundation-1.0,
- J2SE-1.3
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Export-Package: org.eclipse.platform.internal;x-internal:=true
 Eclipse-BundleShape: dir
diff --git a/platform/org.eclipse.platform/src-intro/org/eclipse/platform/internal/LaunchUpdateIntroAction.java b/platform/org.eclipse.platform/src-intro/org/eclipse/platform/internal/LaunchUpdateIntroAction.java
index 1034cfa..130bd5e 100644
--- a/platform/org.eclipse.platform/src-intro/org/eclipse/platform/internal/LaunchUpdateIntroAction.java
+++ b/platform/org.eclipse.platform/src-intro/org/eclipse/platform/internal/LaunchUpdateIntroAction.java
@@ -30,14 +30,11 @@
 	}
 
 	public void run(IIntroSite site, Properties params) {
-		Runnable r = new Runnable() {
-			public void run() {
-				if (!executeUpdateCommand(COMMAND_P2))
-					executeUpdateCommand(COMMAND_UPDATE_MANAGER);
-			}
-		};
 		Shell currentShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
-		currentShell.getDisplay().asyncExec(r);
+		currentShell.getDisplay().asyncExec(() -> {
+			if (!executeUpdateCommand(COMMAND_P2))
+				executeUpdateCommand(COMMAND_UPDATE_MANAGER);
+		});
 	}
 
 	boolean executeUpdateCommand(String command) {