How to add just some subdirectories of a project subdirectory to a project?

How to add just some subdirectories of a project subdirectory to a project?

13
Basic UserBasic User
13

    Jun 15, 2017#1

    Hi there,
    I wanted to know if someone was aware about a way to add a directory to a project WITHOUT all of its sub-directories?
    There is a global 'include subdirectory' option, but it is not exactly what I want. I would like to control which sub-directories I want to include.
    I am attaching a small screenshot illustrating my point and the workaround I found (including directory/subdirectory one by one; losing the hierarchical tree features).
    (Note that Dropbox has such a feature for selecting which directories to synchronize).

    Subsidiary question:
    I would like to only have the main directory displayed instead of the full path (Sublime text does this and it is easier to read - second attachment).

    Thanks for your time and advice.
    ues-projects & directories.png (3.03KiB)
    I wish I could add the '.\protected' directory and then check which of the sub-directories I want to be included (6 of them in this case).
    Therefore I would have only one entry in my project tab instead of the 6 I have now.
    sublime-project & directories.png (9.13KiB)
    Better display with Sublime Text but still no possibility to limit the subdirectories to include.

    6,606547
    Grand MasterGrand Master
    6,606547

      Jun 15, 2017#2

      UltraEdit displays the folder paths as added to the project file.

      File and folder paths can be added:
      • relative to Project directory as defined at top of Project Settings dialog on adding a file/folder, or
      • relative to project file location (*.prj file) when there is no project directory defined, or
      • absolute if usage of relative directory paths is disabled in project file or the added file/folder is on a different drive than the project directory/file.
      It looks like on your project the project directory was not U:\oneboard as the folders were added to the project or the project file is not stored in U:\oneboard or the project option to add files and folders with relative directory path was not enabled although enabled by default.

      Right click on project name on tab Project and left click in context menu on Edit project file. In opened project file there should be at top:

      Use Relative Directory=1 ... to project directory if one defined or to project file.
      Relative to Project File=1 ... which can be 0 with project directory defined.
      Project DirectoryU=U:\oneboard ... or empty when paths should be relative to project file.

      I think U is short for Unicode which means the path can contain also Unicode characters encoded with UTF-7. The project file entries with U at end are new since UltraEdit v24.00 with full Unicode support also for file and folder names and paths.

      On all other lines U:\oneboard should be replaced by .\ to convert the file and path entries in project file from absolute to relative.

      Note:
      When modifying the project directory in Project Settings dialog the existing relative paths are not automatically updated. So with changing project directory in Project Settings dialog UE/UES expect the same directory structure as before in newly set project directory without verification. This behavior is useful on copying or moving a project to same or another machine into a different directory with keeping the project directory structure as just the project directory path needs to be updated manually after that project move/copy. With no project directory defined and paths relative to project file which is located in project directory and not somewhere else as also possible, a project copy/move to a different directory on same or another machine does not need a manual modification of any project setting at all.

      The currently latest UE v24.10.0.24 and UES v17.00.0.21 do not have a feature like a directory include/exclude filter. There is just a file include filter.

      For that reason it is not really possible to add folder protected with including just 3 of the 6 subfolders respectively exclude 3 of the 6 subdirectories.

      This means that either the 3 subfolders of real interest are added to the project instead of folder protected which of course means the tree structure is lost, or a group protected is added and in this group the 3 subfolders are added as folders. The second variant is also not optimal as .\protected\ is additionally displayed on each added folder.

      project_view.png (1.8KiB)
      Project list with a group and 3 subfolders added to group.

      UE/UES display also folders included because of option Include subdirectories checked even with no file found in a specific folder and having also no subfolder anywhere below with a project file according to file filter. Such an auto-hide feature for empty folder (tree) would have been useful if the 3 subdirectories to exclude have no file matching the file filter.

      So at the moment I can only suggest that you send feature requests to IDM support for:
      • A folder filter in addition to file filter to include only subfolders matching the folder filter patterns.
      • An option to hide all folders not containing any project file according to file filter in the folder and all of its subfolders with Include subdirectories checked.
      Best regards from an UC/UE/UES for Windows user from Austria

      13
      Basic UserBasic User
      13

        Jun 16, 2017#3

        Mofi you really rock!!!
        Thanks to your input I have been able to get exactly what I want... the screenshot is worth any comment!
        I found it much easier to directly edit the .prj file (which as you guessed is not stored with the source files of the project).

        The cherry on the cake would be to be able to use this relative flag per group and not at project level so that in my dev group I could get rid of "x:\dev"...

        But right now I am very happy with this configuration.
        Thanks so much for your clear explanations.
        All the best.
        ues-projects & directories now rock.png (8.08KiB)

          Jun 16, 2017#4

          I am realizing that I completely lost Git integration with these new settings.... 8O
          Git seems to work only for files and directories that are not stored under a group (see the screenshot, the same directories appear twice, once in a group, once at the project root and we can clearly see which directories are tagged with the small Git icons...)
          UES is a world of trade-off !
          I am going to ask for 50% discount as it does half of what I want... :lol:
          ues-git or not git.png (6.45KiB)

          111
          Basic UserBasic User
          111

            Oct 28, 2019#5

            I can't find any way to disable relative paths, as mentioned above. If I edit a project file to turn off relative paths, it doesn't seem to work. The way I use UltraEdit is not compatible with relative paths. I want absolute paths, always.

            I can understand project files being in relative format. This is how many modern tools work: they tend to put all related project files together under one common ancestor. However, I don't use those tools and my projects are sometimes all over the place. For example, a  new PHP script might not share a common ancestor with a PHP script located in my "reusable scripts" folder. Another example is a website design app that I am developing along with an internationalization app that I am developing as a subproject of the website design app. In this case, I want to develop both sets of files concurrently (presumably as two groups under one UE project). In this case, relative addressing gains me nothing except occasional problems when I need absolute addresses.

            And I prefer to group all project files in one folder for ease of choosing projects, not together with one or more of the files in each project.

            UltraEdit is not well designed for the way I work. I'd like the ability to tell UE "use only absolute paths" and have it actually do only this, even internally.

            6,606547
            Grand MasterGrand Master
            6,606547

              Oct 28, 2019#6

              It is absolutely no problem to create all *.prj files in one directory like %APPDATA%\IDMComp\UltraEdit\Projects or any other directory. It is also no problem to have all *.pui files stored in same directory with name of project file with having enabled at Advanced - Settings or Configuration - File handling - Advanced the setting Save project information for use on multiple systems and with having not checked Store project user interface (pui) files in profile directory.

              In this case it is advisable to have configured in Project Settings dialog window a Project directory as otherwise the directory containing the *.prj file is used as project directory which is definitely not wanted in this case. The configured project directory is written into the *.prj file with setting Project DirectoryU=. The project directory can be also just C:\ if there is no real need for a project directory because of no using user or project tool references the project directory and the project is not compiled with UEStudio. (UltraEdit does not support compiling a project without usage of user or project tools as UEStudio supports.)

              I looked with UE v26.20.0.46 and UES v19.20.0.32 on how to create a project on which files and folders are added to project or a group of the project with absolute (full qualified) path. It looks like UltraEdit and UEStudio do not really make use of the values configured for Use Relative Directory= and Relative to Project File= at least in a manner expected by us. There is no documentation for these two project settings and there is no possibility to change the values of these two settings anywhere from graphical user interface. That lets me think that these two settings were added initially years ago as the general project file settings were defined by the UE/UES developers, but they were never really used later or were used years ago and are nowadays no longer used. I don't know anything about these two settings. I saw these two settings like any user who clicked ever on item Edit project file in context menu of the project name displayed at top of tab Project in File View or Workspace Manager. For that reason I can only suggest to ask IDM support by email for clarification if you are really interested in how these two project settings are handled by UltraEdit and UEStudio.

              Files and folders are added to project or a group of the project with full qualified file/folder name only when the current project directory is on a different drive than the file/folder added to the project. I found that out by doing following:
              1. I opened a command prompt window and executed the command subst X: C:\ which resulted in having now a drive X:.
              2. I opened the Project Settings dialog window of an opened project in UE/UES and changed the Project directory to  X:\ and closed the dialog window with button Close.
              3. I added a group via context menu item Add group on tab Project. This could be done of course also in Project Settings dialog window.
              4. I added per drag and drop of the file tab on the group several already opened files in different directories on drive C:. The files could be added also to the group in Project Settings dialog window.
              5. I clicked with right mouse button on a project file displayed on Project tab and clicked on context menu item Show (relative) file paths. The files were really added to the project with absolute path including drive letter and colon.
              6. I opened once again the Project Settings dialog and changed the Project directory back to the directory on drive C: which I wanted to use as project directory.
              7. I switched back to the still opened command prompt window and executed the command subst X: /D to remove the drive X: no longer needed.
              The files are stored in project file with full qualified file name and the path is never modified back to a relative path as long as the project file is not removed and next added once again to the project.

              I don't know if there is a better method to add files and folders to a project with full path. I could not find one in the last hour. Please ask IDM support by email if there is a better method than this one to get the files and folders added with absolute path to the project. The UTF-7 encoding used since UE v24.00 and UES v17.00 inside the project file does not make it easy to replace all relative paths in project file manually by absolute paths.
              Best regards from an UC/UE/UES for Windows user from Austria