Home » Modeling » VIATRA » Stereotypes not shown in modelspace
| |
Re: Stereotypes not shown in modelspace [message #869466 is a reply to message #869321] |
Thu, 03 May 2012 12:47 |
Cristina Murillo Messages: 25 Registered: December 2011 |
Junior Member |
|
|
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 749 times)
|
|
| | |
Re: Stereotypes not shown in modelspace [message #869619 is a reply to message #869518] |
Thu, 03 May 2012 18:03 |
Abel Hegedus Messages: 197 Registered: September 2015 |
Senior Member |
|
|
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 07:12 |
Abel Hegedus Messages: 197 Registered: September 2015 |
Senior Member |
|
|
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 990 times)
|
|
|
Re: Stereotypes not shown in modelspace [message #870456 is a reply to message #870430] |
Tue, 08 May 2012 10:28 |
Cristina Murillo Messages: 25 Registered: December 2011 |
Junior Member |
|
|
Hi,
The error I get is the following:
[info] VIATRA2 Console open for model space 'modelSpace6'; issue listcommands() to see available commands.
[info] Trigger engine: Receiver cleared.
[warning] [UML2 importer] ignoring profiles...
[warning] [UML2 importer] NOT ignoring and importing reference: model
[fatal] Error while importing UML model: null
[info] Trigger engine: A transactional operation ended in the system.
[info] Native import lasted for 67 ms[/size]
It is weird, since I am using the same files I attached here for you. I added the DAM profile in the Project References inside the properties of the project where I have the example.uml file in the root.
I do not even get the UMLPrimitiveTypes inside models.example_uml.
Thank you for your help,
Cristina
[Updated on: Tue, 08 May 2012 10:30] Report message to a moderator
|
|
| | | |
Goto Forum:
Current Time: Wed Sep 25 04:38:36 GMT 2024
Powered by FUDForum. Page generated in 0.05420 seconds
|