I'm new to eclipse plug-in development, and have a little question here.
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
ImageViewer viewer = (ImageViewer) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(viewer_ID);
viewer.setSelection(pathToFile);
is this how you would normally do it (both opening the view, and getting the image to it), or is there a better way?