Project: Eclipse_Platform_UI
Bug 87468 Improve the workbench handling of part exceptions
Reported: 2005-03-09 00:07:05 | Status: verified fixed

The current part initialization code does not handle exceptions thrown from views and editors well. This PR requests the following: 1. An exception thrown from any method in a part's API should never put the workbench in an invalid state. 2. IWorkbenchParts must not be added to the workbench page or returned from an IWorkbenchPartReference until they are fully initialized. 3. When logged, all exceptions must include a stack trace. If there is a wrapper exception (CoreException, PartInitException, etc.), the stack trace for the most specific cause must be logged. 4. There should only be one code path for initializing a part. 5. Part exceptions must not open modal dialogs. Exceptions during initialization cause an error part to open, and exceptions during shutdown should be logged without interrupting the user.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI Components/org/eclipse/ui/components/ComponentException.java bundles/org.eclipse.ui.workbench/Eclipse UI Components/org/eclipse/ui/internal/components/ComponentMessages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorAreaHelper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorPane.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ErrorEditorPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ErrorViewPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/LayoutHelper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/MultiEditorOuterPane.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartPane.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Perspective.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewFactory.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPane.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewSite.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/StatusUtil.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/ErrorPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/NewPartToOldWrapper.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/StatusPart.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/multiplexer/NestedContext.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/newapi/PresentablePartFolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/PresentablePartFolder.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorDescriptor.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ThemeRegistryReader.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/UIJob.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/EditorWithCreateControlsException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/EditorWithDisposeException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/EditorWithInitException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/EditorWithInitRuntimeException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/ViewWithCreateControlsException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/ViewWithDisposeException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/ViewWithInitException.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api/workbenchpart/ViewWithInitRuntimeException.java