More vars for external tools

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
kenmo
Addict
Addict
Posts: 2033
Joined: Tue Dec 23, 2003 3:54 am

More vars for external tools

Post by kenmo »

Been working on some IDE external tools, I have a few suggestions for future tool features:

1. It is nicer to write tools using the environment variables ("PB_TOOL_Whatever") rather than the commandline tokens ("%WHATEVER") since you don't need to parse through program parameters, and you don't need to write out the %ARGUMENTS in the tool configuration.

Some of the %TOKENS are already available as environment variables (CURSOR, SELECTION, WORD) but I wish that ALL of the %TOKENs were passed as environment variables!

2. There is a PB_TOOL_FileList variable, which gives all the open documents, but it would be nice to know which is the Active document!

3. Similarly, a PB_TOOL_Project variable would be nice to know which IDE project is open.
EDIT: I just noticed #3 was added in PB 5.30. Thanks!
EDIT #2: How about I replace this with another request: PB_TOOL_IDEVersion and PB_TOOL_CompilerVersion ?

4. Now that there is a /PREPROCESS compiler argument, would it be possible to pass the preprocessed source to an external tool, like %PREPROCESS or PB_TOOL_Preprocess?

5. (This is probably the most difficult request.) It would be nice if multiple triggers could be selected for one tool. Currently we have to make duplicate tool entries for different triggers. (But this might be complicated, since different triggers might need different settings and arguments!)

Any other ideas? Thanks for reading this! :)