Page 1 of 1

Autoexecute tool(s) at compile command

Posted: Mon May 24, 2010 10:42 pm
by Kurzer
A suggestion to improve the project panel and the compile functionality.

It would be fine, if we could assign one ore more 'tools' (from the tools menu) to a single project file.
Why this?

The tool should be executed automatically if the user hits F5 or press the compile button and then the tool should run before the PB compiler is doing it's work.

So the user can assign a preprocessor for example to the maincode of his project.

Without this feature he first have to activate the editortab with the corresponding sourcefile, then execute the preprocessor-tool manually and at last he have to press the compile button.

The tool-execution should work like a manual excution from the tools menu - inclusive the %FILE Parameter etc.
And if possible, the user could assign more than one tools to a sourcfile (like a chain).

Example visualisation:

Code: Select all

Projekt "MyProject"
Projectfiles                  Assigned Tools

- Main.pb ------------------> Preprocessor Tool 1 --> Preprocessor Tool 2
- Network.pb
- Settings.pb --------------> Preprocessor Tool 3
So if the user hit 'compile' the following should happen:

1) Start Preprocessor Tool 1 (%FILE parameter points to Main.pb)
2) Start Preprocessor Tool 2 (%FILE parameter points to Main.pb)
3) Start Preprocessor Tool 3 (%FILE parameter points to Settings.pb)
4) Start the PB Compile process

If you wonder which preprocessors I am talking about. I mean for example 'Editor-linebreak-preprocessors' or 'automatic procedure declaration-preprocessors' etc...

Sorry for my godawful description - I hope you understand my suggestion... I am so tired at the moment and my english is generally not the best. ;)

Re: Autoexecute tool(s) at compile command

Posted: Tue May 25, 2010 7:47 am
by blueznl
That is already possible. Look for the 'triggers' in the 'tools' menu in the IDE. I'm using those for CodeCaddy as well. Or isn't that what you were looking for?

Currently, there's just one tool launchable, but I believe it may be possible to tie in multiple, just didn't have time to explore in that direction.

Re: Autoexecute tool(s) at compile command

Posted: Tue May 25, 2010 9:13 am
by Kurzer
Hello Blueznl,
thank you for this information. I didn't know that feature detailed (shame on me), I use the tools only with shortcut.

I will check it this evening.

I hope it is possible to set the "input sourcecode" which is defined in the project options) as %FILE parameter for the tool.

My problem now is, I have to switch back to the "main sourcecode" of my project each time before I can execute the preprocessor tool.

Re: Autoexecute tool(s) at compile command

Posted: Tue May 25, 2010 9:00 pm
by Kurzer
Now I had a deeper view on it.

You're right Blueznl, I can use the preprocessor tool with option 'before compiler starts' and parameter %COMPILEFILE
Maybe this works for more than one tools with same trigger settings to set up a preprocessor chain. But this tools would always be started - for every code. Even for code that is not suitable for some of the preprocessors.

If I could assign different tools depending on the project, it would be more flexible.

But its of course only a 'nice to have' - I don't think I'm going to get tendinitis, just because I always have to press a shortcut. :lol: