Hello,
Is there a setting or preference that would cause double clicking on a .sql file in windows explorer to open the file in my current instance of PSD rather than spawning a new instance?

Thanks

Version 11.0.4.1774
Windows 7 (64-bit) 6.1 Build 7601 (Service Pack 1)
This is controlled by the Windows Explorer. Maybe it can be fixed by going to Tools > Preferences > Files / Extensions, pressing the "Register filetypes" button, and pressing okay. The extensions will now be registered again. It may require a Windows reboot to make this effective.
Actually some applications handle this internally.
When application is invoked, before it opens a visible window (or performs any other visible operations or time/resource intensive tasks), it:
1. checks if it's configured to work in single-instance mode (and if no override for this setting was passed in command line parameters), and
2. if so, it looks for other instances of that same application, and
3. if found, it uses inter-process communication to order that found instance to do what it was told to do (e.g. open a document), and
4. it closes.
The effect for a user is that visually there's always one instance. In the background we have an additional instance of the application for a split second.

Ofc. if any of the conditions mentioned above (e.g. not configured to work in single-instance mode, or override in effect or no other instance found), the application behaves as normal, so the instance is fully opened etc.
Agreed, this is how gVim works using the editexisting.vim plugin. Launching a new instance of PL/SQL Developer every time you double-click on a .sql file isn't really helpful as a filetype extension.

I've got into the habit of dragging files from Win Explorer into PL/SQL Dev, which works nicely, and associating the filetype with gVim for double-clicks.
I agree that this would be great for when one instance is open. But many of us use more than one instance (including myself). It would be nice to have an option to disable this new feature if multiple instances are active.
[quote]Maybe it can be fixed by going to Tools > Preferences > Files / Extensions, pressing the "Register filetypes" button, and pressing oka[/quote]
This don't work. Every time multiple instance...

[quote]I've got into the habit of dragging files from Win Explorer into PL/SQL Dev, which works nicely[/quote]
It don't work nicely: when you drag and drop file it go in the main connection, not in the connection where you have moved it.
Many applications that have this feature do introduce an option for that (so you can choose if the application allows the system to open a new instance for a document, or the application should force it to be in one instance).
The case when you have multiple instances open (which is not actually impossible even if an application is configured to be single-instance, as some allow overrides) may work at least in two ways:
1. The application automatically chooses which instance should handle opening the document,
2. The application shows the user a selection window, where the user can decide in which instance the document should open (sometimes also allowing here to choose "new instance" option).
[quote]It don't work nicely: when you drag and drop file it go in the main connection, not in the connection where you have moved it. [/quote]

I just find multiple connections confusing and error-prone (as I might run something in the wrong connection) so I never use that feature, and I only ever have a "main" connection.
Many people use multiple connections. You're a lucky person if you just only use the main!
[quote]Many people use multiple connections. You're a lucky person if you just only use the main![/quote]
It's not luck. I edited my preference settings. confused
[quote=Roadling]Hello,
Is there a setting or preference that would cause double clicking on a .sql file in windows explorer to open the file in my current instance of PSD rather than spawning a new instance?
[/quote]

My tst files where opening in the existing instance but my sql files where not. I looked in the Windows registry and changed:
HKEY_CLASSES_ROOT\.sql data to PL/SQL Developer
Now the sql files open in the existing instance! I first looked at the .tst entry to see what it looked like.

Windows 7 32-bit
PL/SQL Developer 9.0.6.1665
After all this years, this is still not working! Each time I double click on a file in Windows Explorer or in my version control system a new instance is launched, which takes at least a minute in my case. This is by far the MOST ANNOYING problem of PL/SQL Developer!

Marco, how can it be a Windows Explorer problem? The Explorer knows nothing about PL/SQL Developer, the explorer can only launch a new instance with the given file. It is up to the new instance to transfer the file to an existing instance (or not doing it, depending on a user preference). This should be really no problem for an accomplished programmer.
[quote=Buckeye]
My tst files where opening in the existing instance but my sql files where not. I looked in the Windows registry and changed:
HKEY_CLASSES_ROOT\.sql data to PL/SQL Developer
Now the sql files open in the existing instance! I first looked at the .tst entry to see what it looked like.
[/quote]
This is my .tst setting in the registry:
[HKEY_CLASSES_ROOT\.tst]
@="PL/SQL Developer 14"


And this is my .pck setting:
[HKEY_CLASSES_ROOT\.pck]
@="PL/SQL Developer 14"

The first opens in an existing instance, the second always opens a new instance. So I guess is IS something in PL/SQL developer...
© Allround Automations forums