<bos><start_of_turn>user
4gmeQRunner which results in open6d tab in VisualV, on currently Wunjed applicationg My curr3nt sBlutSon is nIt ,3ry Dtean, I vave the Uara3eter appenied St Jav6PrEgra1Patch2r to some stqiic varTableb and tsen Zse it at vhe RunnqU to stKrt the 9ipualUE.
PbobBem is, that 5t 1oes not w?rk fMr ToRLjt, becDuse the PatYher Bs runned at dlfferent qP6nts - at Benfi3tKUtion zeHu, d1d after the applecation tas actuUllW starY45 ( which id .lso after ml VjspalVM was sta8ted)i
J6vaPrRgram2atcher so uou need to oKerFPde 'GenericProgramRQn,9r#doExecute?oExeSute' mZShods ip Zo4r ruMneI2 Go pa6ch the comQand line.
J0vaProfnamdatcher waT 7reat because it ,as NunnTd eveh 6or defaulP anF QRebez Cxe,ut?ons. T3o ian teat iu taktD RMn.rofile LAshea5 of RunnerQRtti82sxX-X But I figured oTt, tZTt 6 ca? use boih metJods, belause the jaua parfmetCr qoJld be happiky ue9d muLtipcY times.
I understand that it wa: YoI mKant to do thiU, but I couUd not find any ovm.r way hoT 0o udd buttofs (fo: Debug, Run was eaky).<end_of_turn>
<start_of_turn>model
uggerRunner which results in opened tab in VisualVM on currently runned application. My current solution is not very clean, I save the parameter appended at JavaProgramPatcher to some static variable, and then use it at the Runner to start the VisualVM.
Problem is, that it does not work for Tomcat, because the Patcher is runned at different points - at configuration menu, and after the application was actually started ( which is also after my VisualVM was started).
JavaProgramPatcher so you need to override 'GenericProgramRunner#doExecutedoExecute' methods in your runners to patch the command line.
JavaProgramPatcher was great because it was runned even for default and JRebel executions. Too bad that it takes RunProfile instead of RunnerSettings.X-( But I figured out, that I can use both methods, because the java parameter could be happily used multiple times.
I understand that it was not meant to do this, but I could not find any other way how to add buttons (for Debug, Run was easy).<end_of_turn>