]> gerrit.simantics Code Review - simantics/platform.git/blob - scl/scriptEditor/SCLScriptEditor.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / scl / scriptEditor / SCLScriptEditor.java
1 /*******************************************************************************
2  * Copyright (c) 2017 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     Semantum Oy - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.modeling.ui.scl.scriptEditor;
13
14 import org.eclipse.swt.widgets.Composite;
15 import org.eclipse.ui.contexts.IContextService;
16 import org.simantics.scl.ui.editor.SCLSourceViewerConfigurationNew;
17 import org.simantics.scl.ui.editor2.SCLModuleEditor2;
18
19 /**
20  * @author Tuukka Lehtonen
21  * @since 1.31.0
22  */
23 public class SCLScriptEditor extends SCLModuleEditor2 {
24
25     public SCLScriptEditor() {
26         super();
27         setDocumentProvider(new SCLScriptEditorDocumentProvider((SCLSourceViewerConfigurationNew) getSourceViewerConfiguration()));
28     }
29
30     @Override
31     public void createPartControl(Composite parent) {
32         super.createPartControl(parent);
33         getSite().getService(IContextService.class).activateContext("org.simantics.modeling.ui.scl.scriptEditor.context");
34     }
35
36 }