本文整理汇总了Java中org.eclipse.jdt.launching.IVMRunner类的典型用法代码示例。如果您正苦于以下问题:Java IVMRunner类的具体用法?Java IVMRunner怎么用?Java IVMRunner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IVMRunner类属于org.eclipse.jdt.launching包,在下文中一共展示了IVMRunner类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getVMRunner
import org.eclipse.jdt.launching.IVMRunner; //导入依赖的package包/类
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: runVM
import org.eclipse.jdt.launching.IVMRunner; //导入依赖的package包/类
/**
* @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);
}
}
示例3: getVMRunner
import org.eclipse.jdt.launching.IVMRunner; //导入依赖的package包/类
@Override
public IVMRunner getVMRunner(final ILaunchConfiguration configuration, final String mode) throws CoreException {
if(ILaunchManager.PROFILE_MODE.equals(mode)) {
// TODO: Figure out how to setup profiling
return super.getVMRunner(configuration, ILaunchManager.RUN_MODE);
}
return super.getVMRunner(configuration, mode);
}
示例4: getVMRunner
import org.eclipse.jdt.launching.IVMRunner; //导入依赖的package包/类
@Override
public IVMRunner getVMRunner(final ILaunchConfiguration configuration, final String mode)
throws CoreException
{
final IJiveLaunchFactory factory = LaunchFactory.createFactory(configuration);
// if (factory == null) {
// factory = new JavaApplicationLaunchFactory();
// LaunchFactory.registerFactory(configuration.getType(), factory);
// }
return factory.createVMRunner(mode, VMHelper.createLauncher(configuration));
}
示例5: createVMRunner
import org.eclipse.jdt.launching.IVMRunner; //导入依赖的package包/类
@Override
public final IVMRunner createVMRunner(final String mode, final IVMInstall subject)
{
if (ILaunchManager.DEBUG_MODE.equals(mode))
{
return new JiveVMDebugger(subject);
}
throw new IllegalStateException("JIVE must be used in debug mode.");
}
示例6: ReportDebuggerVMRunner
import org.eclipse.jdt.launching.IVMRunner; //导入依赖的package包/类
ReportDebuggerVMRunner( IVMRunner delegate, boolean runScript,
ReportOSGiLaunchDelegate config )
{
this.delegate = delegate;
this.runScript = runScript;
this.config = config;
}
示例7: getVMRunner
import org.eclipse.jdt.launching.IVMRunner; //导入依赖的package包/类
public IVMRunner getVMRunner(String mode) {
if (ILaunchManager.RUN_MODE.equals(mode)) {
return new HyVMRunner(this);
} else if (ILaunchManager.DEBUG_MODE.equals(mode)) {
return new HyDebugVMRunner(this);
}
return null;
}
示例8: getVMRunner
import org.eclipse.jdt.launching.IVMRunner; //导入依赖的package包/类
public IVMRunner getVMRunner( ILaunchConfiguration configuration,
String mode ) throws CoreException
{
IVMInstall vm = verifyVMInstall( configuration );
return new StandardScriptVMRunner( vm, this );
}
示例9: JUnitLauncher
import org.eclipse.jdt.launching.IVMRunner; //导入依赖的package包/类
JUnitLauncher(IVMRunner runner) {
this.runner = runner;
}
示例10: getVMRunner
import org.eclipse.jdt.launching.IVMRunner; //导入依赖的package包/类
@Override
public IVMRunner getVMRunner(ILaunchConfiguration configuration, String mode) throws CoreException {
return runner;
}
示例11: getVMRunner
import org.eclipse.jdt.launching.IVMRunner; //导入依赖的package包/类
/**
* Returns a VM runner that runs this installed VM with JIVE debugging enabled if the given mode
* is <code>org.eclipse.debug.core.ILaunchManager.DEBUG_MODE</code>. Otherwise, an exception is
* thrown.
*
* @param mode
* the mode the VM should be launched in; only
* <code>org.eclipse.debug.core.ILaunchManager.DEBUG_MODE</code> is applicable
* @return a VM runner used to debug with JIVE enabled
* @throws IllegalStateException
* if a mode other than <code>org.eclipse.debug.core.ILaunchManager.DEBUG_MODE</code> is
* supplied
* @see org.eclipse.jdt.launching.IVMInstall#getVMRunner(java.lang.String)
* @see org.eclipse.debug.core.ILaunchManager.DEBUG_MODE
*/
@Override
public IVMRunner getVMRunner(final String mode)
{
if (ILaunchManager.DEBUG_MODE.equals(mode))
{
return new JiveVMDebugger(this);
}
throw new IllegalStateException("JIVE must be used in debug mode.");
}
示例12: createVMRunner
import org.eclipse.jdt.launching.IVMRunner; //导入依赖的package包/类
public IVMRunner createVMRunner(final String mode, final IVMInstall subject);