| /******************************************************************************* |
| * Copyright (c) 2005, 2007 IBM Corporation and others. |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License v. 2.0 which is available at |
| * http://www.eclipse.org/legal/epl-2.0. |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| |
| *******************************************************************************/ |
| package org.eclipse.dltk.javascript.internal.ui.text; |
| |
| import org.eclipse.dltk.javascript.ui.text.IJavaScriptPartitions; |
| import org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration; |
| import org.eclipse.dltk.ui.text.ScriptTextTools; |
| import org.eclipse.jface.preference.IPreferenceStore; |
| import org.eclipse.jface.text.rules.IPartitionTokenScanner; |
| import org.eclipse.ui.texteditor.ITextEditor; |
| |
| public class JavascriptTextTools extends ScriptTextTools { |
| |
| public JavascriptTextTools(boolean autoDisposeOnDisplayDispose) { |
| super(IJavaScriptPartitions.JS_PARTITIONING, |
| IJavaScriptPartitions.LEGAL_CONTENT_TYPES, |
| autoDisposeOnDisplayDispose); |
| } |
| |
| @Override |
| public ScriptSourceViewerConfiguration createSourceViewerConfiguraton( |
| IPreferenceStore preferenceStore, ITextEditor editor, |
| String partitioning) { |
| return new JavascriptSourceViewerConfiguration(getColorManager(), |
| preferenceStore, editor, partitioning); |
| } |
| |
| @Override |
| public IPartitionTokenScanner getPartitionScanner() { |
| return new JavascriptPartitionScanner(); |
| } |
| |
| } |