diff options
author | Dani Megert | 2003-09-25 10:37:44 +0000 |
---|---|---|
committer | Dani Megert | 2003-09-25 10:37:44 +0000 |
commit | 7e5c0daaf32125ac63063dc06105e4e44916ccf3 (patch) | |
tree | f1fd0d473cdd37619666c4ce7a998cc9629da0bf /org.eclipse.ui.workbench.texteditor | |
parent | 03bc421801cdd231dbff01698231de40d82f81f4 (diff) | |
download | eclipse.platform.text-7e5c0daaf32125ac63063dc06105e4e44916ccf3.tar.gz eclipse.platform.text-7e5c0daaf32125ac63063dc06105e4e44916ccf3.tar.xz eclipse.platform.text-7e5c0daaf32125ac63063dc06105e4e44916ccf3.zip |
Fixed bug 36296: [implementation] AbstractTextEditor.internalInit should handle InvocationTargetException
Diffstat (limited to 'org.eclipse.ui.workbench.texteditor')
2 files changed, 7 insertions, 2 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java index 06bdbb69a59..6f9462285b9 100644 --- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java +++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java @@ -1998,10 +1998,14 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit try { IRunnableContext context= (window instanceof IRunnableContext) ? (IRunnableContext) window : new ProgressMonitorDialog(window.getShell()); context.run(false, true, runnable); - } catch (InvocationTargetException x) { } catch (InterruptedException x) { + } catch (InvocationTargetException x) { + Throwable t= x.getTargetException(); + if (t instanceof CoreException) + exceptions[0]= new PartInitException(((CoreException)t).getStatus()); + else + exceptions[0]= new PartInitException(new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, EditorMessages.getString("Editor.error.init"), t)); //$NON-NLS-1$ } - if (exceptions[0] != null) throw exceptions[0]; } diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties index 042b0a30c0c..dbe85a4b7be 100644 --- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties +++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties @@ -20,6 +20,7 @@ Editor.error.save.message=Save could not be completed. Editor.error.save.deleted.title=Cannot Save Editor.error.save.deleted.message=The file has been deleted. +Editor.error.init= Editor could not be initialized. Editor.error.save.outofsync.title=Update conflict Editor.error.save.outofsync.message=The file has been changed on the file system. Do you want to overwrite the changes? |