11 Replies Latest reply on Dec 3, 2015 6:43 PM by RJLyders

    SQL Developer 4.1.2.20 Build MAIN-20.64: Can not drag-n-drop into editor files that include "#" in name or path

    RJLyders

      SQL Developer 4.1.2.20 Build MAIN-20.64: I am not able to drag-n-drop a file from Windows Explorer into SQL Developer editor window if the file name or the file path includes the pound character "#". Unfortunately, my main directory structure includes a "#" in one of the parent folder names and I use drag-n-drop all the time.... that is, I used to. :-)

       

      I am running on Windows 7 Enterprise 64 bit with Service Pack 1

       

      This was not an issue in the previous version of SQL Developer 4.1.1.19 Build MAIN-19.59.

        • 1. Re: SQL Developer 4.1.2.20 Build MAIN-20.64: Can not drag-n-drop into editor files that include "#" in name or path
          Gary Graham-Oracle

          Using SQL Developer 4.1.2.20 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.

          • 2. Re: SQL Developer 4.1.2.20 Build MAIN-20.64: Can not drag-n-drop into editor files that include "#" in name or path
            RJLyders

            Hi Gary,

            Thanks for your feedback. When I ran my initial tests after installing SQL Developer 4.1.2.20 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.

            • 3. Re: SQL Developer 4.1.2.20 Build MAIN-20.64: Can not drag-n-drop into editor files that include "#" in name or path
              RJLyders

              Hi Gary,

              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.

              • 4. Re: SQL Developer 4.1.2.20 Build MAIN-20.64: Can not drag-n-drop into editor files that include "#" in name or path
                Gary Graham-Oracle

                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...

                https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#win32_file_namespaces

                • 5. Re: SQL Developer 4.1.2.20 Build MAIN-20.64: Can not drag-n-drop into editor files that include "#" in name or path
                  RJLyders

                  Hi Gary,

                  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.

                  • 6. Re: SQL Developer 4.1.2.20 Build MAIN-20.64: Can not drag-n-drop into editor files that include "#" in name or path
                    RJLyders

                    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 4.1.2.20
                    • 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 4.1.2.20.

                     

                    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.

                    • 7. Re: SQL Developer 4.1.2.20 Build MAIN-20.64: Can not drag-n-drop into editor files that include "#" in name or path
                      RJLyders

                      UPDATE:

                      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

                      • 8. Re: SQL Developer 4.1.2.20 Build MAIN-20.64: Can not drag-n-drop into editor files that include "#" in name or path
                        RJLyders

                        UPDATE:

                        Interestingly, this very same issue exists for JDeveloper Studio Edition Version 12.2.1.0.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.

                        • 9. Re: SQL Developer 4.1.2.20 Build MAIN-20.64: Can not drag-n-drop into editor files that include "#" in name or path
                          RJLyders

                          UPDATE:

                          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.

                          • 10. Re: SQL Developer 4.1.2.20 Build MAIN-20.64: Can not drag-n-drop into editor files that include "#" in name or path
                            Gary Graham-Oracle

                            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 12.2.1.0.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.

                            1 person found this helpful
                            • 11. Re: SQL Developer 4.1.2.20 Build MAIN-20.64: Can not drag-n-drop into editor files that include "#" in name or path
                              RJLyders

                              Thanks for your help Gary.

                               

                              As recommended, I've created the following SR:

                               

                              Severity 4SR 3-11813330271 : SQL Developer 4.1.2.20 drag-n-drop file with "#" in path from WinExplorer to target XML file editor