| Summary: | Deleting projects causes editor error instead of close | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Paul Webster <pwebster> | ||||
| Component: | UI | Assignee: | Platform-UI-Inbox <Platform-UI-Inbox> | ||||
| Status: | RESOLVED DUPLICATE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | daniel_megert, markus.kell.r | ||||
| Version: | 3.5 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
I can reproduce with I20081211-1908, but only when I - open multiple editors from a project (stacked) - restart the workbench (only top-most editor is materialized) - delete the project (including content on disk) Similar scenario on startup when an editor's file has gone: Bug 180452. Paul, does the workbench have a story for how editors should behave when their input is not valid? We currently throw a PartInitException in AbstractTextEditor.internalInit(..), and EditorReference.createPart() line: 463 writes it to the log. For fully created editors, we just close them when the file buffer gets deleted, but for not-yet restored editors, I don't see a hook for us to do this. My favorite solution would be that the workbench uses IEditorInput.exists() to check if the input of the editor to be restored still exists. If it doesn't, just close the editor, or open an error editor that tells what really happened, instead of writing an exception to the log and to the Details>> area in the editor. (In reply to comment #1) > For fully created editors, we just close them when the file buffer gets > deleted, but for not-yet restored editors, I don't see a hook for us to do > this. This might be a Platform UI problem then. I don't think we handle that gracefully (and the client code has not yet been instantiated, so it's not their problem). PW *** This bug has been marked as a duplicate of bug 186977 *** |
Created attachment 120205 [details] Error in the error log I had about 8 projects in my workspace, and a couple of java editors open. I selected all the projects and did a delete (delete content on disk). The Java editor replaced its content with "Error" content, i.e. the file is not found. and none of the editors closed. PW