FAQ How do I make the workbench shutdown?

From Eclipsepedia

Revision as of 00:37, 9 June 2006 by Psylence519.gmail.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

You can force the workbench to exit by calling the close method on IWorkbench. This is the same behavior as would occur if the end user had selected File > Exit. If you want the workbench to close and immediately restart—for example, if a new plug-in has been installed and you have a plug-in that does not support dynamic plug-ins—you can instead call the restart method.

Note that although API exists for exiting and restarting the workbench, this measure is fairly drastic and should not be employed lightly. As support for dynamically installed plug-ins increases, it will become increasingly unacceptable to restart the workbench to install new plug-ins. At the very least, before calling either of these methods, you should prompt the user as to whether he or she want to exit.


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.