Why the consoleView didn't work?


I created a simple plugin project and only one action in there:

public class PrintAction extends com.intellij.openapi.actionSystem.AnAction {     private ConsoleView console;     private static ConsoleView createTextConsole(final Project project) {         TextConsoleBuilder builder = TextConsoleBuilderFactory.getInstance().createBuilder(project);         return builder.getConsole();     }     @Override     public void actionPerformed(AnActionEvent anActionEvent) {         if(this.console == null)             this.console = createTextConsole(anActionEvent.getProject());         this.console.print("Hello world", ConsoleViewContentType.NORMAL_OUTPUT);     } }

And the plugin.xml like this:

<action id="taobao.tools.printAction"               text="Print(AutoConfig)" description="Print message">           <add-to-group group-id="BuildMenu" anchor="first"/>       </action>

I run it , and there is no exception, no output , I can't find "Hello World" anywhere!  So, Where is it ? Or is there any bugs in the code up there ?

Thank you all~

Please sign in to leave a comment.