java - Change default "Program to Run" in Eclipse launch configuration -
every , launching junit tests within eclipse using
run > junit plug-in test
by default eclipse assumes running requires workbench , chooses in "main" section of launch configuration
launchconfig > main > program run > run application > org.eclipse.ui.ide.workbench
i can understand why default, me (and in our team) never ever case. need run our junit plug-in tests as
launchconfig > main > program run > run application > [no application] headless mode
how change default behaviour? using eclipse 4.4.
it seems custom launchconfiguration-extension viable solution attempt. did create new, custom launchconfiguration-extension 99.999% build on junitlaunchconfiguration. had add custom
blablajunitplugintestlauncher extends launching.junitlaunchconfigurationdelegate
which overrides
launch(ilaunchconfiguration, string, ilaunch, iprogressmonitor)
method adjust application parameters according our needs.
blablajunitplugintesttabgroup extends org.eclipse.pde.ui.launcher.junittabgroup
to able initialize launchconfig dialog default parameter, had to:
- add custom
blablapluginjunitmaintab
extendspluginjunitmaintab
- create custom junitprogramblock implementation (
blablajunitprogramblock
) - creating instance of
blablajunitprogramblock
inblablajunitplugintesttabgroup.blablapluginjunitmaintab.createprogramblock()
method - overriding
setdefaults
-method (not sure if neccessary) inblablajunitprogramblock
- overriding initializeform-method in
blablajunitprogramblock
, adjust parameter there too.
leading following result:
Comments
Post a Comment