|
|
Re: Closing eclipse without clicking close button? [message #270265 is a reply to message #270251] |
Tue, 14 April 2009 05:36  |
Eclipse User |
|
|
|
Thanks alot Eric..It worked.
Eric Rizzo wrote:
> On 4/13/2009 8:50 AM, ankit baphna wrote:
>> Hi all,
>>
>> How can I close eclipse without clicking on the close button or closing
>> it from task manager? Is there any function which I can call from my
>> program to close the eclipse?
> Something like this should do it:
> final IWorkbench workbench = PlatformUI.getWorkbench();
> if (workbench != null) {
> final Display display = workbench.getDisplay();
> display.asyncExec(new Runnable() {
> public void run() {
> if (!display.isDisposed()) {
> workbench.close();
> }
> }
> });
> }
|
|
|
Powered by
FUDForum. Page generated in 0.10415 seconds