"Set Default Path for Relative Paths..." not working (fixed)

"Set Default Path for Relative Paths..." not working (fixed)

2
NewbieNewbie
2

    Aug 30, 2010#1

    In the "Output Window" I receive compiler output strings like: /projects/currentProject/sourceCode.c:46: error: syntax error before myFunction.
    If I double click the line in the Output Window, I get an error like:
    "C:\Documents and Settings\User1\SourceCode\projects\currentProject\projects\currentProject\sourceCode.c contains an incorrect path."

    Notice that "projects\currentProject\" is included twice, by mistake.

    If I right click in Output Window and choose "Set Default Path for Relative Paths..." and choose a path set to "C:\Documents and Settings\User1\SourceCode", I would expect it to clear up the problem. But, it doesn't matter what path I choose, I always get the same error message with the same bad path.

    What gives?
    -BigAl

    6,606548
    Grand MasterGrand Master
    6,606548

      Aug 31, 2010#2

      Help page Output Window command describes how UltraEdit try to find a file with a relative path. But this description is not detailed enough to analyze your problem with the relative path. So I created a dummy project with setting project directory to C:\Temp\Dir1. Next I wrote a single line script with the command

      UltraEdit.outputWindow.write("Test.tmp(1): Just a test.");

      executed the script and opened the output window to see this line. Next I opened a file from a third directory C:\Temp\Dir2. Last I right clicked into the output window and set default path for relative paths to C:\Temp\Dir3. The default working directory (Start In) in the properties of the shortcut I use to start UltraEdit is C:\Temp.

      Now I started Filemon from SysInternals and defined the include filter to include only Test.tmp. I double clicked now on the line in the output window and got the message:

      C:\Temp\Test.tmp was not found.

      In log of Filemon I could see how UltraEdit searched for the file without path:
      1. Active working directory which of course can change all the time while working with UltraEdit.
      2. Project directory as set in the project configuration dialog.
      3. Directory of the active file.
      4. Default directory defined via context menu of the output window.
      Now I created a file named Test.tmp fin the active working directory C:\Temp and double clicked again on the line in the output window. The file was found by UltraEdit and opened. I closed the file and moved it to the project directory C:\Temp\Dir1. Again UltraEdit opened the file successfully. So I closed the file again and moved it to the directory of active file C:\Temp\Dir2. On double click UltraEdit opened again the file. Last I closed the file once again and moved it to C:\Temp\Dir3 - the default directory for relative paths. As I double clicked on the file I just got the error message. So I looked with Filemon what happens and I could see that although the file is found in this directory, it is not opened by UltraEdit.

      Conclusion: You are right. Opening a file from the specified default directory for relative paths is not working. I will report this by email to IDM.

      Maybe you can set the project directory to "C:\Documents and Settings\User1\SourceCode" to solve that problem for you now.

      2
      NewbieNewbie
      2

        Aug 31, 2010#3

        Thank you so much for taking to the time to assist me and reporting the problem to IDM.
        In the mean time, I'll try your suggestion for a work around.

        6,606548
        Grand MasterGrand Master
        6,606548

          Sep 24, 2010#4

          This problem is fixed with UltraEdit v16.20.0.1011.

          3
          NewbieNewbie
          3

            Apr 30, 2011#5

            This is not working for me with Version 17.00.0.1035. It seems like it just checks the project directory.

            I do a compile, I get an error. When I click on the error on the output window it says that the file can't be found and it references the project subdirectory.

            Thank you.

            6,606548
            Grand MasterGrand Master
            6,606548

              May 01, 2011#6

              I analyzed the behavior with a sample project with UE v17.00.0.1035 on Windows XP x86. The sample project is the same as used before reporting the discussed problem fixed with UE v16.20.0.1011.

              A project is loaded with a project directory set in the project settings dialog. The output window contains the name of a file without path. If Default Path for Relative Paths is not set, UE v17.00.0.1035 searches in the defined project directory for the file on double clicking of the file name in output window. If I set a Default Path for Relative Paths, UE searches in the specified directory for the file on double click.

              BTW: Removing Default Path for Relative Paths is possible by clicking once again on Set Default Path for Relative Paths... in context menu of the output window, clicking on button Cancel and confirming the following question with Yes.

              3
              NewbieNewbie
              3

                May 01, 2011#7

                Mofi, thank you for your reply. However, I would like UE to also check the active file's directory when I double click on an entry in the output window. This is because in a current project I may open files from different subdirectories. Currently the program is only checking the project subdirectory if the default relative path is not set. If I set a default relative path it will work, but when I switch to another file which is in a different subdirectory and compile and click on the output window it will not find the file. By the way, I am using Win 7 64-bit.

                This doesn't seem to be working. It mentions it will attempt to open the specified file in the directory of the active file. I never had a problem with this in version prior to 17. Any ideas? Thank you.
                Ultraedit Help wrote:Double clicking on a line containing the filename and line number will cause UltraEdit to attempt to open the file specified at the line number. If the filename is fully qualified the filename will be located and the number after this will be used for the line number. If the filename is not fully qualified UltraEdit will attempt to determine the filename from the first word in the line that contains a period. UltraEdit will then open the specified file in the directory of the active file. If the file does not exist in the directory of the active file, UltraEdit will try and open the file from the Project Directory if it is specified.
                Thank you for your assistance.

                6,606548
                Grand MasterGrand Master
                6,606548

                  May 02, 2011#8

                  Here is what I sent IDM as enhancement request by email together with the confirmation that "Set Default Path for Relative Paths..." is working again in UE v16.20.
                  Mofi wrote:With a default directory set for file names with relative path, UltraEdit does not longer look for the file in the project directory or the directory of the active file. It would be good if UltraEdit would work as follows:
                  1. First checks if a default path is set and if this is the case looks for the file using the default path and the relative path of the file.
                  2. If 1. does not return full path of an existing file, check if a project is loaded and a project directory is set. If this is the case search for the file using the project directory path and the relative path of the file.
                  3. If 2. does not return full path of an existing file, check if a file with file name is opened and use the path of this active file together
                    with the relative path of the file.
                  4. If 3. does not return full path of an existing file, check if there is any file open in UltraEdit having the same name (case insensitive on Windows, case sensitive on Linux) as the file in the current line of the output window and available path matches also after removing from relative path everything left LAST ".\" including the point.
                    Some examples:

                    A file is opened with full path C:\Temp\RelativePathTest.txt

                    The output window contains ..\..\relativepathtest.txt(1):
                    "\relativepathtest.txt" matches "\RelativePathTest.txt" - file found!

                    The output window contains ..\temp\relativepathtest.txt(1):
                    "\temp\relativepathtest.txt" matches "\Temp\RelativePathTest.txt" - found!

                    The output window contains .\relativepathtest.txt(1):
                    "\relativepathtest.txt matches" "\RelativePathTest.txt" - found!

                    The output window contains .\temp\defaultdir\..\relativepathtest.txt(1):
                    "\relativepathtest.txt" matches "\RelativePathTest.txt" - found!

                    Of course for UEX the compares would be case sensitive and therefore the examples above would return all 4 "not found in opened files".
                  If the Default Path is not set by clicking once again on "Set Default Path for Relative Paths...", clicking on button Cancel, confirming the following question with Yes, and the file RelativePathTest.txt is moved from the directory DefaultDir to ProjectDir or ActiveFileDir, the file is found and opened on double click on the line in the output window. So 2. and 3. is already working, but unfortunately only when no default path is set.

                  It would be better if the project directory and the directory of active file would be also used to find a file with relative path if a default path is specified (UltraEdit remembers that path in uedit32.ini) and the file does not exist in the specified default path, for example because of a switch to another project.

                  4. would be an enhancement which takes into account, that lines with relative path in the output window are often caused by capturing output of a user tool executed for 1 or more already opened files.
                  I must confirm that path of active file is not taken into account anymore if Default Path for Relative Paths is not set and a project is loaded with a project directory set. This is different to UE v16.20. Please report this issue and perhaps make a similar or the same enhancement request as I. The more users request a smarter method for finding a file with relative path in output window, the higher the chance to get it in a future version of UltraEdit.

                  3
                  NewbieNewbie
                  3

                    May 02, 2011#9

                    Thanks. I sent IDM a support email. I've been using UE for 10+ years and never had this problem. On whichever active file I would be, even using different directories, I could compile and click on the errors of the output window and the program would always take me to the file and line number. Now it doesn't seem to search in the Active File's directory. It forces the user to Set a Default for Relative Path. I never had to do this ... prior to UE Version 17.

                    Thanks, Gary

                    IDM replied with the following, I'm wondering when it will be corrected. Thanks for your help.

                    ............ FROM IDM Computer Solutions, Inc. on 5/3/2011...
                    Hello,

                    Thank you for your message, and I do apologize for the frustration with this. Our developers are aware of this issue, and it was introduced in v17.00. We do plan to correct this issue as soon as possible, and we will notify you once we do.

                    Thanks.
                    .........................

                    6,606548
                    Grand MasterGrand Master
                    6,606548

                      Jun 03, 2011#10

                      Relative paths handling has been improved in UE v17.10.0.1008. Now UltraEdit searches for a file with relative path in output window in
                      • current working directory of UltraEdit,
                      • directory of active file if not a new, unnamed file is active,
                      • project directory if a project is loaded,
                      • default path if set by the user.

                      1
                      NewbieNewbie
                      1

                        Aug 11, 2011#11

                        I am using UEStudio Version 11.10.0.1003 and still have the issue.

                        Is there any information I can collect to help troubleshooting the issue?

                        After further investigation on my part I have fixed the issue. It seems if the flag $P is omitted in the search settings the output window is not able to pull up the file name where the string was found by double clicking on the file name. :oops:

                        I take it this is working as intended. :wink: