]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolDropHandlerEditor.java
Fix change of type in component property editor when range is present
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / componentTypeEditor / SymbolDropHandlerEditor.java
1 /*******************************************************************************
2  * Copyright (c) 2013, 2015 Association for Decentralized Information Management in
3  * 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  *     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;
14
15 import org.eclipse.swt.widgets.Display;
16 import org.eclipse.ui.PlatformUI;
17 import org.simantics.scl.ui.editor.SCLSourceViewerConfigurationNew;
18
19 /**
20  * @author Antti Villberg
21  */
22 public class SymbolDropHandlerEditor extends SCLModuleEditor {
23
24     public SymbolDropHandlerEditor() {
25         super();
26     }
27
28     @Override
29     protected void preInitialize() {
30         Display display = PlatformUI.getWorkbench().getDisplay();
31         SCLSourceViewerConfigurationNew sourceViewerConfiguration = new SCLSourceViewerConfigurationNew(resourceManager);
32         setDocumentProvider(new SymbolDropHandlerDocumentProvider(sourceViewerConfiguration, display, this));
33         setSourceViewerConfiguration(sourceViewerConfiguration);
34         
35     }
36
37 }