I'm writing an eclipse-plugin which creating a new Console. Please see my source code:
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IConsoleView consoleView = (IConsoleView) page.showView(IConsoleConstants.ID_CONSOLE_VIEW);
MessageConsole myConsole = new MessageConsole("CLI", null);
ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] { myConsole });
consoleView.display(myConsole);
MessageConsoleStream stream = myConsole.newMessageStream();
stream.println("Hello World");
The Console "CLI" appeared, but it is not editable by user input. I would like to make user can input directly into the Console by typing in the Console.
And I also want to handle the input but any listener or keybinding.
Anyone know can help me?
Use an
IOConsole
instead!MessageConsole
is basically a read-only version ofIOConsole
.From
MessageConsole.createPage(...)
: