Jerr
Jerr

Reputation: 563

SQLDeveloper changing case (breaking 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.

Upvotes: 14

Views: 18069

Answers (3)

Dhiren
Dhiren

Reputation: 1

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.

Upvotes: 0

Edwin Segura
Edwin Segura

Reputation: 41

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"

Upvotes: 4

Jacob Schoen
Jacob Schoen

Reputation: 14212

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.

Upvotes: 28

Related Questions