Primitive Types are not generated [message #1804056] |
Sat, 16 March 2019 17:18  |
Eclipse User |
|
|
|
Hi,
I have managed to create a model and I want to generate the corresponding java code however, the "Primitive" data types are not generated probably because I don't know how to map them them to java primitive types correctly. for example I want to define a DateTime primitive data type that should be mapped to java.util.Date . Should I use a specific stereotype or a redifined classifier to something else?
I am using papyrus 2018-12 (4.10) and the designer update site: http://download.eclipse.org/modeling/mdt/papyrus/components/designer/. I have created a UML model and I have managed to generate Java Project
Regards
Mohamed Ismail
|
|
|
|
Re: Primitive Types are not generated [message #1804187 is a reply to message #1804075] |
Wed, 20 March 2019 02:53  |
Eclipse User |
|
|
|
Hi,
I haven't seen this error, which seems to happen during code formatting by JDT - it's unrelated to the issue and - as it seems - outside SW designer. The Java code generator does not support primitive types. The main motivation was that Java does not really have primitive types except for the builtin ones like int, char, boolean ... that are handled by the generator. Thus, I would recommend to use classes instead. It is arguable that primitive types could still be used at the UML level and be mapped to Java classes, in this case you could consider posting a bug with severity "enhancement"
Ansgar.
|
|
|
Powered by
FUDForum. Page generated in 0.26410 seconds