Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » WorkbenchAdvisor in an RCP e4 Application
WorkbenchAdvisor in an RCP e4 Application [message #870271] Mon, 07 May 2012 14:31 Go to next message
Fausto Telia is currently offline Fausto TeliaFriend
Messages: 8
Registered: May 2012
Junior Member
I'm moving an RCP 3.x application to the new RCP e4 application Platform.
Can anyone give me an idea where in an RCP e4 Appl I may implement the functions
that are implemented in methods such as preStartup() and postStartup() of the WorkbenchAdvisor of RCP 3.x?

Thanks
Fausto
Re: WorkbenchAdvisor in an RCP e4 Application [message #870277 is a reply to message #870271] Mon, 07 May 2012 14:42 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
The preStartup can be implemented using a so called lifecycle component.
See http://www.vogella.com/articles/Eclipse4RCP/article.html#lifecycle

There's no real postStartup yet I think - the only thing I can think of
is to listen to the eventbus for rendering events - we need to take a
look at this stuff in 4.3.

Tom

Am 07.05.12 16:31, schrieb Fausto Telia:
> I'm moving an RCP 3.x application to the new RCP e4 application Platform.
> Can anyone give me an idea where in an RCP e4 Appl I may implement the
> functions
> that are implemented in methods such as preStartup() and postStartup()
> of the WorkbenchAdvisor of RCP 3.x?
>
> Thanks Fausto
Re: WorkbenchAdvisor in an RCP e4 Application [message #870448 is a reply to message #870271] Tue, 08 May 2012 09:45 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot CelaFriend
Messages: 597
Registered: December 2010
Senior Member

There is this https://bugs.eclipse.org/bugs/show_bug.cgi?id=376821 which may be relevant in relation to an event or annotation which marks the finishing of the startup of the application.
Re: WorkbenchAdvisor in an RCP e4 Application [message #870470 is a reply to message #870448] Tue, 08 May 2012 11:29 Go to previous messageGo to next message
Fausto Telia is currently offline Fausto TeliaFriend
Messages: 8
Registered: May 2012
Junior Member
I do not understand which one of the two options (event or annotation) in order to implement a postStartup function will be implemented.
And when.

One more question:
In any of the lifeCycle hooks when the application starts (PostContextCreate, ProcessAdditions) is there any clean way to CLOSE the application?

The use case could be the following: I can use these lifeCycle hooks to create a login screen. If login is not correct the application should not start.

Fausto
Re: WorkbenchAdvisor in an RCP e4 Application [message #870478 is a reply to message #870470] Tue, 08 May 2012 11:39 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot CelaFriend
Messages: 597
Registered: December 2010
Senior Member

Fausto Telia wrote on Tue, 08 May 2012 14:29
I do not understand which one of the two options (event or annotation) in order to implement a postStartup function will be implemented.
And when.

I believe it is targeted for 4.3. As to which one it is not my call to make. I submitted patches for both ways and as I far as I have tested they work. The committers will decide which one (if any) to accept.
Re: WorkbenchAdvisor in an RCP e4 Application [message #870484 is a reply to message #870470] Tue, 08 May 2012 11:58 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
Am 08.05.12 13:30, schrieb Fausto Telia:
> I do not understand which one of the two options (event or annotation)
> in order to implement a postStartup function will be implemented.
> And when.
>
> One more question:
> In any of the lifeCycle hooks when the application starts
> (PostContextCreate, ProcessAdditions) is there any clean way to CLOSE
> the application?
> The use case could be the following: I can use these lifeCycle hooks to
> create a login screen. If login is not correct the application should
> not start.
>

Not yet. I think the only option then is to call System.exit(). The best
solution IMHO would be if we'd allow the lifecycle hooks which we check
and stop the launching of the framework.

Would you mind filing a bug for this.

Tom
Re: WorkbenchAdvisor in an RCP e4 Application [message #870653 is a reply to message #870484] Wed, 09 May 2012 08:50 Go to previous message
Fausto Telia is currently offline Fausto TeliaFriend
Messages: 8
Registered: May 2012
Junior Member
Tom, I have submitted bug 378939.
Thanks
fausto
Previous Topic:Edit a part context with an handler
Next Topic:Using Factories in Class URI for Parts
Goto Forum:
  


Current Time: Sat Dec 20 23:52:12 GMT 2014

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

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