Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » restore perspective view(window menu doesn't work)
restore perspective view [message #652326] Thu, 03 February 2011 15:24 Go to next message
daniele Mising name is currently offline daniele Mising nameFriend
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 #653179 is a reply to message #652326] Tue, 08 February 2011 18:37 Go to previous messageGo to next message
daniele Mising name is currently offline daniele Mising nameFriend
Messages: 48
Registered: July 2009
Member
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 08:54 Go to previous messageGo to next message
Binary is currently offline BinaryFriend
Messages: 4
Registered: November 2010
Location: Beijing,China
Junior Member
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 08:55]

Report message to a moderator

Re: restore perspective view [message #653672 is a reply to message #653553] Thu, 10 February 2011 16:14 Go to previous message
daniele Mising name is currently offline daniele Mising nameFriend
Messages: 48
Registered: July 2009
Member
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: Sat Feb 27 11:02:21 GMT 2021

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

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

Back to the top