Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » restore perspective view(window menu doesn't work)
restore perspective view [message #652326] Thu, 03 February 2011 10:24 Go to next message
Eclipse UserFriend
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 10:24] by Moderator

Re: restore perspective view [message #653179 is a reply to message #652326] Tue, 08 February 2011 13:37 Go to previous messageGo to next message
Eclipse UserFriend
It shouldn't be an hard task... every rcp must provide a way to reopen a view closed.
Is it possible that this problem afflict only me? Anyone can help?
Re: restore perspective view [message #653553 is a reply to message #653179] Thu, 10 February 2011 03:54 Go to previous messageGo to next message
Eclipse UserFriend
hi , i have some codes ,hope these can help you. Razz

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! Razz

[Updated on: Thu, 10 February 2011 03:55] by Moderator

Re: restore perspective view [message #653672 is a reply to message #653553] Thu, 10 February 2011 11:14 Go to previous message
Eclipse UserFriend
thanks Binary, finally I managed to do that!
It's strange that the show view menu isn't already included in rcp by default
Previous Topic:tabbed view not working
Next Topic:remove default menu entry (like 'open file')
Goto Forum:
  


Current Time: Mon Jul 28 11:36:22 EDT 2025

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

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

Back to the top