Tapatalk

Accessing project working directory from tools configuration

Accessing project working directory from tools configuration

1
NewbieNewbie
1

    Mar 09, 2009#1

    Hello Everyone,

    What I would like to do, is setup a project and specify a working directory for the project. I don't believe I can do that, but please correct me if I am wrong.

    Next, I would like to create project specific tools, and reference the project working directory in the script. Again, I don't think that is possible.

    Lastly, I would love to be able to reuse the tools when I create another project.

    The reason for the request, is that I am starting to use Ultraedit/studio with Grails development and I am creating project specific tools for the commands such as grails generate-controller %modify% or grails run-app, etc. This works great if I setup the working directory by hand for each project tool. I would rather just use a variable, so I could reuse the tool in another grails project.

    Any thoughts or insight into how I might use UEStudio to make that task just a little easier.

    Thanks very much.

    6,685587
    Grand MasterGrand Master
    6,685587

      Mar 09, 2009#2

      In the project settings dialog you can specify a project directory. If this field is left empty, the project directory is the directory of the project file. The project directory is used additionally to the current working directory when UltraEdit tries to find a file with a relative path and a project is currently open.

      You don't have access to the internal variable containing the project directory string from within a script or macro. But you can use the project directory in user tools or project tools. See in help of UltraEdit / UEStudio the page Tool Configuration command (Advanced menu).

      The configurations of the general user tools are saved in the INI file and are available project independent, but can nevertheless use project variables. The configurations of the project tools are saved in the project file and therefore are project specific.

      To get the project directory from within a script or macro you have to configure a user tool which for example copies the project directory into the Windows clipboard or saves it into a file or just prints it to standard output and UE/UES captures that output to a new file. For example to copy the project directory to windows clipboard you can use a user tool with following command line:

      echo "%rp" | path to tool\clip.exe
      Best regards from an UC/UE/UES for Windows user from Austria