SQLDeveloper 更改大小写(破坏格式)
使用 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;
在 PACKAGE_NAME.Delete(...) 行后按 Enter 键将使删除全部大写 (DELETE)。我已经在 SQL 格式化程序选项中关闭了大小写更改,但这种情况仍然发生。我遇到了与此类似的其他问题,它会随机重新格式化代码行,但我想不出与此一致的示例。具体的包名称并不重要,即使 PACKAGE_NAME 采用大驼峰命名法,它也会执行此操作。
我不知道这是否是 SQLDeveloper 的一个错误,或者我是否在某处缺少一些设置。似乎“工具”>“SQL 格式化程序”设置如下:首选项>数据库> SQL 格式化程序 > Oracle Formatting 不这样做,所以我不知道该怎么办。必须捕获其中一些格式更改变得很烦人,有时我只在进行比较时才注意到。
Using SQLDeveloper 2.1.1.64, if you try typing the following code:
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.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在工具>下首选项>代码编辑器> Completion Insight 有一个“键入时更改大小写”选项。
但我认为它不会满足您的要求。取消选中它将全部小写或全部大写,具体取决于您到目前为止输入的内容。我不确定它是否会按照您想要的方式进行。
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.
我相信您想禁用在键入时更改为大写文本的烦人选项。转到工具>首选项>代码编辑器>完成洞察>取消选中“键入时更改大小写”
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"
转到工具>首选项>代码编辑器>格式>高级格式>一般> 使用 Ctrl + F7 将格式从“lower”更改为“Keep Unchanged”
,不会更改标识符大小写。
Go to Tools > Preferences > Code Editor > Format > Advanced Format > General > change from "lower" to "Keep Unchanged"
Format using Ctrl + F7, it will not change identifier case.