Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2014-04-24 20:16:02 -0400
committerIgor Fedorenko2014-04-24 20:16:02 -0400
commitb8961958cf7f7770ab9aa0a7d0f9910ec896e889 (patch)
tree1355b3186b165672ffddbec47ff582716a6d66ea /org.eclipse.m2e.launching
parent79864201cd3ccad476fb148748ef5ef5ad6f4ec9 (diff)
downloadm2e-core-b8961958cf7f7770ab9aa0a7d0f9910ec896e889.tar.gz
m2e-core-b8961958cf7f7770ab9aa0a7d0f9910ec896e889.tar.xz
m2e-core-b8961958cf7f7770ab9aa0a7d0f9910ec896e889.zip
432436 fixed default runtime handling
Change-Id: I72180714a0de33e5ab1573d44193f959c7692b83 Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Diffstat (limited to 'org.eclipse.m2e.launching')
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchUtils.java2
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenRuntimeSelector.java5
2 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchUtils.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchUtils.java
index 0e753de1..d8575fc4 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchUtils.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchUtils.java
@@ -42,7 +42,7 @@ public class MavenLaunchUtils {
public static AbstractMavenRuntime getMavenRuntime(ILaunchConfiguration configuration) throws CoreException {
MavenRuntimeManagerImpl runtimeManager = MavenPluginActivator.getDefault().getMavenRuntimeManager();
String name = configuration.getAttribute(MavenLaunchConstants.ATTR_RUNTIME, ""); //$NON-NLS-1$
- AbstractMavenRuntime runtime = runtimeManager.getRuntimeByName(name);
+ AbstractMavenRuntime runtime = runtimeManager.getRuntime(name);
if(runtime == null) {
throw new CoreException(new Status(IStatus.ERROR, MavenLaunchConstants.PLUGIN_ID, -1, //
NLS.bind(Messages.MavenLaunchUtils_error_no_maven_install, name), null));
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenRuntimeSelector.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenRuntimeSelector.java
index a045f140..fbea9426 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenRuntimeSelector.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenRuntimeSelector.java
@@ -156,7 +156,8 @@ public class MavenRuntimeSelector extends Composite {
protected void setInput() {
MavenRuntimeManagerImpl runtimeManager = getRuntimeManager();
runtimeComboViewer.setInput(runtimeManager.getMavenRuntimes());
- runtimeComboViewer.setSelection(new StructuredSelection(runtimeManager.getDefaultRuntime()));
+ runtimeComboViewer
+ .setSelection(new StructuredSelection(runtimeManager.getRuntime(MavenRuntimeManagerImpl.DEFAULT)));
}
public void setSelectRuntime(AbstractMavenRuntime runtime) {
@@ -179,7 +180,7 @@ public class MavenRuntimeSelector extends Composite {
} catch(CoreException ex) {
// TODO log
}
- AbstractMavenRuntime runtime = getRuntimeManager().getRuntimeByName(name);
+ AbstractMavenRuntime runtime = getRuntimeManager().getRuntime(name);
if(runtime != null) {
setSelectRuntime(runtime);
}

Back to the top