02.03.2014 Views

Tornado

Tornado

Tornado

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8<br />

Customization<br />

Close Window On Exit<br />

When this box is checked, <strong>Tornado</strong> closes the window associated with your<br />

tool when the command is done. This only applies when you also check the<br />

Redirect to Child Window box to redirect command output to a child window.<br />

Macros for Customized Menu Commands<br />

The pop-up menu opened by the buttons to the right of the text boxes provides<br />

several macros for your use in custom menu commands. These macros allow you<br />

to write custom commands that are sensitive to the context in the editor, or to the<br />

global <strong>Tornado</strong> context. For example, there are macros for the full path of the file<br />

in the active editor window, and for useful fragments of that file’s name. Table 8-2<br />

lists macros for editor context; in this table, the phrase active file refers to the file that<br />

is currently selected in the project facility.<br />

8<br />

Table 8-2<br />

Menu-Customization Macros for Editor Context<br />

Menu Entry Macro Description Example<br />

File path $filepath Full path to the active file. /usr/xeno/zap.c<br />

Dir name $filedir Directory containing the active file. /usr/xeno<br />

File name $filename Name of the active file, without path<br />

information.<br />

Base name $basename Name of the active file, without the file<br />

extension.<br />

zap.c<br />

zap<br />

Table 8-3 lists macros for the project facility context.<br />

Table 8-3<br />

Menu-Customization Macros for Project Context<br />

Menu Entry Macro Description Example<br />

Project dir $projdir The name of the<br />

directory of the<br />

current project.<br />

/usr/xeno/proj/widget<br />

Project<br />

build dir<br />

$builddir<br />

The name of the<br />

directory for the<br />

current build of the<br />

current project.<br />

/usr/xeno/proj/widget/default<br />

285

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!