previewDocument = DocumentUtil.getDocument(selectStatementFile);
viewer = (EditorEx) EditorFactory.getInstance().createViewer(previewDocument, dataset.getProject());
viewer.setEmbeddedIntoDialogWrapper(true);
JScrollPane viewerScrollPane = viewer.getScrollPane();
SyntaxHighlighter syntaxHighlighter = dataset.getLanguageDialect(SQLLanguage.INSTANCE).getSyntaxHighlighter();
EditorColorsScheme colorsScheme = viewer.getColorsScheme();
viewer.setHighlighter(HighlighterFactory.createHighlighter(syntaxHighlighter, colorsScheme));
viewer.setBackgroundColor(colorsScheme.getColor(ColorKey.find("CARET_ROW_COLOR")));
viewerScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
viewerScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);