close #114, add symstring for the runnable binary file

This commit is contained in:
Basile Burg 2017-01-29 06:07:17 +01:00
parent d7a740fc01
commit 7025ca3b7d
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
2 changed files with 5 additions and 2 deletions

View File

@ -29,6 +29,7 @@ Current file:
- **`<CFF>`**: also _`<CurrentFileFile>`_. Expanded to the current file filename. - **`<CFF>`**: also _`<CurrentFileFile>`_. Expanded to the current file filename.
- **`<CFP>`**: also _`<CurrentFilePath>`_. Expanded to the current file path. - **`<CFP>`**: also _`<CurrentFilePath>`_. Expanded to the current file path.
- **`<CFR>`**: also _`<CurrentFileRunnable>`_. Expanded to the runnable produced for the current file. The [OutputFolder](features_runnables) option is not handled.
- **`<CI>`**: also _`<CurrentIdentifier>`_. Expanded to the identifier located at the caret position. - **`<CI>`**: also _`<CurrentIdentifier>`_. Expanded to the identifier located at the caret position.
- **`<CL>`**: also _`<CurrentLine>`_. Expanded to the current line of code. - **`<CL>`**: also _`<CurrentLine>`_. Expanded to the current line of code.
- **`<CS>`**: also _`<CurrentSelection>`_. Expanded to the current selection. - **`<CS>`**: also _`<CurrentSelection>`_. Expanded to the current selection.

View File

@ -14,7 +14,7 @@ type
* Enumerates the symbol kinds, used to index an associative array. * Enumerates the symbol kinds, used to index an associative array.
*) *)
TCESymbol = ( ENV_USER, ENV_HOME, ENV_TEMP, CAF, CAP, TCESymbol = ( ENV_USER, ENV_HOME, ENV_TEMP, CAF, CAP,
CFF, CFP, CI, CL, CPF, CPP, CPO, CPOP, CPR, CPN, CPFS, CPCD, CS); CFF, CFP, CFR, CI, CL, CPF, CPP, CPO, CPOP, CPR, CPN, CPFS, CPCD, CS);
const const
FirstVariableSymbol = CFF; FirstVariableSymbol = CFF;
@ -194,7 +194,8 @@ begin
if not fDoc.fileName.fileExists then if not fDoc.fileName.fileExists then
fDoc.saveTempFile; fDoc.saveTempFile;
fSymbols[CFF] := fDoc.fileName; fSymbols[CFF] := fDoc.fileName;
fSymbols[CFP] := fDoc.fileName.extractFilePath; fSymbols[CFR] := fSymbols[CFF].stripFileExt + exeExt;
fSymbols[CFP] := fSymbols[CFF].extractFilePath;
if fDoc.Identifier.isNotEmpty then if fDoc.Identifier.isNotEmpty then
fSymbols[CI] := fDoc.Identifier; fSymbols[CI] := fDoc.Identifier;
fSymbols[CL] := fDoc.LineText; fSymbols[CL] := fDoc.LineText;
@ -283,6 +284,7 @@ begin
'CAP', 'CoeditApplicationPath': Result += fSymbols[CAP]; 'CAP', 'CoeditApplicationPath': Result += fSymbols[CAP];
// //
'CFF', 'CurrentFileFile' : Result += fSymbols[CFF]; 'CFF', 'CurrentFileFile' : Result += fSymbols[CFF];
'CFR', 'CurrentFileRunnable' : Result += fSymbols[CFR];
'CFP', 'CurrentFilePath' : Result += fSymbols[CFP]; 'CFP', 'CurrentFilePath' : Result += fSymbols[CFP];
'CI', 'CurrentIdentifier' : Result += fSymbols[CI]; 'CI', 'CurrentIdentifier' : Result += fSymbols[CI];
'CL', 'CurrentLine' : Result += fSymbols[CL]; 'CL', 'CurrentLine' : Result += fSymbols[CL];