當前位置: 首頁>>代碼示例>>Java>>正文


Java ILaunchManager.DEBUG_MODE屬性代碼示例

本文整理匯總了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 );
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:17,代碼來源:ReportOSGiLaunchDelegate.java

示例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);
    }
}
 
開發者ID:rajendarreddyj,項目名稱:eclipse-weblogic-plugin,代碼行數:52,代碼來源:WeblogicLauncher.java

示例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);
}
 
開發者ID:forcedotcom,項目名稱:idecore,代碼行數:10,代碼來源:RunTestsLaunchConfigurationDelegateTest_unit.java

示例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);
//		}

	}
 
開發者ID:dcendents,項目名稱:sysdeotomcat,代碼行數:41,代碼來源:VMLauncherUtility.java


注:本文中的org.eclipse.debug.core.ILaunchManager.DEBUG_MODE屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。