Eclipse – Programmatically showing a View from an Eclipse Plug-in

eclipseeclipse-pdeeclipse-plugineclipse-rcprcp

I have a plug-in to an Eclipse RCP application that has a view. After an event occurs in the RCP application, the plug-in is instantiated, its methods are called to populate the plug-in's model, but I cannot find how to make the view appear without going to the "Show View…" menu.

I would think that there would be something in the workbench singleton that could handle this, but I have not found out how anywhere.

Best Solution

You are probably looking for this:

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("viewId");