Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2013-02-16 11:20:33 -0500
committerIgor Fedorenko2013-02-16 11:41:51 -0500
commit9fd1068cdd8deac086307942e8ae8be55db22aa5 (patch)
tree5c4bf495b506614ea1fc3055b5540347b1bf6b2e /org.eclipse.m2e.launching
parent75557e62c0d140a9b71802f263b69d90fcf11e87 (diff)
downloadm2e-core-9fd1068cdd8deac086307942e8ae8be55db22aa5.tar.gz
m2e-core-9fd1068cdd8deac086307942e8ae8be55db22aa5.tar.xz
m2e-core-9fd1068cdd8deac086307942e8ae8be55db22aa5.zip
400223 corrend launch mode when DebugAs->MavenBuild...; cleanup
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/actions/ExecutePomAction.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java
index d94eeab3..8045d748 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java
@@ -36,6 +36,7 @@ import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugModelPresentation;
import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.ui.ILaunchGroup;
import org.eclipse.debug.ui.ILaunchShortcut;
import org.eclipse.debug.ui.RefreshTab;
import org.eclipse.jdt.core.IClasspathEntry;
@@ -127,7 +128,6 @@ public class ExecutePomAction implements ILaunchShortcut, IExecutableExtension {
}
}
- @SuppressWarnings("deprecation")
private void launch(IContainer basecon, String mode) {
if(basecon == null) {
return;
@@ -152,10 +152,9 @@ public class ExecutePomAction implements ILaunchShortcut, IExecutableExtension {
}
if(openDialog) {
- DebugUITools.saveBeforeLaunch();
- // ILaunchGroup group = DebugUITools.getLaunchGroup(launchConfiguration, mode);
- DebugUITools.openLaunchConfigurationDialog(getShell(), launchConfiguration,
- MavenLaunchMainTab.ID_EXTERNAL_TOOLS_LAUNCH_GROUP, null);
+ ILaunchGroup group = DebugUITools.getLaunchGroup(launchConfiguration, mode);
+ String groupId = group != null ? group.getIdentifier() : MavenLaunchMainTab.ID_EXTERNAL_TOOLS_LAUNCH_GROUP;
+ DebugUITools.openLaunchConfigurationDialog(getShell(), launchConfiguration, groupId, null);
} else {
DebugUITools.launch(launchConfiguration, mode);
}
@@ -359,7 +358,7 @@ public class ExecutePomAction implements ILaunchShortcut, IExecutableExtension {
log.info("Creating new launch configuration");
- String newName = launchManager.generateUniqueLaunchConfigurationNameFrom(basedirLocation.lastSegment());
+ String newName = launchManager.generateLaunchConfigurationName(basedirLocation.lastSegment());
try {
ILaunchConfigurationWorkingCopy workingCopy = launchConfigurationType.newInstance(null, newName);
workingCopy.setAttribute(MavenLaunchConstants.ATTR_POM_DIR, basedirLocation.toString());

Back to the top