Project: Eclipse_Platform_UI
Bug 104900 [WorkbenchParts] it appears as though there is either unnecessary code or a resource cleanup bug in the editor loading code
Reported: 2005-07-22 18:06:51 | Status: verified fixed

Hi there, I noticed a possible problem in the editor part creation code. My observation is that it seems likely to be one of the following - there is a resource cleanup bug - there is unnecessary code It should be easy to see and verify from code inspection and a bit of debugging. package: org.eclipse.ui.internal class: EditorReference method: createPartHelper The code to look at are these lines: IEditorPart initializedPart = null; ... if (initializedPart != null) { try { initializedPart.dispose(); } catch (RuntimeException re) { WorkbenchPlugin.log(re); } } initializedPart is never initialized to anything other than null, so the second part of the code is never executed. It looks as though the intention was to clean up (dispose) the editor part in the even of an exception - look for the "IEditorPart part;" code. Perhaps "part" and "initializedPart" need to be reconciled. Thanks

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java