Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Generate ecore model from UML Profile
Generate ecore model from UML Profile [message #1834247] Thu, 05 November 2020 18:51 Go to next message
John Henbergs is currently offline John HenbergsFriend
Messages: 239
Registered: October 2020
Senior Member
Hi all,

I have created a UML profile and applied it to a model on Papyrus. Now I would like to generate the ecore for that profile. Is that possible and so, how can it be done?

Thank you!
Re: Generate ecore model from UML Profile [message #1834266 is a reply to message #1834247] Fri, 06 November 2020 09:17 Go to previous messageGo to next message
Vincent Lorenzo is currently offline Vincent LorenzoFriend
Messages: 249
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hello,
to generate the ecore from the profile, you need to install . UML2 Extender SDK Developer Resources.

Then you can select your file xxx.profile.uml and create a genmodel. Then it is like from an ecore generation.

There is an extension point to register your static profile :
org.eclipse.papyrus.uml.extensionpoints.UMLProfile

We are creating/updating this document for the next Papyrus release (2020-12).

Regards,
/Vincent Lorenzo
Re: Generate ecore model from UML Profile [message #1840034 is a reply to message #1834266] Mon, 05 April 2021 20:05 Go to previous messageGo to next message
Ait Mbarek Mohamed is currently offline Ait Mbarek MohamedFriend
Messages: 10
Registered: April 2021
Junior Member
Hello ,
would you show me how to use UML2 Extender SDK Developer Resources to create a genmodel.
thanks
Re: Generate ecore model from UML Profile [message #1840193 is a reply to message #1840034] Thu, 08 April 2021 12:16 Go to previous messageGo to next message
Vincent Lorenzo is currently offline Vincent LorenzoFriend
Messages: 249
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hello,
right-clik on the profile.uml file, then New -> Others -> Eclipse Modeling Framework -> EMF Generator Model [1], then on the next wizard page called Select A Model Importer, you must select UML model [2].

[1] index.php/fa/40295/0/

[2]index.php/fa/40296/0/

Regards,
/Vincent
Re: Generate ecore model from UML Profile [message #1840949 is a reply to message #1840193] Thu, 29 April 2021 12:09 Go to previous messageGo to next message
Ait Mbarek Mohamed is currently offline Ait Mbarek MohamedFriend
Messages: 10
Registered: April 2021
Junior Member
hello
thank you for your feedback , sorry for the delay , I already did that but every time a message error appear
index.php/fa/40418/0/
  • Attachment: profil.jpg
    (Size: 656.28KB, Downloaded 861 times)
Re: Generate ecore model from UML Profile [message #1840960 is a reply to message #1840949] Thu, 29 April 2021 13:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The 'union' messages are a common nightmare, but IIRC they are usually down to user error.

Have you tried following the tutorials?

Other users seem to manage ok, so you should be able to solve the problem, but if not there is no way anyone can help you from *.jpg. You must provide at least the *.uml and preferably a zipped project and Eclipse configuration text file.

Regards

Ed Willink
Re: Generate ecore model from UML Profile [message #1841009 is a reply to message #1840960] Fri, 30 April 2021 12:15 Go to previous messageGo to next message
Ait Mbarek Mohamed is currently offline Ait Mbarek MohamedFriend
Messages: 10
Registered: April 2021
Junior Member
Hi ,
thank you for your answer , i tried to fix it but doesen' work , so I'll put the project here to everyone could see it ,
best regard
  • Attachment: profil.rar
    (Size: 1.50MB, Downloaded 64 times)
Re: Generate ecore model from UML Profile [message #1841012 is a reply to message #1841009] Fri, 30 April 2021 12:50 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

WinZip reports that your attachment is any a valid RAR file.

If you use the Export facility within Eclipse you can create a ZIP file that works.

Regards

Ed Willink
Re: Generate ecore model from UML Profile [message #1841015 is a reply to message #1841012] Fri, 30 April 2021 13:24 Go to previous messageGo to next message
Ait Mbarek Mohamed is currently offline Ait Mbarek MohamedFriend
Messages: 10
Registered: April 2021
Junior Member
HI,
its ok i did it with Export facility within Eclipse
best regards
Mohamed Ait mbarek
  • Attachment: profil.zip
    (Size: 1.67MB, Downloaded 74 times)
Re: Generate ecore model from UML Profile [message #1841025 is a reply to message #1841015] Fri, 30 April 2021 17:01 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you use the UML Model Editor to validate your profil.profile.uml you will see that many Stereotypes have duplicate base_Class properties which is guaranteed to cause chaos. I suspect that you may have accidentally done a bad cut and paste to create the prolific duplicates. Anyway, you should aim at a warning free UML Model Editor validation before trying to get anything else to work.

Regards

Ed Willink
Re: Generate ecore model from UML Profile [message #1841079 is a reply to message #1841025] Mon, 03 May 2021 10:03 Go to previous messageGo to next message
Ait Mbarek Mohamed is currently offline Ait Mbarek MohamedFriend
Messages: 10
Registered: April 2021
Junior Member
HI
thank you for your response i'll try to do what you said .
my purpose is to create a profil UML from folder xml , because I didn't find any editor to convert a folder xml to profil UML .

best regard
AIt Mbarek
Re: Generate ecore model from UML Profile [message #1841082 is a reply to message #1841079] Mon, 03 May 2021 12:05 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I am afraid that you have been deceived. Your file starts

<?xml version="1.0" encoding="UTF-8"?>
<UMLProfile>

which might make you think it has something to do UML; it doesn't. It isn't even valid XML since it has no namespaces.

A genuine UML profile might start something like

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">
<uml:Profile xmi:id="_0" name="OCLforUML" URI="http://www.eclipse.org/ocl/2015/OCLforUML" metamodelReference="_qtyJwICREeOB3rHSo1B3ow">

----

I have no idea what you mean by folder xml.

----

Your original comment claimed that you had create a UMLprofile and applied it (presumably successfully) on Papyrus.

Thiis seems impossible given that your file is so invalid.

I suggest you go back to the source of your WebProfile.xml and see what tolling it provides and possibly gain some understanding of why they use the term "UML".

The "A dynamically-generated web page using Microsoft's Active Server Pages (ASP) technology." comment suggests to comes from Microsoft who have a track record for deviating from standards.

Regards

Ed Willink
Re: Generate ecore model from UML Profile [message #1841092 is a reply to message #1841082] Mon, 03 May 2021 16:58 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Looks like
https://sparxsystems.com/downloads/profiles/WebProfile.xml

A demo originating from the book "Building Web Applications with UML" by Jim Conallen.

OK, first this "profile" is based on the ancient UML 1.1, if I recon correctly . Secondly it is in the SPARX propriatary format.

A precious piece of ancient UML history. But ...

/pica

EDIT: the first edition of the book was published in 1999, so it was most probably based on UML 1.1. I think, I am growing old ;-)

[Updated on: Mon, 03 May 2021 17:23]

Report message to a moderator

Re: Generate ecore model from UML Profile [message #1841116 is a reply to message #1841092] Tue, 04 May 2021 10:33 Go to previous messageGo to next message
Ait Mbarek Mohamed is currently offline Ait Mbarek MohamedFriend
Messages: 10
Registered: April 2021
Junior Member
Hi
it's a demo from SPARX , my purpose is to create something like this demo in papyrus
i want to create a profil that could do this "Building Web Applications with UML"

Best regard
AIt Mbarek
Re: Generate ecore model from UML Profile [message #1841117 is a reply to message #1841116] Tue, 04 May 2021 11:32 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Carsten has successfully identified that your 'not-UML' is actually a very vintage proprietary UML 1.1. Eclipse UML2 and so Papyrus only supports UML 2.x. I suspect that your example is the first time I have encountered UML 1.x which is why I failed to recognize it.

As a first try you should go back to your source and look for the modern version of the demo. (UML2.0 is now 18 years old.)

Otherwise it's as if you are trying to re-implement a C program using Java; most of the principles are the same but quite a bit of subtle transcription is needed.

Since UML only standardizes the model with UMDI giving an aspirational standardization of the graphics and nothing standardizing the UX, you would be well advised to follow a tutorial for the tool that you are actually going to use.

Regards

Ed Willink

[Updated on: Tue, 04 May 2021 11:39]

Report message to a moderator

Previous Topic:Code generator for Java not working (Papyrus Standalone 2020-10)
Next Topic:Issues with Papyrus 2021-03
Goto Forum:
  


Current Time: Fri Apr 26 07:42:49 GMT 2024

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

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

Back to the top