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.
You can press CTRL+F7 (on Windows) to format the SQL code in your current Code Editor window to update the formatting of the code based on any format changes you have made. There is no shortcut set on Mac for formatting SQL code. You can right-click in the Editor and select Format.
Try disabling Code Editor - Completion Insight - Change case as you type and/or Database - SQL Formatter - Autoformat... Hope that helps, K. You can always define how you want to format the SQL or normal text by using the keyboard CTRL+' to manage text/keyword case to all UPPERCASE, Initcap, or all lowercase.
Under Tools->Preferences->Shortcut Keys you can find and/or define the shortcut key combination for the Convert Selection to Uppercase and Convert Selection to Lowercase commands. I have mine mapped to CTRL + U and CTRL + L respectively.
You must select your query and then click PL/SQL Beautifier button. Save this answer.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With