facebook

UML 2 generating empty Classes

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

    nuspy
    Member

    In case I use UML2 and after that I generate java domain classes, classes are generated, but empty.
    That is what I do:

    1) new java project
    2) new UML2 model, insert name, finish.
    3) in UML2 View:
    3.1) Create a package
    3.2) inside the package I create 2 domains : Book, Chapter
    3.3) create Composit association from Book to Chapter
    3.4) set multiplicity on Chapter side to 0..*
    4) Save diagram
    5) From menu -> UML2 -> Generate Java (Class are Generated)

    Class files are empty:

    
    package UMLone;
    
    public  class Book  {
    
     }
    

    What Am I doing wrong? I tested it with different environment (Windows 7 64bit and Ubuntu 32bit).
    This is my installation detail:

    
    
    *** Date: 
    Monday, March 14, 2011 4:03:33 PM CET
    
    ** System properties:
    OS=Linux
    OS version=2.6.32
    Java version=1.6.0_13
    
    
    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 8.6.1
    Build id: 8.6.1-20101117
    
    
    *** Eclipse details:
    MyEclipse for Spring
    
    
    Version: 8.6
    
    
    
    
    
    
    Eclipse startup command=-os
    linux
    -ws
    gtk
    -arch
    x86
    -showsplash
    -launcher
    /home/andrea/Genuitec/MyEclipse for Spring 8.6/myeclipseforspring
    -name
    Myeclipseforspring
    --launcher.library
    /home/andrea/Genuitec/MyEclipse for Spring 8.6//../Common/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520/eclipse_1206.so
    -startup
    /home/andrea/Genuitec/MyEclipse for Spring 8.6//../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
    -exitdata
    4618032
    -install
    /home/andrea/Genuitec/MyEclipse for Spring 8.6
    -configuration
    /home/andrea/Genuitec/MyEclipse for Spring 8.6/configuration
    -vm
    /home/andrea/Genuitec/Common/binary/com.sun.java.jdk.linux.x86_1.6.0.013/bin/java
    

    Thank you!

    #315221 Reply

    support-swapna
    Moderator

    nuspy,

    Thank you for the detail steps. I could replicate the issue at my end. I have filed a PR for the dev team to look at it.
    Sorry for the inconvenience caused.

    #316366 Reply

    oriolus
    Member

    Same problem with generating XML Schema.

    Composite Association with isNavigable checkbox is checked on the “Second End”

    <?xml version=”1.0″ encoding=”UTF-8″ standalone=”no”?>
    <xsd:schema xmlns:Test=”http://www.genuitec.com/Test.xsd&#8221; xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; targetNamespace=”http://www.genuitec.com/Test.xsd”&gt;
    <xsd:annotation>
    <xsd:documentation xml:lang=”en”>Generated By MyEclipse UML2</xsd:documentation>
    </xsd:annotation>
    <xsd:element name=”Book” type=”Test:Book”/>
    <xsd:complexType name=”Book”>
    <xsd:sequence/>
    </xsd:complexType>
    <xsd:element name=”Chapter” type=”Test:Chapter”/>
    <xsd:complexType name=”Chapter”>
    <xsd:sequence/>
    </xsd:complexType>
    </xsd:schema>

    OS X
    MyEclipse 9.0 (build 9.0-20110318)

    When can we expect the solution?

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: UML 2 generating empty Classes

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