facebook

Generate Java – classes are empty

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

    mhnRecommind
    Member

    Hi all,

    I can’t generate complete Java Files.
    The generated files don’t contain any attributes or methods, when I use Objects as attributes or in signatures.
    Sample:
    public class Search {}

    Is there any configuration missing ?
    Classes with only simple attributes (ints, float, long) are generated but if I use other classes (like Map, ArrayList etc) as attributes or in signatures, the generation fails.

    #246352 Reply

    Riyad Kalla
    Member

    Are you trying to use Java5 generics like List<Integer>? We don’t support Java 5 yet.

    #246366 Reply

    mhnRecommind
    Member

    No, I don’t use generics in the diagram.

    Now I created a new class with the same attribute definitions and methods as in a class that is not generated.
    This second class is generated well.
    What could be the reason that some classes are empty ?

    #246367 Reply

    Riyad Kalla
    Member

    Can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.

    After I get that information I can send it back to the UML team.

    #246416 Reply

    mhnRecommind
    Member

    Ok, I am sorry that I posted this nformation not immediately.
    Here ist my configuration summary:

    *** Date: Thu Feb 09 09:31:00 PST 2006
    *** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_06

    *** MyEclipse details:
    MyEclipse Enterprise Workbench

    Version: 4.1.0 GA
    Build id: 20060122-4.1-GA

    *** Eclipse details:
    Eclipse SDK

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse Platform

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse RCP

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse Java Development Tools

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse Plug-in Development Environment

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse Project SDK

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\Program Files\eclipse\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    878_68
    -vm
    C:\WINDOWS\system32\javaw.exe

    – Was Eclipse freshly installed for MyEclipse?
    –> Yes
    – Are any other external plugins installed?
    –> Yes:
    1) com.sysdeo.eclipse.tomcat_3.1.0
    2) com.oxygenxml.editor_6.2.7
    – How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*
    –> 4
    – What application server are you using?
    –> Apache Tomcat/5.5.12

    #246436 Reply

    Kapil Kapre
    Member

    mhnRecommind,
    I added a new class into my uml diagram, inserted an operation and an attribute. I changed attribute type to List and added a parameter to the method w/ type Vector. When I generate java both of them get gen. Is this working for you? If yes could you describe here the model you have for which it doesnt work. Also try generating code in a new location or delete existing java files and hitting refresh.

    #246477 Reply

    mhnRecommind
    Member

    When I add a new class with the same attributes and mehods like the buggy one, it is generated well.

    I copied my umr.file into a new project and deleted all classes except the buggy one.
    It is still not generated. I noticed that many not existing classes are offered for selection in the “Generate Java” dialogue. How can I clean up the model? I can’t see those classes in the diagram. And of course there are no classes in my project.

    #246478 Reply

    Kapil Kapre
    Member

    In the outline view, set the mode to “Package Centric” that should show you all the elements in the model.

    #246526 Reply

    mhnRecommind
    Member

    I deleted all other elements in the outline view in Package Centric mode.
    But I still can’t generate the body of my class.
    All the deleted classes and interfaces are still displayed in the “Generate Java” dialogue.
    I think I have to clean up my model but I really don’t know how to do it.

    #246553 Reply

    Kapil Kapre
    Member

    Could you send us your UMR ? (support@genuitec.com w/ ATTN: Kapil as subj) That would help us sort things out for you faster and also investigate the issue.

    #246556 Reply

    mhnRecommind
    Member

    I go mad !

    I started myEclipse again and tried it one more time.
    Now all the obolete classes are away from the “Generate Java” dialogue and the body is created.
    Perhaps there was a synchronization problem.
    I deleted also the .umr~ file before closing myEclipse last time.
    I keep track of this behaviour and I’ll send you the model if the error occurs again.
    I’ll also try to reproduce it with a new model.

    #246557 Reply

    Kapil Kapre
    Member

    Thanks for following up on your experience. I dont think deleting the umr~ file would have that impact. However to rule out any sync bugs, is your workspace on a network or is it linked elsewhere?

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: Generate Java – classes are empty

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