facebook

Want to customize code generation, but can’t see model

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #313304 Reply

    rdennisj
    Member

    I want to extend the code generator, to implement table columns defined with a foreign key, as a drop-down box with choices populated from the foreign key table. But I don’t know how to read the ecore model to get foreign key data from the ‘relationships’ segment of the model. I have gone thru EMF tutorials, where an ecore model is being generated (as an example), but the XML element and attribure names don’t match up to the properties you reference in your .jet files.
    Is there some way we can see what you generate into an ecore model, so we can see what kinds of metadata is available to us during code generation?

    Thanks! And keep up the good work!

    #313339 Reply

    davemeurer
    Member

    Hello,

    One way you can see the eCore models is if you Enable the Spring DSL, and then look in the folder structure under the .springDSL folder. For more about Enabling the Spring DSL, please see the tutorial: http://www.myeclipseide.com/documentation/quickstarts/ME4STutorialInitialization/me4sinitializationarticle.html

    Regarding relationships, a good example in our JET templates in the customization project can be found in the GWT templates that handle creating Pickers which are used to create associations to related objects.

    HTH,
    Dave

    #313343 Reply

    rdennisj
    Member

    Dave,
    Thanks so much for the response. I did have the Spring DSL enabled (per an earlier post where you recommended this). I notice artifacts are created under .springDSL, in subfolders dao, domain, and service. If I have a domain file called ‘item’, I see there are files in the domain subfolder, named:
    item.datatype
    item.datatypebinding
    item.gwtdatatype
    item.jaxbdatatype

    Which of these files is used as the model source when the FLEX client generation is executed?

    #313344 Reply

    davemeurer
    Member

    Hello,

    The main model used in Flex is item.datatype.

    item.datatypebinding is the model that holds information for JPA related information and persisting to the database.

    item.gwtdatatype as you would expect is a model for GWT.

    and, item.jaxbdatatype is used to hold the XML annotation information on the domain object.

    Kind regards,
    Dave

    #313346 Reply

    rdennisj
    Member

    Awesome, thanks!

    #313672 Reply

    jkennedy
    Member

    Let me know if you need anything else.

    Thanks,
    Jack

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Want to customize code generation, but can’t see model

You must be logged in to post in the forum log in