GenerateModel does not take commandline arguments

Description

When you start the GenerateModel launch configuration it opens a window to take its parameters. In former (pre-OSGi) times you could give the parameters as commandline arguments.

While working on my own plugin in my own source tree and with my own entity it is very annoying to enter the parameters again and again. I want to copy the run configuration and give it commandline arguments like I could do that with ADempiere.

The old behaviour was documented here: http://www.adempiere.com/How_to_create_a_complete_new_module_in_ADempiere#Step_4:_Generate_Model_Class_for_Billing_and_Billing_Line_model and here: http://www.adempiere.com/NewWindow#Generate_Model

Environment

None

Attachments

2

Activity

Thomas Bayen 
January 29, 2014 at 6:13 PM

The second patch solves the issue that the new OSGi GenerateModel does not behave exactly like the old (pre-OSGi) commandline version. With this patch you can not only give an LIKE expression for the TableName but also a comma-separated list for IN (...). Your parameter has to have the form "'BLA_MyTable','BLA_MyTable2','BLA_MyTable3'".

RedhuanO 
January 16, 2014 at 1:52 PM

Tbayen's patch saved my life grinning face with big eyes
It worked perfectly for my mac machine that has trouble with XStart via Eclipse. So i used it with the params args, but you must not use 'quotes'. Just params separated by spaces.
Perhaps it can be a good replacement for Dialog box or as separate console alternative.
++1 from me.

Thomas Bayen 
January 14, 2014 at 7:53 AM
(edited)

This patch works well for me. please review.

To make use of it I copied the run configuration of the GenerateModel application. Then I added the following to the "Program arguments" text field:

'${project_loc}/src' 'de.bayen.freibier.model' 'BAY' 'BAY_%'

(the values are just an example for my own freibier plugin project). I can save this run configuration and start it with one click. slightly smiling face

Fixed

Details

Assignee

Reporter

Labels

Tested By

RedhuanO

Affects versions

Priority

Created January 14, 2014 at 7:31 AM
Updated July 5, 2014 at 2:50 PM
Resolved April 2, 2014 at 3:22 PM