提交 2cc2f5e3 编写于 作者: S serge-rider

#8472 SQL formatting: format entire script fix


Former-commit-id: 545304b6
上级 1d874fb3
......@@ -32,7 +32,10 @@ class SQLContentFormatter extends ContentFormatter implements IContentFormatterE
@Override
public void format(IDocument document, IFormattingContext context) {
if (!editor.getActivePreferenceStore().getBoolean(SQLPreferenceConstants.SQL_FORMAT_ACTIVE_QUERY)) {
final IRegion region= (IRegion)context.getProperty(FormattingContextProperties.CONTEXT_REGION);
IRegion region= (IRegion)context.getProperty(FormattingContextProperties.CONTEXT_REGION);
if (region == null) {
region = new Region(0, editor.getDocument().getLength());
}
if (region != null) {
super.format(document, region);
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册