This discussion is archived
1 2 Previous Next 27 Replies Latest reply: Jul 25, 2013 1:52 PM by archimede RSS

Files opened are no longer associated with a connection

archimede Newbie
Currently Being Moderated
Sorry if this has been posted before, but I couldn't find any mention of it.

Steps to reproduce the problem:

- open SQLDev
- open a connection
- open a file (using the "Files" tab in the left pane)

Result: the file is not associated with the open connection and you have to manually select it from the drop-down on the top right corner.

Previous versions were working as expected and current behaviour is extremely annoying.

Hope you will fix it ASAP.

Regards.

Alessandro
  • 1. Re: Files opened are no longer associated with a connection
    Gary Graham Expert
    Currently Being Moderated
    Hi Alessandro,

    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.
  • 2. Re: Files opened are no longer associated with a connection
    archimede Newbie
    Currently Being Moderated
    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. :(

    Regards.

    Alessandro
  • 3. Re: Files opened are no longer associated with a connection
    xxsawer Explorer
    Currently Being Moderated
    Hi guys,
    sorry for interrupting your discussion, but I thing this is more related to my poste here:
    Serious SQL Developer bugs

    @Gary
    Archimede is right, the functionality attaching a file to a connection was there, but probably removed because it was not working.

    @Archimede
    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...
  • 4. Re: Files opened are no longer associated with a connection
    Gary Graham Expert
    Currently Being Moderated
    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.

    -Gary
  • 5. Re: Files opened are no longer associated with a connection
    xxsawer Explorer
    Currently Being Moderated
    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.

    @archimede:
    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?
  • 6. Re: Files opened are no longer associated with a connection
    archimede Newbie
    Currently Being Moderated
    xxsawer wrote:
    Well basicaly I think that any default sticking of a file to a connection is wrong.
    I disagree. To me default should be the connection(s) currently open.
    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?).

    Regards.

    Alessandro
  • 7. Re: Files opened are no longer associated with a connection
    xxsawer Explorer
    Currently Being Moderated
    Hi archimede,
    Well, this sounds more reasonable. I was thinking you want to remember the file, connection pair.
    I agree that offering to chose only from opened connections could be good...
  • 8. Re: Files opened are no longer associated with a connection
    archimede Newbie
    Currently Being Moderated
    Not fixed in 3.2.20.09. :(

    Alessandro
  • 9. Re: Files opened are no longer associated with a connection
    Simon Newbie
    Currently Being Moderated
    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...


    S.
  • 10. Re: Files opened are no longer associated with a connection
    Jeff Smith SQLDev PM ACE Moderator
    Currently Being Moderated
    I am also missing the ability to open a file and compile or execute it against an open connection.
    Can you elaborate?

    Worksheet > File Open > Select connection > Execute

    Does this not work?
  • 11. Re: Files opened are no longer associated with a connection
    Simon Newbie
    Currently Being Moderated
    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.


    Blessings.


    S.
  • 12. Re: Files opened are no longer associated with a connection
    Vadim Tropashko Pro
    Currently Being Moderated
    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)
    RETURN NUMBER;

    END mySimplePKG;

    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).
    4. Compile.

    Can you please elaborate?
  • 13. Re: Files opened are no longer associated with a connection
    Vadim Tropashko Pro
    Currently Being Moderated
    We associate files with connections for debugging purposes already. Therefore, both conflicting feature requests can be reconciled with a single Code Editor preference:
    "Open associated connection when opening file-based editor"
  • 14. Re: Files opened are no longer associated with a connection
    archimede Newbie
    Currently Being Moderated
    We associate files with connections for debugging purposes already.
    Could you please explain in more detail what does it mean? If it implies that each file has to be tied to a specific connection, I don't think it will address my issue (and could potentially make it worse).

    Thanks.

    Alessandro
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points