Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » [Solved:] How to "Generate Java Code"?
[Solved:] How to "Generate Java Code"? [message #1219800] Thu, 05 December 2013 20:15 Go to next message
Stefan Eidelloth is currently offline Stefan EidellothFriend
Messages: 29
Registered: September 2011
Junior Member
I just discovered the menu option (right click on Class in Class Diagram)
=>Java=>"Generate Java Code"

It gives me following error message:
...................................................
"Problem Occured"
'Generate java classes' has encountered a problem.
No classes or packages produced from the
transformation. Nothing is generated.
...................................................

How do I correctly use this feature to generate java code from an Papyrus UML class diagram? Are there some Tutorials on java code generation with Papyrus?

I only know about some old topics on java code generation:
http://stackoverflow.com/questions/7130937/how-to-generate-code-by-papyrus-on-eclipse
http://www.eclipse.org/forums/index.php/mv/msg/466701/1067046/#msg_1067046

The impression that I get from those old topics is that Papyrus is not able to generate java code on its own and that I would have to use additional plugins. Did this change? If Papyrus is not yet able to generate java code: what is the meaning of that context menu?

[Updated on: Sat, 14 December 2013 19:45]

Report message to a moderator

Re: How to "Generate Java Code"? [message #1220521 is a reply to message #1219800] Thu, 12 December 2013 10:28 Go to previous messageGo to next message
Cedric Dumoulin is currently offline Cedric DumoulinFriend
Messages: 50
Registered: July 2009
Member
Hi Stefan,

I have just try the java generator, and I have the same problem. A
library is missing in qvto.
This is a new bug. I will correct it asap.
Can you fill a bug report in bugzilla (with me in cc) ?

Otherwise, this generator work as you have tried:
- select a class or a package, and choose "generate java file". The
class will be generated.
- you can also model projects, src dir and packages in your UML model
(by using stereotypes). The generator will generate the classes in the
specified project, sources dir and packages.

Hope this help,
Cedric


Stefan Eidelloth a écrit :
> I just discovered the menu option (right click on Class in Class Diagram)
> =>Java=>"Generate Java Code"
>
> It gives me following error message:
> ..................................................
> "Problem Occured"
> 'Generate java classes' has encountered a problem.
> No classes or packages produced from the transformation. Nothing is
> generated.
> ..................................................
>
> How do I correctly use this feature to generate java code from an
> Papyrus UML class diagram? Are there some Tutorials on java code
> generation with Papyrus?
>
> I only know about some old topics on java code generation:
> http://stackoverflow.com/questions/7130937/how-to-generate-code-by-papyrus-on-eclipse
>
> http://www.eclipse.org/forums/index.php/mv/msg/466701/1067046/#msg_1067046
>
> The impression that I get from those old topics is that Papyrus is not
> able to generate java code on its own and that I would have to use
> additional plugins. Did this change? If Papyrus is not yet able to
> generate java code: what is the meaning of that context menu?
Re: How to "Generate Java Code"? [message #1220721 is a reply to message #1220521] Fri, 13 December 2013 09:42 Go to previous messageGo to next message
Johan Hardy is currently offline Johan HardyFriend
Messages: 47
Registered: December 2012
Member

Try the UML to Java generator based on Acceleo : https://github.com/ObeoNetwork/UML-Java-Generation
Re: How to "Generate Java Code"? [message #1220862 is a reply to message #1220721] Sat, 14 December 2013 19:44 Go to previous messageGo to next message
Stefan Eidelloth is currently offline Stefan EidellothFriend
Messages: 29
Registered: September 2011
Junior Member
Thank you for your answers.
I reported the bug here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=424061
Re: [Solved:] How to "Generate Java Code"? [message #1727977 is a reply to message #1219800] Wed, 30 March 2016 05:22 Go to previous message
Zeba Rizvi is currently offline Zeba RizviFriend
Messages: 2
Registered: March 2016
Junior Member
Hello Sir,
can you provide the code to create class diagram of uml diagram using papyrus API in normal java plugin.
Previous Topic:Syml
Next Topic:Documentation Generation
Goto Forum:
  


Current Time: Thu Jan 21 12:42:49 GMT 2021

Powered by FUDForum. Page generated in 0.01995 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top