viewerScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
viewerScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
//viewerScrollPane.setBorder(null);
viewerScrollPane.setViewportBorder(new LineBorder(CompatibilityUtil.getEditorBackgroundColor(viewer), 4, false));
EditorSettings settings = viewer.getSettings();
settings.setFoldingOutlineShown(false);
settings.setLineMarkerAreaShown(false);
settings.setLineNumbersShown(false);
settings.setVirtualSpace(false);
settings.setDndEnabled(false);
settings.setAdditionalLinesCount(2);
settings.setRightMarginShown(false);
viewer.getComponent().setFocusable(false);
previewPanel.add(viewer.getComponent(), BorderLayout.CENTER);
} else {
new WriteActionRunner() {