blob: 8d50dfd2aec3209e4de5672a980542c1ac2bf04c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009 Red Hat Inc. 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
*
* Contributors:
* Alexander Kurtakov - initial API and implementation
*******************************************************************************/
package org.eclipse.dltk.sh.internal.ui.preferences;
import org.eclipse.dltk.sh.internal.ui.editor.ShellSourceViewerConfiguration;
import org.eclipse.dltk.ui.text.IColorManager;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IAutoEditStrategy;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.jface.text.ITextHover;
import org.eclipse.jface.text.formatter.IContentFormatter;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.eclipse.jface.text.information.IInformationPresenter;
import org.eclipse.jface.text.source.IAnnotationHover;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.ui.texteditor.ITextEditor;
public class SimpleShellSourceViewerConfiguration extends ShellSourceViewerConfiguration {
private final boolean changeFormatter;
public SimpleShellSourceViewerConfiguration(IColorManager colorManager, IPreferenceStore preferenceStore,
ITextEditor editor, String partitioning, boolean changeFormatter) {
super(colorManager, preferenceStore, editor, partitioning);
this.changeFormatter = changeFormatter;
}
@Override
public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) {
return null;
}
@Override
public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
return null;
}
@Override
public IAnnotationHover getOverviewRulerAnnotationHover(ISourceViewer sourceViewer) {
return null;
}
@Override
public int[] getConfiguredTextHoverStateMasks(ISourceViewer sourceViewer, String contentType) {
return null;
}
@Override
public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask) {
return null;
}
@Override
public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
return null;
}
@Override
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
if (changeFormatter) {
return super.getContentFormatter(sourceViewer);
}
return null;
}
@Override
public IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer) {
return null;
}
@Override
public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {
return null;
}
@Override
public IInformationPresenter getOutlinePresenter(ISourceViewer sourceViewer, boolean doCodeResolve) {
return null;
}
@Override
public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) {
return null;
}
}