Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Open View via Context Menu
icon5.gif  Open View via Context Menu [message #631696] Fri, 08 October 2010 09:49 Go to next message
Eclipse UserFriend
Hi,

following situation: I created a new view "myView". I also created a corresponding action "showMyView" (objectContribution over org.eclipse.ui.popupMenus-ExtensionPoint).

I would like to know how to automatically display "myView" after clicking the "showMyView"-action (so NOT over Window -> Show View -> Other... -> MyView).

Thanks in advance and best regards,
stoehm Smile
Re: Open View via Context Menu [message #631722 is a reply to message #631696] Fri, 08 October 2010 10:25 Go to previous message
Eclipse UserFriend
Hi stoehm,

you can use
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().showView( "view-id");
to open a view programmatically.

Cheers Adrian
Previous Topic:Showing actions in PopupMenu only in special cases
Next Topic:Changing visibility of the toolbar items in IViewPart
Goto Forum:
  


Current Time: Sun Jul 06 11:51:17 EDT 2025

Powered by FUDForum. Page generated in 0.02490 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top