org.eclipse.ui.console.IOConsoleInputStream Java Examples
The following examples show how to use
org.eclipse.ui.console.IOConsoleInputStream.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XdsConsole.java From xds-ide with Eclipse Public License 1.0 | 5 votes |
@Override public IOConsoleInputStream getInputStream() { final IOConsoleInputStream str = super.getInputStream(); Display.getDefault().syncExec(new Runnable(){ @Override public void run() { str.setColor(SharedResourceManager.getColor(ColorStreamType.USER_INPUT.getRgb())); } }); return str; }
Example #2
Source File: TLCProcessJob.java From tlaplus with MIT License | 5 votes |
private static BufferedReader getConsoleReader() { final IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager(); final List<IConsole> tlcConsole = Arrays.asList(consoleManager.getConsoles()).stream() .filter(c -> "TLC-Console".equals(c.getName())).collect(Collectors.toList()); if (!tlcConsole.isEmpty()) { final IConsole iConsole = tlcConsole.get(0); if (iConsole instanceof IOConsole) { IOConsoleInputStream inputStream = ((IOConsole) iConsole).getInputStream(); return new BufferedReader(new InputStreamReader(inputStream)); } } return null; }