Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-08-13 08:19:01 +0000
committerAlexander Kurtakov2019-08-13 08:19:01 +0000
commit7e0cd9a10a1791e56fc400ba253106bf36696141 (patch)
treef707975b7d62cca84e369e042699ccf72ac766d3 /org.eclipse.m2e.jdt.ui
parent0e451d10a1f60231ad162914117ef5b4c99cc615 (diff)
downloadm2e-core-7e0cd9a10a1791e56fc400ba253106bf36696141.tar.gz
m2e-core-7e0cd9a10a1791e56fc400ba253106bf36696141.tar.xz
m2e-core-7e0cd9a10a1791e56fc400ba253106bf36696141.zip
Convert to lambda.
Change-Id: Ief08ed5374ad6738109e11a7ee4ebadb891848c3 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.m2e.jdt.ui')
-rw-r--r--org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/actions/OpenJavaDocAction.java42
1 files changed, 17 insertions, 25 deletions
diff --git a/org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/actions/OpenJavaDocAction.java b/org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/actions/OpenJavaDocAction.java
index a0b673f7..d9abd45c 100644
--- a/org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/actions/OpenJavaDocAction.java
+++ b/org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/actions/OpenJavaDocAction.java
@@ -83,12 +83,9 @@ public class OpenJavaDocAction extends ActionDelegate {
} catch(CoreException ex) {
log.error(ex.getMessage(), ex);
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(Display.getDefault().getActiveShell(), //
- Messages.OpenJavaDocAction_error_title, Messages.OpenJavaDocAction_error_message);
- }
- });
+ PlatformUI.getWorkbench().getDisplay()
+ .asyncExec(() -> MessageDialog.openInformation(Display.getDefault().getActiveShell(), //
+ Messages.OpenJavaDocAction_error_title, Messages.OpenJavaDocAction_error_message));
}
}
}
@@ -110,19 +107,17 @@ public class OpenJavaDocAction extends ActionDelegate {
return;
}
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- try {
- String url = "jar:" + file.toURI().toString() + "!/index.html"; //$NON-NLS-1$ //$NON-NLS-2$
- URL helpUrl = PlatformUI.getWorkbench().getHelpSystem().resolve(url, true);
-
- IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
- IWebBrowser browser = browserSupport.createBrowser(IWorkbenchBrowserSupport.NAVIGATION_BAR, //
- name, name, name);
- browser.openURL(helpUrl);
- } catch(PartInitException ex) {
- log.error(ex.getMessage(), ex);
- }
+ PlatformUI.getWorkbench().getDisplay().asyncExec(() -> {
+ try {
+ String url = "jar:" + file.toURI().toString() + "!/index.html"; //$NON-NLS-1$ //$NON-NLS-2$
+ URL helpUrl = PlatformUI.getWorkbench().getHelpSystem().resolve(url, true);
+
+ IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
+ IWebBrowser browser = browserSupport.createBrowser(IWorkbenchBrowserSupport.NAVIGATION_BAR, //
+ name, name, name);
+ browser.openURL(helpUrl);
+ } catch(PartInitException ex) {
+ log.error(ex.getMessage(), ex);
}
});
@@ -135,12 +130,9 @@ public class OpenJavaDocAction extends ActionDelegate {
}
private static void openDialog(final String msg) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(Display.getDefault().getActiveShell(), //
- Messages.OpenJavaDocAction_info_title, msg);
- }
- });
+ PlatformUI.getWorkbench().getDisplay()
+ .asyncExec(() -> MessageDialog.openInformation(Display.getDefault().getActiveShell(), //
+ Messages.OpenJavaDocAction_info_title, msg));
}
}

Back to the top