title: org.eclipse.ui.startup in use with WindowListener - first activation not caught
body: <p>Greetings fellow Stackoverflowians,</p>
  
  <p>I am developing an Eclipse RCP application, and I want to add a listener to the <code>ProjectExplorer</code> Eclipse View, and this listener needs to be added before the user does anything, but after the GUI has been generated.
  Right on startup, though, the <code>PlatformUI.getWorkbench().getActiveWorkbenchWindow()</code> returns <code>null</code> (d'oh, the window isn't activated) so therefore I add to the already created <code>Workbench</code> a <code>WindowListener</code></p>
  
  <pre><code>PlatformUI.getWorkbench().addWindowListener(new IWindowListener() {
              @Override
              public void windowActivated(IWorkbenchWindow activatedWindow) {
                  //do stuff here
                  }
              }
              @Override
              public void windowClosed(IWorkbenchWindow arg0) {
                  //remove stuff here
              }
              @Override
              public void windowDeactivated(IWorkbenchWindow arg0) {
                  // stub
              }
              @Override
              public void windowOpened(IWorkbenchWindow arg0) {
                  //stub
              }
          });
  </code></pre>
  
  <p>Now the problem that I've come across is that even though the <code>ActiveWorkbenchWindow</code> is populated, the <code>windowActivated()</code> method from the <code>WindowListener</code> is not called :(</p>
  
  <p>Funnily enough, when I click on another window, then I click back on the application window, the <code>windowActivated()</code> method is called... therefore the listener was indeed registered.</p>
  
  <p>Any help and suggestions are appreciated!</p>