/** * Connects the given stream monitor to a new output stream with the given identifier. * * @param streamMonitor stream monitor * @param streamIdentifier stream identifier * @param activateOnWrite whether the stream should displayed when written to */ @SuppressWarnings("resource") private void connect(IStreamMonitor streamMonitor, String streamIdentifier, boolean activateOnWrite) { IOConsoleOutputStream stream = null; if (fAllocateConsole) { stream = newOutputStream(); Color color = fColorProvider.getColor(streamIdentifier); stream.setColor(color); stream.setActivateOnWrite(activateOnWrite); } synchronized (streamMonitor) { StreamListener listener = new StreamListener(streamIdentifier, streamMonitor, stream); fStreamListeners.add(listener); } }
IOConsoleOutputStream stream = getStream(IDebugUIConstants.ID_STANDARD_OUTPUT_STREAM); if (stream != null) { stream.setActivateOnWrite(activateOnOut); IOConsoleOutputStream stream = getStream(IDebugUIConstants.ID_STANDARD_ERROR_STREAM); if (stream != null) { stream.setActivateOnWrite(activateOnErr);