From: Reino Ruusu Date: Tue, 20 Aug 2019 11:43:21 +0000 (+0300) Subject: Fix to problems with outline view and SCL script editor. X-Git-Tag: v1.43.0~136^2~110 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=5b0c7af1c0845daa63a2ab7600a460a6573c6a56;p=simantics%2Fplatform.git Fix to problems with outline view and SCL script editor. gitlab #349 Change-Id: I93556f95471f63b8cc26d67d1e4daca48e32d062 --- diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/scl/scriptEditor/SCLScriptEditor.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/scl/scriptEditor/SCLScriptEditor.java index 253b697b9..5f3bf352b 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/scl/scriptEditor/SCLScriptEditor.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/scl/scriptEditor/SCLScriptEditor.java @@ -13,6 +13,7 @@ package org.simantics.modeling.ui.scl.scriptEditor; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.contexts.IContextService; +import org.eclipse.ui.views.contentoutline.IContentOutlinePage; import org.simantics.scl.ui.editor.SCLSourceViewerConfigurationNew; import org.simantics.scl.ui.editor2.SCLModuleEditor2; @@ -32,5 +33,15 @@ public class SCLScriptEditor extends SCLModuleEditor2 { super.createPartControl(parent); getSite().getService(IContextService.class).activateContext("org.simantics.modeling.ui.scl.scriptEditor.context"); } + + @Override + public T getAdapter(Class adapter) { + // No outline view for scripts + if (IContentOutlinePage.class.equals(adapter)) { + return null; + } + + return super.getAdapter(adapter); + } }