1 /*******************************************************************************
2 * Copyright (c) 2013, 2015 Association for Decentralized Information Management in
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
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 * Semantum Oy - adaption to SCLModuleEditor/TextEditor
12 *******************************************************************************/
13 package org.simantics.modeling.ui.componentTypeEditor;
15 import org.eclipse.swt.widgets.Display;
16 import org.eclipse.ui.PlatformUI;
17 import org.simantics.scl.ui.editor.SCLSourceViewerConfigurationNew;
18 import org.simantics.scl.ui.editor.SharedTextColorsNew;
21 * @author Antti Villberg
23 public class SymbolCodeEditor extends SCLModuleEditor {
25 public SymbolCodeEditor() {
30 protected void preInitialize() {
31 Display display = PlatformUI.getWorkbench().getDisplay();
32 SCLSourceViewerConfigurationNew sourceViewerConfiguration = new SCLSourceViewerConfigurationNew(resourceManager);
33 setDocumentProvider(new SymbolCodeDocumentProvider2(sourceViewerConfiguration, display, this));
34 setSourceViewerConfiguration(sourceViewerConfiguration);