title: Open a View in Eclipse Plug-in programmatically
body: <p>I'm new to eclipse plug-in development, and have a little question here.</p>
  
  <p>I want to open a new view by clicking on an object in an editor. Specifically, the object is a link to an image file, that should be opened in an image viewer. For now, I'm using</p>
  
  <pre><code>ImageViewer viewer = (ImageViewer) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(viewer_ID);
  viewer.setSelection(pathToFile);
  </code></pre>
  
  <p>is this how you would normally do it (both opening the view, and getting the image to it), or is there a better way?</p>