本文整理汇总了Java中org.eclipse.debug.core.ILaunchManager.DEBUG_MODE属性的典型用法代码示例。如果您正苦于以下问题:Java ILaunchManager.DEBUG_MODE属性的具体用法?Java ILaunchManager.DEBUG_MODE怎么用?Java ILaunchManager.DEBUG_MODE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.debug.core.ILaunchManager
的用法示例。
在下文中一共展示了ILaunchManager.DEBUG_MODE属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getVMRunner
public IVMRunner getVMRunner( ILaunchConfiguration configuration,
String mode ) throws CoreException
{
if ( ( helper.debugType & DEBUG_TYPE_JAVA_CLASS ) == DEBUG_TYPE_JAVA_CLASS )
{
mode = ILaunchManager.DEBUG_MODE;
}
else
{
mode = ILaunchManager.RUN_MODE;
}
return new ReportDebuggerVMRunner( super.getVMRunner( configuration,
mode ),
( helper.debugType & DEBUG_TYPE_JAVA_SCRIPT ) == DEBUG_TYPE_JAVA_SCRIPT,
this );
}
示例2: execute
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
String launchMode = event.getParameter("launchMode");
if (launchMode == null) {
launchMode = ILaunchManager.DEBUG_MODE;
}
LaunchHelper launcher = new LaunchHelper();
try {
IModule[] modules = asModules(launcher, event);
launcher.launch(modules, launchMode);
} catch (CoreException ex) {
throw new ExecutionException("Unable to configure server", ex);
}
return null;
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:15,代码来源:LaunchAppEngineStandardHandler.java
示例3: runVM
/**
* @param label
* @param classToLaunch
* @param classpath
* @param bootClasspath
* @param vmArgs
* @param prgArgs
* @param workDir
* @param sourceLocator
* @param debug
* @param showInDebugger
* @throws CoreException
*/
public void runVM(final String label, final String classToLaunch, final String[] classpath, final String[] bootClasspath, final String[] vmArgs,
final String[] prgArgs, final String workDir, final ISourceLocator sourceLocator, final boolean debug, final boolean showInDebugger)
throws CoreException {
final IVMInstall vmInstall = this.getVMInstall();
String mode = ILaunchManager.DEBUG_MODE;
if (debug && classToLaunch.equals(WEBLOGIC_MAIN_CLASS)) {
mode = ILaunchManager.DEBUG_MODE;
} else {
mode = ILaunchManager.RUN_MODE;
}
final IVMRunner vmRunner = vmInstall.getVMRunner(mode);
final ILaunchConfigurationType launchType = DebugPlugin.getDefault().getLaunchManager()
.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
final ILaunchConfigurationWorkingCopy config = launchType.newInstance(null, label);
config.setAttribute(IDebugUIConstants.ATTR_PRIVATE, true);
config.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector");
DebugUITools.setLaunchPerspective(launchType, mode, IDebugUIConstants.PERSPECTIVE_DEFAULT);
final Launch launch = new Launch(config, mode, sourceLocator);
config.doSave();
if (vmRunner != null) {
final VMRunnerConfiguration vmConfig = new VMRunnerConfiguration(classToLaunch, classpath);
vmConfig.setVMArguments(vmArgs);
vmConfig.setProgramArguments(prgArgs);
if (workDir != null) {
vmConfig.setWorkingDirectory(workDir);
}
if (bootClasspath.length == 0) {
vmConfig.setBootClassPath(null);
} else {
vmConfig.setBootClassPath(bootClasspath);
}
vmRunner.run(vmConfig, launch, null);
}
if (showInDebugger) {
DebugPlugin.getDefault().getLaunchManager().addLaunch(launch);
}
}
示例4: testCheckDebugMode
@Test
public void testCheckDebugMode() throws Exception {
String mode = ILaunchManager.DEBUG_MODE;
doCallRealMethod().when(mockedDelegate).checkMode(mode);
doNothing().when(mockedDelegate).throwErrorMsg(any(String.class));
mockedDelegate.checkMode(mode);
verify(mockedDelegate, times(1)).throwErrorMsg(Messages.LaunchDelegate_CannotLaunchDebugModeErrorMessage);
}
示例5: runVM
static public void runVM(String label, String classToLaunch, String[] classpath, String[] bootClasspath, String vmArgs, String prgArgs, boolean debug, boolean showInDebugger, boolean saveConfig)
throws CoreException {
// IVMInstall vmInstall = getVMInstall();
String mode = "";
if (debug)
mode = ILaunchManager.DEBUG_MODE;
else
mode = ILaunchManager.RUN_MODE;
// IVMRunner vmRunner = vmInstall.getVMRunner(mode);
ILaunchConfigurationWorkingCopy config = createConfig(label, classToLaunch, classpath, bootClasspath, vmArgs, prgArgs, debug, showInDebugger, saveConfig);
ILAUNCH = config.launch(mode, null);
// ISourceLocator sourceLocator = getSourceLocator(config, false);
//
// // Launch launch = createLaunch(label, classToLaunch, classpath, bootClasspath, vmArgs, prgArgs, sourceLocator, debug, showInDebugger, false);
// Launch launch = new Launch(config, mode, sourceLocator);
//
//
// if (vmRunner != null) {
// VMRunnerConfiguration vmConfig = new VMRunnerConfiguration(classToLaunch, classpath);
// ExecutionArguments executionArguments = new ExecutionArguments(vmArgs, prgArgs);
// vmConfig.setVMArguments(executionArguments.getVMArgumentsArray());
// vmConfig.setProgramArguments(executionArguments.getProgramArgumentsArray());
//
// if (bootClasspath.length == 0) {
// vmConfig.setBootClassPath(null); // use default bootclasspath
// } else {
// vmConfig.setBootClassPath(bootClasspath);
// }
//
// vmRunner.run(vmConfig, launch, null);
// }
//
// // Show in debugger
// if (showInDebugger) {
// DebugPlugin.getDefault().getLaunchManager().addLaunch(launch);
// }
}