Accessing project working directory from tools configuration

Help with setting up and configuring custom user tools in UltraEdit (based on command line input)

Accessing project working directory from tools configuration

Postby YoungSoul » Mon Mar 09, 2009 12:05 am

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.
YoungSoul
Newbie
 
Posts: 1
Joined: Sun Mar 08, 2009 11:55 pm

Re: Accessing project working directory from tools configuration

Postby Mofi » Mon Mar 09, 2009 3:54 am

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
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Custom User Tools/Tool Configuration

cron