title: Add custom console to Eclipse console list
body: <p>Based on this <a href="https://wiki.eclipse.org/FAQ_How_do_I_write_to_the_console_from_a_plug-in%3F" rel="nofollow noreferrer">tutorial</a>, I'm creating an Eclipse plugin which provides a new console, The console is added to the view and I can print messages there, but for some reason it is not added to the consoles list (the dropdown list in the view's corner, see image below).</p>
  
  <p>This is how I'm creating the console:</p>
  
  <pre class="lang-java prettyprint-override"><code>public void createConsole(String name) {
      ConsolePlugin plugin = ConsolePlugin.getDefault();
      IConsoleManager consoleManager = plugin.getConsoleManager();
  
      console = new MessageConsole(name, null);
      consoleManager.addConsoles(new IConsole[]{console});
  }
  </code></pre>
  
  <p>And then I can print messages using this method:</p>
  
  <pre class="lang-java prettyprint-override"><code>public void print(String msg) {
      MessageConsoleStream out = console.newMessageStream();
      out.println(msg);
  }
  </code></pre>
  
  <p>Also I'm using this method to bring the console view to the front:</p>
  
  <pre class="lang-java prettyprint-override"><code>public void bringToFront() {
      try{
          IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
          String id = IConsoleConstants.ID_CONSOLE_VIEW;
          IConsoleView view = (IConsoleView) page.showView(id);
          view.display(console);
      } catch(PartInitException e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/nSyxs.png" alt="enter image description here"></p>
  
  <p>Any suggestions?</p>