How to use Message ToolWindow

Hi,

i want to know, how can I use the IDEA-ToolWindow Message in my plugin to show "logs" (in text mode) during an action.

If I use
ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.MESSAGES_WINDOW)
only a ToolWindowImpl is returned.
What is the implementation of the Messages ToolWindow?

But I can't find another way to get the right ToolWindow.

6 comments
Comment actions Permalink

Hello pheck,

Since the Messages toolwindow displays a tree rather than plain text, if
you want to display text, you should rather create your own toolwindow and
put a text console in it.

The Messages view is not accessible through OpenAPI.

i want to know, how can I use the IDEA-ToolWindow Message in my plugin
to show "logs" (in text mode) during an action.

If I use
ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.MESS
AGES_WINDOW)
only a ToolWindowImpl is returned.
What is the implementation of the Messages ToolWindow?
But I can't find another way to get the right ToolWindow.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Is there perhaps another way to print messages in IDEA.
My Plugin uses a thread to run an ant build-script. And I want the user let know what ant has done and when it's finished

0
Comment actions Permalink

Hello pheck,

Is there perhaps another way to print messages in IDEA.


As I've said, you should create your own toolwindow, and either put an IDEA
console in it (created using TextConsoleBuilderFactory.createBuilder(project).getConsole()),
or use a regular Swing component to display messages.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

I was also wondering if it was possible to add actions to a ConsoleView inside a toolwindow so they have the same l&f as all the IntelliJ toolwindow toolbars. I tried using a custom swing component with a toolbar added to it, but that looks completely different which makes me think there has to be another way to achieve this :)

0
Comment actions Permalink

I'm not sure if I'm answering the correct question, but here are the steps to get a toolbar with IDEA l&f:

AnAction action1 = ...;
AnAction action2 = ...;
AnAction action3 = ...;
DefaultActionGroup group = new DefaultActionGroup();
group.add(action1);
group.add(action2);
group.add(action3);
JComponent toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, false).getComponent();

0
Comment actions Permalink

That's at least part of what I wanted to know :)
Thanks a bunch!

Edited by: Guy Mahieu on Oct 31, 2008 8:07 AM

0

Please sign in to leave a comment.