Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-11-20 09:45:27 +0000
committerMickael Istria2019-11-20 12:42:19 +0000
commit7b7ec9e502f5523dba4e3c47f23f602f4fccb5dc (patch)
tree96dbd444d22dd95ebbcfdb7a963a39142971a877
parent987dd2a53de3c555e2762dc4a65728276a8b3b41 (diff)
downloadm2e-core-7b7ec9e502f5523dba4e3c47f23f602f4fccb5dc.tar.gz
m2e-core-7b7ec9e502f5523dba4e3c47f23f602f4fccb5dc.tar.xz
m2e-core-7b7ec9e502f5523dba4e3c47f23f602f4fccb5dc.zip
Lambda conversion im m2e.launching.
Change-Id: If176f21967ba1fd6667cbb2f4c80d99a72e1adc1 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenRuntimeLaunchSupport.java30
1 files changed, 13 insertions, 17 deletions
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenRuntimeLaunchSupport.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenRuntimeLaunchSupport.java
index ff78782f..06443e40 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenRuntimeLaunchSupport.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenRuntimeLaunchSupport.java
@@ -32,7 +32,6 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.ui.RefreshTab;
import org.eclipse.jdt.launching.IVMRunner;
-import org.eclipse.jdt.launching.VMRunnerConfiguration;
import org.eclipse.m2e.core.internal.MavenPluginActivator;
import org.eclipse.m2e.core.internal.launch.AbstractMavenRuntime;
@@ -142,8 +141,8 @@ public class MavenRuntimeLaunchSupport {
os.close();
}
} catch(IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, PLUGIN_ID, -1,
- Messages.MavenLaunchDelegate_error_cannot_create_conf, e));
+ throw new CoreException(
+ new Status(IStatus.ERROR, PLUGIN_ID, -1, Messages.MavenLaunchDelegate_error_cannot_create_conf, e));
}
return new MavenRuntimeLaunchSupport(runtime, cwconf, cwconfFile, resolveWorkspaceArtifacts);
@@ -281,20 +280,17 @@ public class MavenRuntimeLaunchSupport {
}
public IVMRunner decorateVMRunner(final IVMRunner runner) {
- return new IVMRunner() {
- public void run(VMRunnerConfiguration runnerConfiguration, ILaunch launch, IProgressMonitor monitor)
- throws CoreException {
- runner.run(runnerConfiguration, launch, monitor);
-
- IProcess[] processes = launch.getProcesses();
- if(processes != null && processes.length > 0) {
- ILaunchConfiguration configuration = launch.getLaunchConfiguration();
- BackgroundResourceRefresher refresher = new BackgroundResourceRefresher(configuration, launch);
- refresher.init();
- } else {
- // the process didn't start, remove temp classworlds.conf right away
- getClassworldConfFile().delete();
- }
+ return (runnerConfiguration, launch, monitor) -> {
+ runner.run(runnerConfiguration, launch, monitor);
+
+ IProcess[] processes = launch.getProcesses();
+ if(processes != null && processes.length > 0) {
+ ILaunchConfiguration configuration = launch.getLaunchConfiguration();
+ BackgroundResourceRefresher refresher = new BackgroundResourceRefresher(configuration, launch);
+ refresher.init();
+ } else {
+ // the process didn't start, remove temp classworlds.conf right away
+ getClassworldConfFile().delete();
}
};
}

Back to the top