Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2017-08-07 05:05:43 -0400
committerKarsten Thoms2017-09-04 07:37:38 -0400
commitca148024b8db19631e75d7aa6792437b8725a3ac (patch)
treed6255c20c9469a9754b8175f07dd5e2452744f2a /org.eclipse.ui.workbench.texteditor
parent15d0d12802084f3141bfdff8fe9136d1e3d691bb (diff)
downloadeclipse.platform.text-ca148024b8db19631e75d7aa6792437b8725a3ac.tar.gz
eclipse.platform.text-ca148024b8db19631e75d7aa6792437b8725a3ac.tar.xz
eclipse.platform.text-ca148024b8db19631e75d7aa6792437b8725a3ac.zip
Change-Id: Ic8ffc3d7f3a6ed1b62c2a74db8b5fa7973130db8 Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
Diffstat (limited to 'org.eclipse.ui.workbench.texteditor')
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java7
1 files changed, 6 insertions, 1 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 f6b0dd2f1..3b72ef096 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
@@ -193,6 +193,7 @@ import org.eclipse.ui.IWindowListener;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
@@ -5327,7 +5328,11 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
for (int i= 0; i < elements.length; i++) {
IConfigurationElement element= elements[i];
if (TAG_CONTRIBUTION_TYPE.equals(element.getName())) {
- if (!getSite().getId().equals(element.getAttribute("targetID"))) //$NON-NLS-1$
+ IWorkbenchPartSite site = getSite();
+ if (site == null) {
+ return null;
+ }
+ if (!site.getId().equals(element.getAttribute("targetID"))) //$NON-NLS-1$
continue;
IConfigurationElement[] children= element.getChildren("action"); //$NON-NLS-1$

Back to the top