Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalyan Prasad Tatavarthi2019-09-03 02:29:29 -0400
committerKalyan Prasad Tatavarthi2019-09-03 02:31:16 -0400
commit20f86e123c7e6fa0950be7a8f87a1a61f2650395 (patch)
tree7321566394162828a7d7ab237689d36b693ede86
parent63c20ef98f0f0fb1f59a255f7344a16f24eb1e1d (diff)
downloadeclipse.platform.text-20f86e123c7e6fa0950be7a8f87a1a61f2650395.tar.gz
eclipse.platform.text-20f86e123c7e6fa0950be7a8f87a1a61f2650395.tar.xz
eclipse.platform.text-20f86e123c7e6fa0950be7a8f87a1a61f2650395.zip
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.java23
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 7b488a357..b3105d2de 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;
+ }
}
/*

Back to the top