Home » Modeling » VIATRA » Stereotypes not shown in modelspace
Stereotypes not shown in modelspace [message #868901] |
Wed, 02 May 2012 13:59  |
Eclipse User |
|
|
|
Hi,
I am trying to import a UML model into Viatra's modelspace. The import is done correctly, however, I have applied stereotypes inside my UML model, and specified values to properties, but this information is not available in the modelspace.
Are stereotypes and properties supported by the UML importer?
I appreciate your answers!
Thank you,
Cristina
|
|
| |
Re: Stereotypes not shown in modelspace [message #869466 is a reply to message #869321] |
Thu, 03 May 2012 08:47   |
Eclipse User |
|
|
|
Hi,
Thank you for your reply. I created a simple example to show you the issue I have. I applied a profile, and then created a class diagram, which only has one class called Example, and applied the stereotype <<daServiceRequest>>, set the property of this stereotype, accessProb to 10. I attach the resulting uml file generated using Papyrus.
I am really interested in importing such an UML model into VIATRA's modelspace, so please let me know if I can provide more examples, or anything else I can do.
Thank you,
Cristina
Attachment: example.uml
(Size: 2.71KB, Downloaded 789 times)
|
|
| | |
Re: Stereotypes not shown in modelspace [message #869619 is a reply to message #869518] |
Thu, 03 May 2012 14:03   |
Eclipse User |
|
|
|
I have managed to track down the missing part of the implementation and fixed the importer to be able to handle applied stereotypes (r6162 on SVN).
Update:
- If you installed VIATRA2 from the nightly update site, you should be able to get the newest version with a "Check for updates".
- If you checked out VIATRA2 from SVN, you can update the {VIATRA2}.uml2.galileo project to get the new version.
Metamodel changes:
- First of all, you will have to create a new VPML model space after you updated your VIATRA2, since the UML metamodel changed. Alternatively, you can use the (viatra.inf.mit.bme.hu)/svn/core/trunk/org.eclipse.viatra2.imports.uml2.galileo/model/uml2_stereotype.vtml and just drag it on your modelspace (in the modelspace view) to add the required metamodel additions to an existing modelspace.
Model import:
- After importing you UML model (with the UML 2.2 native importer), you should now see an "appliedStereotype" relation in the class with a "Stereotype" entity as target.
- Furthermore, the properties are stored in "StereotypeValue" entities inside the class, with both the name and the value stored in (UML)String entities and also a relation to the defining "Stereotype".
If you have any trouble following these instructions, just ask
|
|
| | | |
Re: Stereotypes not shown in modelspace [message #870430 is a reply to message #868901] |
Tue, 08 May 2012 03:12   |
Eclipse User |
|
|
|
Hi,
I have attached the VPML as it should be after a successful import. I have deleted the "example_uml" subtree from under uml.models and used the UML 2.2 native importer from the VIATRA2 model spaces view.
Since I managed to import using the same VPML file, it means that you are using the updated metamodel, which is only possible, if you are using the updated importer as well. That might mean that either or other software versions are different (Eclipse, UML, etc.) or the model structure is different.
For comparison, in the workspace, where I'm testing, I have the DAM project imported from the file you sent. Then, I have an other project, that contains the example.uml in it's root (important, since it refers to DAM with ../DAM/DAM.profile.uml relative path).
I would say that if you can open the model in the "UML Model Editor" with the profiles properly loaded, that would imply that the importer is able to load them as well.
Finally, I'm running Eclipse 3.7.2 on Java 1.7 x64, Windows 7 x64 Professional. Also, it is a classic Eclipse, not Modelling, but with EMF SDK and UML Extender SDK installed, among others.
Please post what the importer writes to the log, can do this by opening the VIATRA2 Console view.and copy-pasting the contents. Note that you may have to switch to this view before the import to initialize it.
Attachment: TEST.vpml
(Size: 1.66MB, Downloaded 1038 times)
|
|
| | | |
Re: Stereotypes not shown in modelspace [message #870510 is a reply to message #870507] |
Tue, 08 May 2012 09:42  |
Eclipse User |
|
|
|
Hi,
It's great to hear that it finally works. I'm not sure, but the path issue is actually not the fault of our importer, but may be the fault of the UML resource implementation...
Yes, you can set the list of ignored profiles, if you don't want to import some, or select to disable it and import everything.
Thank you for your kind words!
|
|
|
Goto Forum:
Current Time: Wed Jul 23 15:46:47 EDT 2025
Powered by FUDForum. Page generated in 0.29885 seconds
|