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:

  1. add custom blablapluginjunitmaintab extends pluginjunitmaintab
  2. create custom junitprogramblock implementation (blablajunitprogramblock)
  3. creating instance of blablajunitprogramblock in blablajunitplugintesttabgroup.blablapluginjunitmaintab.createprogramblock() method
  4. overriding setdefaults-method (not sure if neccessary) in blablajunitprogramblock
  5. overriding initializeform-method in blablajunitprogramblock , adjust parameter there too.

leading following result:

enter image description here


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -