Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Open View via Context Menu
icon5.gif  Open View via Context Menu [message #631696] Fri, 08 October 2010 13:49 Go to next message
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
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 14:25 Go to previous message
staudta is currently offline staudtaFriend
Messages: 17
Registered: August 2010
Junior Member
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: Thu Apr 25 08:30:40 GMT 2024

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

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

Back to the top