I’m developing a plug-in in Eclipse and I want to show a view. I’m using this:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.ui.articles.MyView");
however it’s being added on the right not at the set of views where I want it to be displayed.
How can I specify the location?
Ok found out how.
This gave me the idea of what I should do: http://www.eclipse.org/articles/viewArticle/ViewArticle2.html in the View Position paragraph under the Step 3 section.
When declaring the perspective, I added a placeholder to contain the view. It is shown in the following code:
Later on, I use:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.ui.articles.MyView")to show the view and it appears where I had declared in the Perspective and not at the default right-hand side.
Hope it could help someone else.
Thanks and regards,
Krt_Malta