Page 1 of 1

[Solved] Can we have a Hotkey "Run Project as Unit Test"?

Posted: Sat Oct 24, 2015 12:54 am
by Modem Man
Hi Eran,

I would like to have the UnitTest++ Plugin available in "Keyboard Shortcuts", so I can assign a key to it. Do you think, this is easily done? Can I do it by myself? Or, please, can you do it, if code changes are required?

@all:
The UnitTest++ integration is a very, very useful thing inside CodeLite, especially together with Jeff Langr's book about test driven development. The only things I'm missing are hotkeys for "just run tests" and "make Test Project, then run tests". This may be a special topic from my likings - I don't use a mouse while writing code...

Eran, I just donated 25 bucks via paypal to help you finding a positive decision :twisted:
No, I'm joking! I donated because you deserve it.

Keep up the good work!
Maik, aka "Modem Man"

Re: Can we have a Hotkey for "Run Project as Unit Test"?

Posted: Mon Oct 26, 2015 8:51 pm
by eranif
This is now committed to git master
Eran

Re: Can we have a Hotkey for "Run Project as Unit Test"?

Posted: Mon Oct 26, 2015 10:43 pm
by Modem Man
eranif wrote:This is now committed to git master
Eran

You made my day!!
:D
Hmm (talking to myself) ... shall I think about to translate my own nightly build of CodeLite? ... could be a nice training to get familiar with Git again ...

Re: Can we have a Hotkey for "Run Project as Unit Test"?

Posted: Tue Oct 27, 2015 11:46 am
by eranif
To apply the fix on your local CodeLite installation:

1. Close CodeLite

2. Open the file:

Code: Select all

/usr/share/codelite/config/accelerators.conf.default
or:

Code: Select all

C:\Program Files\CodeLite\config\accelerators.conf.default
and append the following 4 lines to the bottom:

Code: Select all

unittestpp_new_simple_test|Plugins::UnitTest++|Create new test...|
unittestpp_new_class_test|Plugins::UnitTest++|Create tests for class...|
mark_project_as_ut|Plugins::UnitTest++|Mark this project as UnitTest++ project|
run_unit_tests|Plugins::UnitTest++|Run Project as UnitTest++ and report|
3. Start CodeLite
4. Go to: Settings->Keyboard Shortcuts and click on the "Defaults" button (this will tell CodeLite to reload the defaults keyboard shortcuts from the file you just edited)

You should now have 4 new entries under: keyboard shortcuts->plugins->UnitTest++

Eran

Re: Can we have a Hotkey for "Run Project as Unit Test"?

Posted: Tue Oct 27, 2015 10:45 pm
by Modem Man
Hi Eran,
eranif wrote: 4. Go to: Settings->Keyboard Shortcuts and click on the "Defaults" button
Eran
I was first a bit angry to loose my beloved keyboard settings, but then I found out, the default keyboard settings already are my favourite ones ;)
In my setup, I assigned Ctrl+Alt F7, so I can quickly queue make (F7) and test. Nice!

Yes it works! Yippee!! :D

Thank you very, very much!