Eclipse RCP: open a view via standard command org.eclipse.ui.handlers.ShowViewHandler

Eclipse provides the standard command org.eclipse.ui.views.showView to open an arbitrary view. The default handler is org.eclipse.ui.handlers.ShowViewHandler. This handler is a nice example how you could add your own command with arguments. It takes two parameters. The first has the ID org.eclipse.ui.views.showView.viewId and identifies the view ID which should be opened, the next one has the ID org.eclipse.ui.views.showView.makeFast and determines if the view should be open as a fast view. Without parameters the command will let the user choose which view to open.

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences, He is the primary author of vogella.com. With more than one million visitors per month this website is one of the central sources for Java, Eclipse and Android programming information.
This entry was posted in Eclipse. Bookmark the permalink.