oracle SQLDeveloper 更改大小写(破坏格式)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3134556/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 20:55:54  来源:igfitidea点击:

SQLDeveloper changing case (breaking formatting)

sqloracleoracle-sqldeveloper

提问by Jerr

Using SQLDeveloper 2.1.1.64, if you try typing the following code:

使用 SQLDeveloper 2.1.1.64,如果您尝试键入以下代码:

DECLARE
  v_status_code NUMBER;
  v_status_text VARCHAR2(30);
  v_to_delete   NUMBER := 5;
BEGIN
  PACKAGE_NAME.Delete(v_to_delete, v_status_code, v_status_text);
END;

Pressing Enter after the PACKAGE_NAME.Delete(...) line will make Delete go into all caps (DELETE). I have turned off Case Change in the SQL Formatter options but this still happens. I get other problems similar to this one, where it will randomly reformat lines of code, but I couldn't think of an example as consistent as this. The specific package name doesn't matter, and it does this even if PACKAGE_NAME is in UpperCamelCase.

在 PACKAGE_NAME.Delete(...) 行之后按 Enter 将使 Delete 全部大写 (DELETE)。我在 SQL Formatter 选项中关闭了 Case Change,但这仍然发生。我遇到了与此类似的其他问题,它会随机重新格式化代码行,但我想不出像这样一致的示例。特定的包名称无关紧要,即使 PACKAGE_NAME 位于 UpperCamelCase 中也是如此。

I don't know if this is a bug with SQLDeveloper or if I'm missing some settings somewhere. It seems as though the SQL Formatter settings under Tools > Preferences > Database > SQL Formatter > Oracle Formatting don't do it, so I don't know what to do. It's getting annoying having to catch some of these format changes, which I sometimes only notice when doing a diff.

我不知道这是 SQLDeveloper 的错误还是我在某处遗漏了一些设置。似乎工具 > 首选项 > 数据库 > SQL 格式化程序 > Oracle 格式化下的 SQL 格式化程序设置没有这样做,所以我不知道该怎么做。不得不捕捉其中一些格式更改变得很烦人,我有时只在进行差异时才会注意到。

回答by Jacob Schoen

Under Tools > Preferences > Code Editor > Completion Insight there is an option for 'Change case as you type'.

在“工具”>“首选项”>“代码编辑器”>“完成洞察”下,有一个“键入时更改大小写”选项。

But I do not think it will do what you are looking for. Unchecked it will either make it all lower case or all uppercase depending on what you have inputted so far. I am not sure if it will do it the way you are wanting.

但我不认为它会做你正在寻找的。取消选中它要么全部小写,要么全部大写,具体取决于您目前输入的内容。我不确定它是否会按照您想要的方式进行。

回答by Edwin Segura

I believe you want to disable the annoying option that is changing to UPPERCASE text when you type. Go to Tools > Preferences > Code Editor > Completion Insight > Uncheck "Change case as you type"

我相信您想禁用在您键入时更改为大写文本的烦人选项。转到工具>首选项>代码编辑器>完成洞察>取消选中“键入时更改大小写”