did you try to change the file type to "PL/SQL"?
Thanks, but that doesn't help
To specify it more precisly: I can open such a file, but it is not opened as a sql file. The icons you see above left are the icons of the files (not of the packages).
The file opener in SQLDev works as follows:
1. If file extension is on the list, then the file is opened with the associated editor.
2. If file extension is not on the list, then SQLDev parses the initial text fragment with SQL&PL/SQL parser. Next, if less than 10 words are recognized then no editor association is made. Otherwise, we assume it is PL/SQL or SQL source. Finally, if first 4 words contain PACKAGE, PROCEDURE, or other pl/sql module type, then it is opened with pl/sql editor. Otherwise it is opened with SQL worksheet. For example, if you open file "myfile.s12" which contains "select * from dual where 1=2;", then it would be opened in worksheet.
Therefore, if you remove .pck extension association in the preferences, what editor is it opened with? What first 10 words does it contain?
If I remove the .pck extension the file is opens like a package (a .sql-file opens in a 'SQL-Worksheet).
The first words:
CREATE OR REPLACE PACKAGE ONL_JSON_ANLGKTO IS
/* Anzeige der Rückzugsübersicht */
p_sess_rec IN onl_sess%ROWTYPE
,p_pk_zinssatz IN BOOLAN...
Because those .pck files contain the definition and the body, I need them to open as a sql-file.
I understand now the behaviour: If I put some dummy words at the start they open like a text-file (the icon changes too to a text-file.) If I define .pck-files again as a sql-files they still open like a textfile.
I think this automatic detection is a good idea but should not overwrite the settings under 'File Types'.
In SQL Developer 4.0 because it functions like I expect.
The bug still exists in 184.108.40.206 Build MAIN-19.59
Do you know when this will get fixed?
In 220.127.116.11.39 and later
1. Set .pck extension to sql script
2. Open something.pck
3. It opens in sql worksheet
What do you do?