Putting messages into console window?

I'm writing a plugin that launches a file in FireFox. I then want to pipe the console output of FireFox to the console window in Intellij.

1. How can I open/close the console window.
2. How can I pipe std out of a process to the console window.
3. Is there anyway I can put my own messages into the console window.

Any help would be much appreciated...

2 comments

This is how far I managed to get:
Execute the browser:

GeneralCommandLine cl = new GeneralCommandLine();
cl.setExePath(mozPath);
cl.addParameter(path);
try {
browserProcess = new DefaultJavaProcessHandler(cl);
} catch (ExecutionException e) {
e.printStackTrace();
}

Now I need to hook this process' output to a console.
Any ideas?

0

You can create a ConsoleView instance which is a console window that you want by this way(the project is a com.intellij.openapi.project.Project instance):
TextConsoleBuidlerFactory.getInstance().createBuilder(project).getConsole()

read the define of ConsoleView, there are methods you need.

Message was edited by:
LiXiao

0

Please sign in to leave a comment.