Skip to main content



      Home
Home » Newcomers » Newcomers » Closing eclipse without clicking close button?
Closing eclipse without clicking close button? [message #270244] Mon, 13 April 2009 08:50 Go to next message
Eclipse UserFriend
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?

Thanks in advance.
Re: Closing eclipse without clicking close button? [message #270251 is a reply to message #270244] Mon, 13 April 2009 13:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

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();
}
}
});
}
Re: Closing eclipse without clicking close button? [message #270265 is a reply to message #270251] Tue, 14 April 2009 05:36 Go to previous message
Eclipse UserFriend
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();
> }
> }
> });
> }
Previous Topic:Find References > Next
Next Topic:Distributing Eclipse preconfigured...
Goto Forum:
  


Current Time: Tue Jun 10 20:36:06 EDT 2025

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

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

Back to the top