]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fix to problems with outline view and SCL script editor. 22/3122/1
authorReino Ruusu <reino.ruusu@semantum.fi>
Tue, 20 Aug 2019 11:43:21 +0000 (14:43 +0300)
committerReino Ruusu <reino.ruusu@semantum.fi>
Tue, 20 Aug 2019 11:43:21 +0000 (14:43 +0300)
gitlab #349

Change-Id: I93556f95471f63b8cc26d67d1e4daca48e32d062

bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/scl/scriptEditor/SCLScriptEditor.java

index 253b697b9e37e9c6fde5fdaec3ba1e16de6457e5..5f3bf352be0b1471e65737e818473c20e9d430e1 100644 (file)
@@ -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> T getAdapter(Class<T> adapter) {
+        // No outline view for scripts
+        if (IContentOutlinePage.class.equals(adapter)) {
+            return null;
+        }
+        
+        return super.getAdapter(adapter);
+    }
 
 }