diff options
author | Kalyan Prasad Tatavarthi | 2019-09-03 06:29:29 +0000 |
---|---|---|
committer | Kalyan Prasad Tatavarthi | 2019-09-03 06:31:16 +0000 |
commit | 20f86e123c7e6fa0950be7a8f87a1a61f2650395 (patch) | |
tree | 7321566394162828a7d7ab237689d36b693ede86 | |
parent | 63c20ef98f0f0fb1f59a255f7344a16f24eb1e1d (diff) | |
download | eclipse.platform.text-R4_13_maintenance.tar.gz eclipse.platform.text-R4_13_maintenance.tar.xz eclipse.platform.text-R4_13_maintenance.zip |
Bug 550336 - Staging view freezes on commit (NPE inY20190919-0900Y20190916-0900Y20190914-0255Y20190913-0735Y20190912-0900Y20190912-0055Y20190910-0005Y20190909-0900Y20190905-0900Y20190903-1130S4_13_0_RC2aS4_13_0_RC2R4_13I20190916-1045I20190907-1130I20190906-1800I20190906-0940I20190906-0410I20190904-2200I20190904-1805I20190904-0605I20190903-2155I20190903-1800I20190903-1410I20190903-1110I20190903-0605R4_13_maintenance
AbstractTextEditor$TextEditorSavable.isDirty)
Temporary fix to prevent staging view from freezing
Change-Id: If330422f4d655b5d331a6fc7f6c9e4b528dc28fb
Signed-off-by: Kalyan Prasad Tatavarthi <kalyan_prasad@in.ibm.com>
-rw-r--r-- | org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java | 23 |
1 files changed, 21 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 7b488a35762..b3105d2de16 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 @@ -7178,12 +7178,31 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit @Override public void doSave(IProgressMonitor monitor) throws CoreException { - fTextEditor.doSave(monitor); + try { + fTextEditor.doSave(monitor); + } catch (NullPointerException e) { + // This should not happen. Code added to handle the below bug. + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=550336 + Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID); + ILog log = Platform.getLog(bundle); + Status status = new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, null, e); + log.log(status); + } } @Override public boolean isDirty() { - return fTextEditor.isDirty(); + try { + return fTextEditor.isDirty(); + } catch (NullPointerException e) { + // This should not happen. Code added to handle the below bug. + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=550336 + Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID); + ILog log = Platform.getLog(bundle); + Status status = new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, null, e); + log.log(status); + return false; + } } /* |