Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Eclipse 4 RCP build tabs immediately
Eclipse 4 RCP build tabs immediately [message #989123] Tue, 04 December 2012 12:26 Go to next message
Daniel Stingl is currently offline Daniel Stingl
Messages: 11
Registered: November 2012
Junior Member
Hi,
i have a problem with my first rcp project on eclipse 4. I started with the vogella tutorial (httx://www.vogella.com/articles/EclipseRCP/article.html) and made a rcp application with 4 windows, using the partsashcontainers. All went well until i wanted one window to have 3 tabs, which i just built by adding parts to the partstack of that window. My problem is now that i have the tabs, but the constructor of the associated classes isn't called on application start, but only when i select the tabs in the application. Is there a way to make all windows/tabs load at application start?

Thanks,
Daniel
Re: Eclipse 4 RCP build tabs immediately [message #989153 is a reply to message #989123] Tue, 04 December 2012 16:26 Go to previous messageGo to next message
John Steele is currently offline John Steele
Messages: 49
Registered: January 2010
Member
That's an interesting inquiry. As you know, one of the big insensitives for adding a view to the plugin.xml is that the view, and it's companion code, are not loaded or instantiated until necessary (lazy).

You could create your own perspective, add views to it, and then set their visibility to true, which will in turn cause them to be created once the perspective is opened.

1) Create a perspective, and add it to the org.eclipse.ui.perspective extension.
2) Create a view, and add it to the org.eclipse.ui.views extension.
3) Add an extension to the org.eclipse.ui.perspectiveExtension associated with the perspective you created.
4) Add the views to it, and set visibility flag to true.

Now, when the perspective is opened all those views will be opened, thus causing the views to be created.
Re: Eclipse 4 RCP build tabs immediately [message #989172 is a reply to message #989123] Tue, 04 December 2012 18:56 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5242
Registered: July 2009
Senior Member
No you can't very easily and the question why, if the part is not yet
shown why should it be created?

Tom

Am 04.12.12 20:38, schrieb Daniel Stingl:
> Hi,
> i have a problem with my first rcp project on eclipse 4. I started with
> the vogella tutorial
> (httx://www.vogella.com/articles/EclipseRCP/article.html) and made a rcp
> application with 4 windows, using the partsashcontainers. All went well
> until i wanted one window to have 3 tabs, which i just built by adding
> parts to the partstack of that window. My problem is now that i have the
> tabs, but the constructor of the associated classes isn't called on
> application start, but only when i select the tabs in the application.
> Is there a way to make all windows/tabs load at application start?
>
> Thanks,
> Daniel
Re: Eclipse 4 RCP build tabs immediately [message #989851 is a reply to message #989172] Sat, 08 December 2012 08:17 Go to previous messageGo to next message
Daniel Stingl is currently offline Daniel Stingl
Messages: 11
Registered: November 2012
Junior Member
Thank u for your help John Steele, I am afraid I was not able to follow those steps accordingly and it didn't work out for me in the end but i guess this would be just a bit to complex at this time for me and I'll better try some easier solutions.
To Thomas Schindl: I wanted my parts to register themselves in a Singleton, so that they could communicate which each other (I am quite sure that there is a better way to do this, but it worked quite well for me this way). Problem now is that I have to be very careful what I check and call at which time, cause it is possible that one part hasn't registered itself yet.

[Updated on: Sat, 08 December 2012 08:17]

Report message to a moderator

Re: Eclipse 4 RCP build tabs immediately [message #989935 is a reply to message #989851] Mon, 10 December 2012 02:28 Go to previous message
sumit singh is currently offline sumit singh
Messages: 129
Registered: October 2012
Location: Bangalore
Senior Member

I think you can take a look for IEventBroker Serviceā€Ž or Eclipse4/RCP/Event Model.

[Updated on: Mon, 10 December 2012 02:29]

Report message to a moderator

Previous Topic:Contributed adapter not available
Next Topic:RCP - CDT integration
Goto Forum:
  


Current Time: Fri Jul 25 09:49:25 EDT 2014

Powered by FUDForum. Page generated in 0.06308 seconds