Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » how to restart an RCP application?
how to restart an RCP application? [message #522615] Tue, 23 March 2010 07:30 Go to next message
Bonny Fog is currently offline Bonny Fog
Messages: 11
Registered: August 2009
Junior Member
hello
I need my RCP application to be restarted after doing some operation. Can anybody help me on this?

Thanks
Re: how to restart an RCP application? [message #522621 is a reply to message #522615] Tue, 23 March 2010 03:00 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
On 23.03.2010 12:30, Bonny Fog wrote:
> hello
> I need my RCP application to be restarted after doing some operation.
> Can anybody help me on this?

1) Your IApplication implementation has to switch on the return value of
the created workbench:

return (returnCode == PlatformUI.RETURN_RESTART) ?
IApplication.EXIT_RESTART
: IApplication.EXIT_OK;

2) Call

IWorkbench wb = PlatformUI.getWorkbench();
wb.restart();

(The function returns a boolean that reports the success of this attempt)

HTH & Greetings from Bremen,

Daniel Krügler
Re: how to restart an RCP application? [message #522626 is a reply to message #522615] Tue, 23 March 2010 07:56 Go to previous messageGo to next message
Ken is currently offline Ken
Messages: 36
Registered: July 2009
Member
PlatformUI.getWorkbench().restart();

- Ken

"Bonny Fog" <BonnyFog@gmail.com> wrote in message
news:hoa8pc$1tg$1@build.eclipse.org...
> hello
> I need my RCP application to be restarted after doing some operation. Can
> anybody help me on this?
>
> Thanks
Re: how to restart an RCP application? [message #522826 is a reply to message #522615] Wed, 24 March 2010 00:19 Go to previous message
Bonny Fog is currently offline Bonny Fog
Messages: 11
Registered: August 2009
Junior Member
Thanks Daniel and Ken.
That is what I need.
Previous Topic:How to re-arrange Table Columns programatically
Next Topic:How to set the number of visible rows in Table?
Goto Forum:
  


Current Time: Thu Apr 17 05:54:11 EDT 2014

Powered by FUDForum. Page generated in 0.09380 seconds