file Problems with "Round Trip" in Modelio 3.8

2 months 3 weeks ago #5589 by FBA
Bonjour!

I am trying to use Modelio's 3.8 Round Trip feature with a relatively small example of an Airport model (around 20 classes). I have added the "javadesigner.jar" file in the referenced libraries in Eclipse so that the annotations don't give any error. I also guantanteed that Modelio's and Eclipse workspaces are pointing to the same src directory.

I generated the model out of the code (in Java) and then did some changes both in the model and in the code. However:

i) When I try to generate code out of the model with Modelio's JavaDesigner, I get several errors without descriptive warnings (see attachment "GenerateErrors.PNG");

ii) When I try to syncronize, also with Modelio's JavaDesigner, with the option "Update model from sources if necessary", Modelio parses all classes but I also get a lot of errors, due to "import clause warnings" and to "types not found" (String and Object), as can be partly seen on the attachment "UpdateModelFromSources.PNG".

You can find included the Eclipse project. The Modelio project is large for attachment, so I made it available, for the next 7 days, in this "WeTransfer" address: https://goo.gl/UjVqtJhttps://goo.gl/UjVqtJ

What am I doing wrong?

Best regards,

Fernando

ps: Both the class diagram and the Java code have identifiers in Portuguese.



File Attachment:

File Name: Airport2Eclipse.zip
File Size:1,292 KB
Attachments:

Please Log in or Create an account to join the conversation.

2 months 3 weeks ago #5590 by pan
Bom dia!

In your project, you have 2 root packages : Modelio Comportamental and Modelio Estrutural.
These 2 packages have the same source content (org.quasar...).
If you generate the code from Modelio Estrutural, you have the window with empty errors. Of course it should contain message so you understand what is happening. The problem is that some elements have no type (Empresa.website has no type for example).

When you try to use "Update model from sources if necessary", Java Designer does not update this part of the model. It updates the model structure which is in Modelio Comportamental.

How to solve the different problems:
  • In order to fix the import warnings you have to set the classpath for the reverse. Go to the root packages, right-click and select Java Designer/Configuration/Edit accessible classes command then add the rt.jar as an external jar (It should be in C:\Program Files\Java\jdk1.8.0_60\jre\lib\rt.jar). When you will update your model, Java designer should find the right types (String, Object, ...)
  • Actually, I think you first generated code from the Modelio Comportamental model then you copied this model to the Modelo Estrutural package and tried to update this model. This is a wrong way to proceed. You have to delete the Modelio Estrutural.org model and work on the one which is in Modelio Comportamental. As you have Use cases in Modelio Comportamental I guess you tried to separate behavior and static content. In this case, delete the Modelio Estrutural.org model then cut and paste the Modelo Comportamental.org package into the Modelio Estrutural package

Hope this helps.

Please Log in or Create an account to join the conversation.

Moderators: cdeebr
Time to create page: 0.257 seconds
^ Back to Top