Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Possible to start with one view, and from there select which views to open?
Possible to start with one view, and from there select which views to open? [message #894565] Mon, 09 July 2012 15:40 Go to next message
Michael Dougherty is currently offline Michael DoughertyFriend
Messages: 8
Registered: July 2012
Junior Member
I'm working on an RCP project...basically I have the core of it working pretty well. It's very simple...it just uses the RCPMail template but changes the two views to match my purpose.

The problem is I would like to actually START with initially just one view that allows the user to select some objects that either chooses what views will be displayed, or allows them to choose to input a file, etc...

Im having trouble figuring out a way to initially bring up one large view, and then hide it and replace it with two others.

Ive tried to change the perspective class, but even commenting out the whole perspective class for some reason doesnt change a thing on the UI, and changing perspective extensions or trying to hide views doesnt work. The two views seem locked into place and I can't figure out how to get them to dissapear. I wanted to have that main view (that the message goes in on the template) initially hidden until you click something on the navigation bar, but all I could get it to do was have a return statement when drawing it that keeps it blank but it still has the tab there. I can't hide it it seems no matter what I try.
Re: Possible to start with one view, and from there select which views to open? [message #894574 is a reply to message #894565] Mon, 09 July 2012 16:30 Go to previous messageGo to next message
John Steele is currently offline John SteeleFriend
Messages: 50
Registered: January 2010
Member
Hi Michael,

The IPerspectiveFactory is not called every time the application is launched. If you desire this functionality you will need to go to your run configuration, and check the clear workspace data option.

The reason for this is because the IPerspectiveFactory is used for the initial layout of the page, so once it's opened and then closed, all the important information about the parts are stored in an XML file (org.eclipse.ui).

I'm not familiar with the mail demo, but if they're hard-coded in the IPerspectiveFactory I would just remove them and add them to the perspective using the perspectiveExtensions. By doing it this way you can easily set the visible flag to false.

See this article for more perspective ideas/thoughts:
www.eclipse.org/articles/using-perspectives/PerspectiveArticle.html

John Steele
Re: Possible to start with one view, and from there select which views to open? [message #894578 is a reply to message #894574] Mon, 09 July 2012 16:48 Go to previous messageGo to next message
Michael Dougherty is currently offline Michael DoughertyFriend
Messages: 8
Registered: July 2012
Junior Member
Can you give me a little more information on how to do this? Because I thought I tried...I did add them as perspective extensions and though I set visibility to false, it didn't seem to change anything it still showed up. I'm not sure if there is something else that I'm missing?
Re: Possible to start with one view, and from there select which views to open? [message #894601 is a reply to message #894578] Mon, 09 July 2012 19:23 Go to previous message
John Steele is currently offline John SteeleFriend
Messages: 50
Registered: January 2010
Member
Right-click on the project's plugin.xml file and select "Run As" -> "Run Configurations..."

From there you should see the launch configuration on the left, and to the right you should see a check box in the Workspace Data group. Check clear workspace.

That will force it to consult with the IPerspectiveFactory on every start-up.
Previous Topic:How to minimize or drag editors and views in a folder, Eclipse 4.2
Next Topic:Attempted to nest write lock inside a read or write
Goto Forum:
  


Current Time: Sat Feb 24 10:49:22 GMT 2024

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

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

Back to the top