Using SQL Developer 126.96.36.199 Build MAIN-20.64, on Windows 7 Professional 64 bit with Service Pack 1, I can drag D:\#Dev#\#Junk\#st#ff.sql into either a worksheet or code editor with no problem. The worksheet or code editor must have the focus, you cannot drop on the tab or toolbar or line gutter (there is a small red circle with a backslash through it in those cases).
So if it is not a Professional vs Enterprise issue, or else something specific to your environment (do you still have the 4.1.1 version available to test under the exact same conditions?), then you might try Window > Reset Windows to Factory Settings. I notice when I drag and drop, sometimes the new worksheet or editor opens in a tab next to the Query Results or Script Output below a worksheet rather than next to the initial worksheet or code editor tab.
Thanks for your feedback. When I ran my initial tests after installing SQL Developer 188.8.131.52 Build MAIN-20.64 the error was very consistent. Today I find, like you, that I can drag and drop a file into an open editor with that includes "#" in the path. However, yesterday I came across another situation where it failed to open a file with the "#" character. Obviously there is some variable to this scenario that I I have not identified.
The interesting aspect of this issue that I unfortunately failed to note in my initial post is that SQL Developer actually did open a file, but just not the file I dragged/dropped onto the open file editor. Instead of opening the file I dragged, SQL Developer opened a blank file with the partial name of the directory that contained the "#", but with the "#" stripped off. That is why it was initially very apparent that the "#" character was the key to the problem.
I appreciate your feedback. Obviously there is another elusive aspect to this issue that I need to track down. I will have to look into this again.
RE: worksheet or code editor must have the focus
Yes, this limitation I have a lot of experience with, so this was not affecting my initial tests, but thanks for the suggestions.
RE: you cannot drop on the tab or toolbar or line gutter (there is a small red circle with a backslash through it in those cases).
Correct. I don't think these issues were affecting my initial testing, but thanks for the notes.
It might be helpful for me to note that when I first experienced this issue, I carefully tested SQL Developer 4.1.2 and 4.1.1 releases to compare the results multiple times swapping back and forth between the releases using controlled test cases. I setup test cases of directories and files adding and removing the "#" from the directory name and consistently found that the "#" caused the file not to be loaded, but rather a blank file was loaded instead with the partial file name (without the "#").
However, today I can not reproduce it and it is rather baffling. I work on an company laptop that has software automatically installed/configured routinely so it is completely possible that something locally was causing the problem that I am not aware of.
As noted in my previous reply, this issue did show itself again yesterday. If I see it again, I will try to isolate what unique set of conditions causes the problem if at all possible.
Again, thanks for your time in researching this issue. Best wishes.
The only other thing that comes to mind as a possible cause for that behavior would be exceeding max size for a file specification. Depending on the file system, that might be something as small as 260...
Thanks for the note. Yes, I specifically recall removing that as a possibility in my test cases by using directories very close to the root of c:\.
Oh, another point...I recall testing other programs like "notepad++" in my test cases to see if they might also have a similar issue with "#" in the directory name, but no other program seemed to have this issue.
I'm just baffled that this issue went away. It was so consistent and seemingly obvious that I didn't take a screenshot or take a Camtasia video as I often do. Next time, I will take screenshots and video for better documentation. Maybe something in a screenshot or a video would have highlighted something interesting... or at least prove that I didn't make it all up. :-)
Well, again... thanks for your timely responses. SQL Developer is a great tool.
I have finally found out how to reproduce this issue. It appears that this issue only occurs when you have opened two files from folders which contain the pound "#" symbol. Additionally, I am now only seeing this with XML files. I am quite sure I saw this with SQL files previously, but I can not be 100% sure as now I can only reproduce this with XML files.
- Oracle SQL Developer Version 184.108.40.206
- Windows 7 Enterprise Service Pack 1
- 64-bit Operating System
1) Create the following directory: C:\TST#
2) In C:\TST#, create the following files...
- Create a simple XML file named a.xml without any contents... or with contents. It doesn't seem to matter what the file contains.
- Create another XML file named b.xml.... again content doesn't seem to make any difference.
3) Open SQL Developer 220.127.116.11.
4) In SQL Developer, press CTRL-O (or use the menu, or use the toolbar) to open up C:\TST#\a.xml in the SQL Developer editor.
OK RESULTS: File x.xml opens up without any problems.
5) Using the mouse, drag and drop C:\TST#\b.xml from the Windows Explorer onto SQL Developer's open editor...
ERROR RESULTS: a new blank editor opens up labeled "TST" instead of opening up the XML file b.xml.
I was able to test this on my co-worker's computer and I find the same results using the older version of SQL Developer version 3.2.20.09 Build MAIN-09.87
Interestingly, this very same issue exists for JDeveloper Studio Edition Version 18.104.22.168.0 (Build JDEVADF_MAIN_GENERIC_151011.0031.S). I gather there might be some common code being used between SQL Developer and JDeveloper that may be the cause.
More specifically, the key appears to be opening an XML file prior to dragging and dropping another file onto the editor. It does not appear to matter how I have opened up the XML file. To open up the XML file I could use the menu, CTRL-O, or drag-n-drop. It does not seem to make any difference. As long as I have already opened an XML file then I am able to reproduce this issue with *.sql files, *.txt files, *.bat files, *.csv files, etc... any file type.
I hope this provides enough details to allow others to reproduce this issue.
Good luck, best wishes, and happy holidays.
1 person found this helpful
Thank you for investigating so thoroughly and providing a reproducible test case. This is a very strange edge case. Especially interesting is...
this very same issue exists for JDeveloper Studio Edition Version 22.214.171.124.0
Based on my tests in SQL Developer 4.1.2, the issue seems to be, as you say, trying to open any file (I tried sql, xml, and pkb types) via drag 'n drop from Windows Explorer to a target editor opened on an XML file with a hash symbol somewhere in it's file specification.
At first, as a workaround, I thought I might recommend that you drag 'n drop from our View > Files navigator rather than Windows Explorer. That avoids the issue, and even permits you to drop on the Start Page tab, so no worksheet or other editor needs to be opened before-hand. However there is an entirely different problem with that: trying to close the last open XML editor tab hangs the entire product.
As you are not reporting this against an Early Adopter release, where our team would log the bug, the standard procedure is for you to open a service request with Oracle support. My searches have not turned up any past bug like this logged against either SQL Developer or JDeveloper.
Edit: Actually, just double-clicking rather than using drag 'n drop from View > Files avoids both issues, the incorrect naming and hang upon close.