title: Eclipse Plug-in:Focus lost after activating a view via (controlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE));
body: <p>I have a view which is initialised via OleControlSite and invoked via OleAutomation. It is actually a media player which I call in a view after user right clicks the file and calls Play in the context menu. Whenever I play a file by first right clicking and calling Play, it plays absolutely fine.  The problem is when user displays the view before doing a right click(Window->Show View->Other->MyView) and then tries to do a right click and Play, at this point of time ISelection returns null and hence nothing plays. </p>
  
  <pre><code> IWorkbenchPage iwPage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
               ISelection selection=iwPage.getSelection();
  </code></pre>
  
  <p>The problem is the selections somehow loses focus if the view has been invoked in the fashion described.</p>
  
  <p>This is how the view is initialised when the plugin is loaded</p>
  
  <pre><code>public void createPartControl(Composite parent) {
          frame = new OleFrame(parent, SWT.APPLICATION_MODAL);
          //      OleControlSite controlSite;
          try {
              controlSite = new OleControlSite(frame, SWT.APPLICATION_MODAL,"WMPlayer.OCX.7");
              controlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);           
              oleAutomation = new OleAutomation(controlSite);
              makeActions();
              fillActionBars();           
  
          } catch (SWTException ex) {
  
              MessageBox box = new MessageBox(getSite().getShell(),SWT.ICON_INFORMATION);         
              box.setMessage("Failed to Initialise Media Player.");
              box.setText("Error");
              box.open();                     
              ex.printStackTrace();
              return;
          }
      }
  </code></pre>
  
  <p>Is there a way where we can force the focus to the Project Explorer where the current file is selected ?</p>