restore perspective view [message #652326] |
Thu, 03 February 2011 15:24 |
daniele Mising name Messages: 48 Registered: July 2009 |
Member |
|
|
Hi! I have a problem with my rcp. The menu 'window' let me choose only 'open in new window'. There aren't the other view: the default ones (properties, outline) neither custom ones.
If I close a view, there is no way to reopen it.
What can be the solution? thank you
[Updated on: Thu, 03 February 2011 15:24] Report message to a moderator
|
|
|
|
Re: restore perspective view [message #653553 is a reply to message #653179] |
Thu, 10 February 2011 08:54 |
|
hi , i have some codes ,hope these can help you.
open your XXXActionBarAdvisor.java file,
add two instance viariables :
private IContributionItem showViewList;
private IContributionItem showViewShortList;
in makeActions() method ,add:
showViewList = ContributionItemFactory.VIEWS_SHOW_IN.create(window);
showViewShortList = ContributionItemFactory.VIEWS_SHORTLIST
.create(window);
in your fillMenuBar() method ,
find
IMenuManager menuX = new MenuManager( Messages.ApplicationMenuName_Window,IWorkbenchActionConstants.M_WINDOW);
after it,you can add:
IMenuManager showViewMenu = new MenuManager("Open View(&V)",IWorkbenchActionConstants.SHOW_EXT);
showViewMenu.add(showViewList);
showViewMenu.add(showViewShortList);
menuX.add(showViewMenu);
you can try it, and good luck for you!
[Updated on: Thu, 10 February 2011 08:55] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.01399 seconds