Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Unit Test Plugin

<< < (2/3) > >>

koonschi:
Progress so far:

I created a menu bar, a toolbar and an additional option "repeat last run". This comes in handy if you're editing a file and just want to repeat the test to see whether it worked.
Furthermore, the right-click menu is only shown if tests are detected in the current file, otherwise it's left alone. I think this is ok, isn't it?

I have two problems right now:
First: How could I 'mark' a project as a test project? I was thinking of either some kind of setting in the project file (which needs to be saved, too). If you have a better idea, I'd be happy to hear it.
Second: How do I **reliably** enter the add the menu bar entry after Debug? I have a feeling that sometimes my plugin is loaded before the Debug entry exists, thus placing it wrong.
 
Progress Screenshot:
http://i.imgur.com/cPKrgEB.png

killerbot:
naive approach : unit test project when linked with unittest++ ????

koonschi:
Could work. I'll give it some more thought.

koonschi:
I've come up with an even simpler method. I have to detect all tests in all open projects anyway, so I'll just assume a project is a test project if it contains tests :).

But there is still the problem with the menu bar. If the Unit Testing menu is supposed to be after the Debug menu, how can I reliably insert it there?
Looking for the Debug menu and then inserting my entry after it doesn't work.

oBFusCATed:
The debug menu is created after the first debugger plugin is loaded. If there are no debugger plugins there will be no debug menu.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version