当前位置: 首页>>代码示例>>Java>>正文


Java IProcess.getStreamsProxy方法代码示例

本文整理汇总了Java中org.eclipse.debug.core.model.IProcess.getStreamsProxy方法的典型用法代码示例。如果您正苦于以下问题:Java IProcess.getStreamsProxy方法的具体用法?Java IProcess.getStreamsProxy怎么用?Java IProcess.getStreamsProxy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.debug.core.model.IProcess的用法示例。


在下文中一共展示了IProcess.getStreamsProxy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkErrorMessage

import org.eclipse.debug.core.model.IProcess; //导入方法依赖的package包/类
/**
 * Checks and forwards an error from the specified process
 * 
 * @param process
 * @throws CoreException
 */
private void checkErrorMessage( IProcess process ) throws CoreException
{
	IStreamsProxy streamsProxy = process.getStreamsProxy( );
	if ( streamsProxy != null )
	{
		String errorMessage = streamsProxy.getErrorStreamMonitor( )
				.getContents( );
		if ( errorMessage.length( ) == 0 )
		{
			errorMessage = streamsProxy.getOutputStreamMonitor( )
					.getContents( );
		}
		if ( errorMessage.length( ) != 0 )
		{
			abort( errorMessage,
					null,
					IJavaLaunchConfigurationConstants.ERR_VM_LAUNCH_ERROR );
		}
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:27,代码来源:StandardScriptVMRunner.java

示例2: checkErrorMessage

import org.eclipse.debug.core.model.IProcess; //导入方法依赖的package包/类
protected void checkErrorMessage(IProcess process) throws CoreException {
	IStreamsProxy streamsProxy = process.getStreamsProxy();
	if (streamsProxy != null) {
		String errorMessage = streamsProxy.getErrorStreamMonitor()
				.getContents();
		if (errorMessage.length() == 0) {
			errorMessage = streamsProxy.getOutputStreamMonitor()
					.getContents();
		}
		if (errorMessage.length() != 0) {
			abort(errorMessage, null,
					IJavaLaunchConfigurationConstants.ERR_VM_LAUNCH_ERROR);
		}
	}
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:16,代码来源:HyDebugVMRunner.java

示例3: launchChanged

import org.eclipse.debug.core.model.IProcess; //导入方法依赖的package包/类
@Override
public void launchChanged(final ILaunch launch) {
    if (!isKarafLaunch(launch)) {
        return;
    }

    for (final IProcess process : launch.getProcesses()) {
        if (getConsoleDocument(process) != null) {
            continue;
        }

        if (process.getStreamsProxy() == null) {
            continue;
        }

        final String encoding = launch.getAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING);

        final KarafPlatformModel karafPlatform =
                (KarafPlatformModel) launch.getLaunchConfiguration().getAdapter(KarafPlatformModel.class);

        final KarafSshConnectionUrl sshConnectionUrl =
                (KarafSshConnectionUrl) karafPlatform.getAdapter(KarafSshConnectionUrl.class);

        final KarafSshShellConnection.Credentials credentials;

        try {
            final String username =
                    launch.getLaunchConfiguration().getAttribute(KarafLaunchConfigurationConstants.KARAF_REMOTE_CONSOLE_USERNAME, "karaf");
            final String password =
                    launch.getLaunchConfiguration().getAttribute(KarafLaunchConfigurationConstants.KARAF_REMOTE_CONSOLE_PASSWORD, "karaf");

            credentials = new KarafSshShellConnection.Credentials(username, password);
        } catch (final CoreException e) {
            throw new AssertionError(e);
        }

        final KarafRemoteConsole remoteConsole = new KarafRemoteConsole(
                process,
                sshConnectionUrl,
                credentials,
                new ConsoleColorProvider(),
                launch.getLaunchConfiguration().getName(),
                encoding);

        remoteConsole.setAttribute(IDebugUIConstants.ATTR_CONSOLE_PROCESS, process);

        ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{remoteConsole});
    }
}
 
开发者ID:apache,项目名称:karaf-eik,代码行数:50,代码来源:GenericKarafWorkbenchService.java


注:本文中的org.eclipse.debug.core.model.IProcess.getStreamsProxy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。