Tapatalk

Opening include files

Opening include files

6
NewbieNewbie
6

    May 15, 2012#1

    Hi folks, just got back to using UltraEdit again (Version 18) and was wondering if there was a way to set it up so that I can double-click an include file and have it open in a new tab. I see that if I do a 'Find In Files' and double-click 1 of those entrys in the output window then it opens for me and would like to do this in the main code of my programs.

    6,685587
    Grand MasterGrand Master
    6,685587

      May 15, 2012#2

      UltraEdit executes Edit - Select Word if you double click on a string. A word is defined as a string consisting of [0-9A-Za-z_] and local letters like German äöüÄÖÜß in my case. If you double click on a string while holding CTRL key, a larger string can be selected according to configuration settings at Advanced - Configuration - Editor - Delimiters.

      But you don't need to select the name of an include file. You can simply execute a right click and left click in context menu on first item showing the name of the file under cursor if UltraEdit is able to detect the string under cursor as file name and can find the file. This feature has the name Open File Under Cursor and it can be executed also with a hotkey instead of using mouse. The Key Mapping configuration dialog contains the command FileOpenFileUnderCursor to which you can assign a hotkey or chord you like. I use Alt+O.

      For more details on this feature see How to open a selected file name or file name under cursor via right click?

      Please note the difference of files included with #include "file" and files included with #include <file>.

      Files included with double quotes must be specified with a path relative to active file (or very uncommon with full path) and therefore UltraEdit has usually no problem to find and open them.

      Files included with <...> are located in one of the common library paths. UltraEdit as a general text editor does not know these common library paths as they are defined in the makefile of the project. Therefore UltraEdit cannot find and open those include files.

      When using UEStudio and setting up a configuration for a project for a specific compiler, the library paths must be usually also configured so that UEStudio can include them in automatically created makefile for compile/build/rebuild. As UEStudio knows the library paths, the symbol parser of UEStudio finds also files included with <...> and adds their symbols to the symbol database. Therefore it is very easy to jump to the definition of a symbol in such include files too using toolbar command Find symbol definition in project tools.