facebook

Java Code Generation from UML

  1. MyEclipse Archived
  2.  > 
  3. UML Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #265694 Reply

    Paul Cahill
    Member

    Hello All,

    Well, I’ve been very productive and have our new design to a point where I need to generate my POJPs in their final form from the UML design so that I can then use them to generate the persistence database in Hibernate. The UML tool has some limitations however I am not obstructed from doing good design.

    I have 31 entity classes plus their relationships that need to be persisted and as I am about to annotate the classes with the persistence information, their generation is something that I need to get right or at least close. Also, as I mentioned in one of the other forums, I’d like to create meta data within the UML model that can be used directly in the code generation.

    Is it possible to use the Tagged Values which appear on the property sheet to hold annotations for the moment?

    If the answer is no, can I get at the code generation objects via configuration objects such as XSLT pattern files to modify the code generation to produce the code the way I want?

    Regards,

    Paul Cahill

    #265740 Reply

    Riyad Kalla
    Member

    Paul I’ve asked someone from the UML team to follow up with you.

    #265969 Reply

    Paul Cahill
    Member

    Hello Rkalla,

    Has anyone from the UML team time to take a look at this issue. I’m heavily into generating large amounts of code and its proving to be quite a bit of work to keep the model and the code in sync.

    Regards,

    Paul Cahill

    #265972 Reply

    Riyad Kalla
    Member

    Paul,
    It looks like this may not be a supported use-case, I am trying to find out other ways to accomplish this for you though. Also there are no hooks for you to build into at the moment for the code-generation facility.

    #266034 Reply

    jhm
    Member

    I have not tried that, but maybe you could use openArchitectureWare [1] for code generation from your model. In [2] it’s written that it support ArgoUML and (AFAIK) MyEclipse-UML is based on Argo …

    (but I would be also interested in knowing that 😉

    [1] http://www.openarchitectureware.org/
    [2] http://www.eclipse.org/gmt/oaw/download/notesRC2.php

    #266226 Reply

    Riyad Kalla
    Member

    jhm,
    Thank you very much for the links, we’ll certainly take a look.

    #266549 Reply

    Paul Cahill
    Member

    Hello Riyad,

    I’ve taken a good look at the openarchitectureware components recommended by jhm and they list quite a few UML tools that they support but not your version. The product takes emf output from a UML editor and generates code using a rules engine that has a programmable xml language (well suited by the look of it).

    In addition to this, its also has a Workflow framework that will allow you to create a dependancy relationship so that when certain artifacts are changed, a programmable workflow is triggered. This means it can be used to keep the model automatically in synch with the underlying code (on the generation direction using the openarchitectureware product). This product has been adopted by Borland who are replacing their own product so it looks like it should be solid.

    If you guys at myEclipseIde can expose the api for reverse engineering from code (plus encapsulating the body of the methods in the model, then the workflow may be used to adopt changes from the source code automatically also. This way the manually drawn models don’t need to be re-layed out.

    Anyhow Riyad, I’d appreciate it if you could ask your project manager where my offer of assistance is in his queue. I wouldn’t knock back an offer of free help for any of my projects.

    My development has shifted into high gear as I have developed 51 classes since I first wrote to you on the 2nd February. I’ve annotated the classes manually and have generated most of the hibernate persistence tier successfully (wow what an great tool hibernate is). We’ve nearly lost a month and I am a little concerned this is not going to be taken up and I’m somewhat hamstrung without this capability.

    I notice the openarchitectureware product also has a hibernate plugin that generates mapping files instead of annotations so someone else has thought this is a good idea. The mapping approach has one advantage that it does not pollute the java code with no domain information and as long as the mapping files are kept with the java code, then there should be no problem. Personally I like the annotations as you can code them in context but this may be irrelevant if the code is generated directly from the UML model.

    Anyhow, I hope this email finds you well and would appreciate hearing from you soon.

    Regards,

    Paul Cahill

    #266554 Reply

    Riyad Kalla
    Member

    Paul,
    OAW looks to be a very interesting piece of technology. I’m trying to wrap my brain around how this fits next to, or replaces the UML2/UML2 Tools project from Eclipse.

    I have pinged our product manager 2 other times about your offer and unfortunately it just happens to be the worst possible time, he is managing:
    * 5.1.1 release
    * 5.5 M1/M2/GA release
    * EclipseCon (Presentation, materials, announcements, meetings, etc.)

    It may be another couple of weeks before he has the bandwidth to address this issue.

    Have you gotten a chance to play with OAW yet?

    #266673 Reply

    berndkolb
    Member

    Hi!

    My name is Bernd Kolb and I am one of the developers of the openArchitectureWare code-generator framework. So whoever is interested, I am looking forward to meet you there.

    OAW looks to be a very interesting piece of technology. I’m trying to wrap my brain around how this fits next to, or replaces the UML2/UML2 Tools project from Eclipse.

    oAW supports a lot of different tools/meta-model-implementations. One of them is the UML2 project of Eclipse. Also there is a small utility which converts (Eclipse)UML2 models into emf models which then again can be read by oAW (This is e.g. useful if you’d like to use GMF for building editors).

    I’ll be at the EclipseCon next week. There will be a full-day tutorial on oAW on Monday (MDSD from front-end to code). So whoever is interested, I am looking forward to meet you there.

    FYI:
    oAW comes with several languages: One for writing constraints on models, one for transforming/modifying models and one for generating code.
    As already mentioned there is also a workflow component. The GMF Project is going to replace their currently used generator language JET with our XPAND language. For all these language we have editors with syntax highlighting and code completion.

    If you’d like to know more. Please feel free to contact me (bernd __D_O_T## kolb __A_T## openarchitectureware __D_O_T## org) or one of the other team-members.

    Best regards

    Bernd

    #266696 Reply

    Riyad Kalla
    Member

    Bernd,
    Thank you for posting. We will certainly try and make the oAW session. Do you have a date/time for it?

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Java Code Generation from UML

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