Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 127600 - [EditorMgmt] EditorPart.init - if PartInitException is thrown, error message contains extraneous text
Summary: [EditorMgmt] EditorPart.init - if PartInitException is thrown, error message ...
Status: RESOLVED DUPLICATE of bug 90582
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-13 19:06 EST by Chris Lee CLA
Modified: 2008-04-01 21:45 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lee CLA 2006-02-13 19:06:07 EST
We're using an extension to MultiPageEditorPart as an editor.  In trying to handle files that we cannot open (corrupt, invalid, etc), we throw a PartInitException with text useful to the user to signify that initialization failed.

The problem is that prepended to our error message is the text "Unable to create this part due to an internal error.  Reason for the failure:", added in org.eclipse.ui.internal.EditorReference.

Ideally, there should be a mechanism for preventing further initialization and displaying the error message in a dialog rather than a useless error part that the end user cannot do anything useful with (and must close it).  

The only partial workaround this problem has right now is to handle the error completely inside init, then exec a new Runnable to close the editor (since throwing a PartInitException will create a fake editor, or not throwing the exception will create an invalid editor).  There needs to be a way to prevent the editor from even opening.
Comment 1 Michael Van Meekeren CLA 2006-04-21 13:19:12 EDT
Moving Dougs bugs
Comment 2 Tod Creasey CLA 2006-05-01 11:28:02 EDT
Deferring
Comment 3 Chris Lee CLA 2008-04-01 17:59:19 EDT
*ping*
Comment 4 Kim Horne CLA 2008-04-01 21:29:17 EDT
Moving to Boris for consideration.  
Comment 5 Boris Bokowski CLA 2008-04-01 21:45:20 EDT
Looks like a dup of bug 90582 to me. Feel free to reopen if you don't agree.

*** This bug has been marked as a duplicate of bug 90582 ***