How to quickly open project files by key instead of searching in project files list?

How to quickly open project files by key instead of searching in project files list?

13
Basic UserBasic User
13

    Jun 04, 2017#1

    Hello,
    I'm new to UES and I was wondering if it was possible to have some way to quickly open a file present in the current project.
    What I would like to do is start typing some letters and have UES find in the projects' files all of the files that could match.
    It is too cumbersome to browse the project tree and click on the file to open.
    Thanks for any advice.
    Jerome

    6,602548
    Grand MasterGrand Master
    6,602548

      Jun 05, 2017#2

      There is the Quick Open feature which can be opened with
      • pressing Ctrl+Q or
      • clicking in menu File on menu item Quick Open on using Toolbar/menu mode with Traditional menus.
      This opens a dialog to search in directory of active file - and its subdirectories if the check box item Open all matching files from subdirectories is also checked - for files matching entered pattern like *.cpp or dlg* and open them. The file name pattern can contain also a relative or absolute path. For example when directory of active file is a subdirectory of the project, start the file name pattern with ..\.

      The command Quick Open works independent on project settings. But I use it honestly most often to open files of a project directory (tree) quickly.

      If anybody can find this command in ribbon mode or in toolbar/menu mode with contemporary menu please let me know. I can't find this command in those two GUI modes. Well, I use since years Ctrl+Q and therefore it is not important for me where this command is available for pointing devices. Update: IDM support confirmed that Quick Open command was by mistake not added to ribbon/contemporary menus interface.

      The method to open from a project with many files quickly some project files matching a pattern is to right click on Workspace Manager with Files selected at bottom on tab Project on the project name at top and left click in opened context menu on List files in project.

      This opens the List Files in Project... dialog window on which all files of the project are listed with an edit field at top to quick search in the project files with reducing the file names list while entering the characters. Once the list contains more or less only the files to open, select them with Shift+click and/or Ctrl+click and Open them.

      I think it is not possible to assign a hotkey/chord to context menu command List Files in Project... for quickly opening this dialog by key which would be very handy.

      I requested with an email to IDM support adding this command also to ribbon tab Project, main menu Project, to a toolbar and last also to Key mapping configuration. Other UES users are encouraged to do the same. The more users request a feature the higher becomes the priority for implementation of the feature request.

      Another method for quick opening project files matching a pattern would be coding an UEStudio script for this task. The script can be added to Script list with a hotkey or chord assigned for fast execution by key. The script would first ask the user for the file name pattern. Next it would use Find in Files with an empty string to get a list of all project files and filter this list for files matching the entered pattern. The remaining project files would be opened by the script if not already opened.

      In my point of view the ribbon mode is definitely the wrong GUI mode for working with projects in UEStudio. It makes much more sense to switch to toolbar/menu mode with either contemporary or with traditional menus. This gives more vertical space for the document windows and additionally makes more commands easy accessible with a single mouse button click via the toolbars.

      There is by default only Main toolbar visible. But especially UEStudio contains several more toolbars for working with projects.

      The visibility of the toolbars can be changed with using contemporary menus on opening Layout - Toolbars and clicking on the available toolbars to toggle their visibility.

      The visibility of the toolbars can be changed with using traditional menus on opening View - Views/Lists - Toolbars and clicking on the available toolbars to toggle their visibility.

      Another method to change visibility of the toolbars working in toolbar/menu mode with contemporary and with traditional menus is right clicking on a toolbar and left clicking on Customize. On tab Toolbars the visibility of the predefined toolbars can be checked/unchecked.

      I suggest to check once all toolbars and look on each command of each toolbar. The toolbars not needed can be easily made hidden again by right clicking on the toolbar and left click on Hide this toolbar.
      Best regards from an UC/UE/UES for Windows user from Austria

      13
      Basic UserBasic User
      13

        Jun 07, 2017#3

        Hello Mofi,
        I did not have time to respond earlier to this nice help you sent me. Today I had some time to go through it.

        I have tested the "quick open" : this is definitely not for me:
        - it searches in one directory only
        - it does not suggest a list of corresponding files

        I have then tested the "List files in project" :
        - It is definitely better and could be optimal if, as you mention, it could be bound to a hotkey. Anyway, at least we know this feature is here and can help locate some files.

        Nevertheless, as my primary need is to have a list of files popping up as I type characters so that I can pick the right one I might continue to rely on an external application called "Everything" from voidtools which does this perfectly. Don't know if you know this small indexing application but this is exactly what would be perfect to have within UES.
        For instance if  am looking for this $-rail.php file, I would type "*.php rai" and it would list all files with php extension containing rai. I understand that in UES I would need to type "*rai*.php" which is stricter. Everything works like Google. Then pressing enter or double clicking in the result list fires UES as I have associated it with .php files.

        I'll also give a look to the toolbars and examine each command one by one. I agree with you : ribbon mode is not good at all as it consumes too much space.

        Thanks again for your time, this is very helpful in my evaluation process. I've been working with CodeWright for ages (I had customized the C code to meet my needs) and it's very hard to find an editor that come close. UE (and maybe SlickEdit too) was always the one that I knew could fit if I took the time to go into the details of all of these points I have listed (I have so many more) and that I always considered as blockers.
        You seem to be completely at ease with it.

        Best regards from Nizza.

        6,602548
        Grand MasterGrand Master
        6,602548

          Jun 07, 2017#4

          The Quick Open command can be used to open all files matching the pattern in a directory tree as well and not only in one directory. It is just needed to enable the check box item Open all matching files from subdirectories. But it does not present a list of files matching the pattern, it immediately opens the files.

          It is possible to use command Find in Files (via hotkey) to run a find in a specified directory (base project directory) with option Search subdirectories enabled and with option Results to edit window not enabled with an empty search string and with In files/types containing the file name pattern to get into active output window tab a list of files with full path matching the pattern. Double clicking on a file in output window opens that file if not already opened.

          But In files/types can't be specified if Project files is selected and therefore running a Find in Files with this option selected and with an empty string results in getting all project files listed in output window.

          However, it would be possible to use an UE/UES script which on execution by hotkey
          • asks the user for the file name pattern which can be even a Perl regular expression pattern,
          • runs a Find in Files to get a list of all projects files into active output window,
          • gets this files list from output window and filters it according to the file name pattern,
          • and writes the remaining file names list back into output window for the user.
          With OptionDlg configured as user tool the script could even present the project files matching the pattern in a multi-select dialog window on which the user can select the files to open or cancel if nothing suitable found (with showing once again the file name pattern dialog).

          But an interactive list with showing matching project files while entering the file name pattern is definitely not possible with an UE/UES script as the UltraEdit/UEStudio script environment is not designed for such user interactive tasks.

          I could code the script for you or somebody else being interested in such a script (when I have time).

          One more note: There is the command File list which is an IntelliTips feature and therefore available on IntelliTip toolbar which shows a list of project files and making it possible to select one by entering the beginning of the file name. This command is available in key mapping configuration dialog. But the selected project file is not opened, instead its file name is inserted into active file at current position of the caret. This is useful for example in C/C++ to insert in an include instruction the file name of a header file.

          PS: Do you know the feature to open a file on which file name the caret is current placed in active file with context menu?
          Best regards from an UC/UE/UES for Windows user from Austria

          13
          Basic UserBasic User
          13

            Jun 16, 2017#5

            Thanks for your post Mofi.
            I think I can get your point; I am not yet too much aware of UES scripting capabilities, but that is definitely an area I will look into when I am familiar with the basics.
            All the best.
            Jerome