當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。