use of com.intellij.openapi.editor.impl.SettingsImpl in project intellij-community by JetBrains.
the class DetailViewImpl method createEditor.
@NotNull
protected Editor createEditor(@Nullable Project project, Document document, VirtualFile file) {
EditorEx editor = (EditorEx) EditorFactory.getInstance().createViewer(document, project);
final EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme();
EditorHighlighter highlighter = EditorHighlighterFactory.getInstance().createEditorHighlighter(file, scheme, project);
editor.setFile(file);
editor.setHighlighter(highlighter);
EditorSettings settings = editor.getSettings();
settings.setAnimatedScrolling(false);
settings.setRefrainFromScrolling(false);
settings.setLineNumbersShown(true);
settings.setFoldingOutlineShown(false);
if (settings instanceof SettingsImpl) {
((SettingsImpl) settings).setSoftWrapAppliancePlace(SoftWrapAppliancePlaces.PREVIEW);
}
editor.getFoldingModel().setFoldingEnabled(false);
return editor;
}
Aggregations