This content has been marked as final. Show 27 replies
Actually I do not believe the drop-down on the top right corner ever worked for files, just the worksheet. What used to work was the pop-up Connection Selector (after a Run Script or Run Statement action in the from the file's toolbar) -- and even then it just remembered the connection selected for the last invocation of pop-up, not necessarily the last connection selected anywhere.
Prior reports on the forum for similar issues (perhaps there are others I missed):
Re: [3.2.09.30]Select Connection dialog no longer remember previous selection
Re: Bug 3.2.09: Open a connection via Worksheet Icon Alt-F10 forget selcted
These are all related to:
Bug 13952913 - REGRESSION: CONNECTION SELECTOR CAN NOT REMEMBER THE LAST CHOICE
which is actually classified as an enhancement, not a bug -- perhaps because the original feature never worked universally. When it got broken as a side-effect of some other work for 3.2, I can only guess a decision was made to rework it properly rather than just do a minimal fix restoring the prior, partial behavior.
Actually I do not believe the drop-down on the top right corner ever worked for files, just the worksheet.Hi Gary and apologies for the late reply.
I'm sorry, but what you say is not true: I just tried 3.2.09.30 and I confirm it works as described. I'm pretty sure this applies to previous versions as well.
I really hope the old behaviour can be restored: I'm working almost exclusively with files and I can assure you that it's really frustrating. :(
sorry for interrupting your discussion, but I thing this is more related to my poste here:
Serious SQL Developer bugs
Archimede is right, the functionality attaching a file to a connection was there, but probably removed because it was not working.
Attaching a file to a connection was maybe working for you, because you are probably not using multiple connections opened. If you would used it, you would see that this functionality was disaster...
Ha! Well, after spending time trying to understand this better, if I'm still confused about the actual behavior, that supports the point about providing a more complete fix.
I know this is a pain point for many. I bumped its desirability rating by 1 and hope that the "enhancement" owner will review it sooner.
Well basicaly I think that any default sticking of a file to a connection is wrong. If you really want to have such feature then it has to be configurable and disabled by default. Why?
1) I think that first time you open a file you always have to chose a connection. Consider you would have 10 connections opened and opening a file for the first time. To which connection would you attach the file?
2) To remember to which connection was a file attached, you need to remember the full path to the file and the connection. If you have hunderts or even thousands of files then such log would be pretty big. What if I remove some files from my project? There is no way how you can detect this, so the log will contain dead mappings.
3) Consider you have some source files, you have a test server and you have a production server. You first open the file on test server, edit it, compile it, Developer remembers the connection. Now you want to compile changes you made to the production server, but Developer is attaching the file to the test server. Pretty stupid, hm? In combination with the bug I mentioned in my previous thread, is this functionality disaster.
Basicaly I don't understand why need this functionality? You need to attach a file to a connection only when you need to compile it. When I am programing something I usually have only few souces open (e.g. three packages). I doubt anybody opens and changes large number of packages. Are you doing some changes to entire system every day?
xxsawer wrote:I disagree. To me default should be the connection(s) currently open.
Well basicaly I think that any default sticking of a file to a connection is wrong.
If you really want to have such feature then it has to be configurable and disabled by default.That sounds more reasonable.
I think that first time you open a file you always have to chose a connection.I strongly disagree.
Consider you would have 10 connections opened and opening a file for the first time. To which connection would you attach the file?ideally SQLDev should ask me to which of the currently open connections I want to pin the file. If that's too much work, I can live with not pinning to any (IOW, as it is now). BUT if only ONE connection is open I want SQLDev to pin any file to that connection, without asking anything (IOW, as it worked before).
To remember to which connection was a file attached, you need to remember the full path to the file and the connection. If you have hunderts or even thousands of files then such log would be pretty big. What if I remove some files from my project? There is no way how you can detect this, so the log will contain dead mappings.I don't want SQLDev to remember anything: I work with CVS/SVN and the same file can be compiled on different connections (DEV, TEST, PROD, etc.). Not sure what are you talking about here...
Basicaly I don't understand why need this functionality? You need to attach a file to a connection only when you need to compile it. When I am programing something I usually have only few souces open (e.g. three packages). I doubt anybody opens and changes large number of packages. Are you doing some changes to entire system every day?I don't understand how the number of files should make any difference. You open three packages, fine: don't you need to compile the changes you make? I just don't want to be forced to choose the connection if that can be automated (and, BTW, how many connections do you have? I have hundreds: do you think it's fun scrolling through a list that long?).
I am also missing the ability to open a file and compile or execute it against an open connection. I mainly edit in an external editor so this was important behaviour for me. As it stands now I see no point in allowing files to be opened at all if they cannot be executed. Perhaps there is a new way of allowing this? If not, I sincerely hope to see the original behaviour restored in the near future.
Thank you for your efforts so far...
Thank you for your attention Jeff.
After your gentle persuasion, I tried some other package files and found that some were given the option to select a connection and some were not. After some experimentation I have found the bug. It's all down to schema prefixes on the package definition. If a package is defined like this:
create or replace package body magik as
All is well. However, if the schema name is prefixed like this:
create or replace package body love.magik as
Then SQL Developer will not recognise it as a package and therefore not give any connection option. This was fun to work out as I discovered there is some caching involved on the file name. Changing a file, closing it and then reopening it did not make any difference. Taking the same file and renaming it before opening again was fine. Restarting SQLDev also flushes this cache.
I look forward to seeing this corrected in a future version.
I failed to reproduce the problem. Step-by-step test case:
1. Create file scott.mysimplepkg.pks
create or replace PACKAGE scott.mySimplePKG AS
FUNCTION add (par1 number, par2 number)
2. Open file. It is opened in PL/SQL editor (not worksheet). The connection combobox is empty.
3. Select connection. It is immediate if connection is active, and some time to connect, otherwise. (The connection widget is not associated with the editor content by any means).
Can you please elaborate?