本文整理匯總了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);
// }
}