Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » UML models as semantic models in a Modelling Project
UML models as semantic models in a Modelling Project [message #1231509] Tue, 14 January 2014 21:13 Go to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Hello everyone, here's what I have so far:

1. Created a UML profile in a Papyrus projec;
2. Exported the profile to ecore;
3. Created a new Specification Project;
4. Defined a new Viewpoint specification, with a diagram description, default view and nodes matching the stereotypes in the UML profile;
5. Created a new Modelling Project and included the ecore from the profile as a dependency;
6. Created a new UML class diagram (with Papyrus) in the Modelling Project, to which the UML profile was applied.

At this stage if I invoke the Viewpoints Selection dialogue on the Modelling Project it shows no candidate Viewpoints.

How should I proceed now?

Thank you.
Re: UML models as semantic models in a Modelling Project [message #1231740 is a reply to message #1231509] Wed, 15 January 2014 09:26 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi Luίs,

I see two ways of interpreting your issue:

1- Your specification project is based on the meta-model from the UML
profile export. In that case the model in your modeling project has to
be based on this meta-model to have the viewpoint available. Take a look
on Alex explanations on
http://www.eclipse.org/forums/index.php/t/635301/ for creating an
instance of your meta-model.

2- Your specification project is based on the UML meta-model (using
profile or not). Your modeling project model has to be an UML model to
make your viewpoint available in the selection dialog.

More generally, a viewpoint is available if at least one of its
representation matches the meta-model on which the model is based on.

Best regards,

Florian

On 14/01/2014 22:13, Luís de Sousa wrote:
> Hello everyone, here's what I have so far:
>
> 1. Created a UML profile in a Papyrus projec;
> 2. Exported the profile to ecore;
> 3. Created a new Specification Project;
> 4. Defined a new Viewpoint specification, with a diagram description,
> default view and nodes matching the stereotypes in the UML profile;
> 5. Created a new Modelling Project and included the ecore from the
> profile as a dependency;
> 6. Created a new UML class diagram (with Papyrus) in the Modelling
> Project, to which the UML profile was applied.
>
> At this stage if I invoke the Viewpoints Selection dialogue on the
> Modelling Project it shows no candidate Viewpoints.
>
> How should I proceed now?
> Thank you.
Re: UML models as semantic models in a Modelling Project [message #1233017 is a reply to message #1231740] Sat, 18 January 2014 10:50 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Hi Florian, I haven't been able to translate your message into practical results. I have some doubts on some of the things you wrote:

Florian Barbin wrote on Wed, 15 January 2014 04:26
the model in your modeling project has to
be based on this meta-model to have the viewpoint available.


How do I base a modelling project on a meta-model? I already have a UML model (Papyrus ".di" file) inside the modelling project on which I applied the profile.

Florian Barbin wrote on Wed, 15 January 2014 04:26
a viewpoint is available if at least one of its
representation matches the meta-model on which the model is based on.


How can I create a representation matching the meta-model?

The representation.aird file in my modelling project contains the following:

<models xmi:type="ecore:EPackage" href="platform:/resource/basicFamily.DSL/basicFamily.ecore#/"/>


Does it need something more?

Thank you.
Re: UML models as semantic models in a Modelling Project [message #1233699 is a reply to message #1233017] Mon, 20 January 2014 09:53 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi Luìs,

I answered to your questions inside the text but I'm not sure of what
you want to do exactly. If you want to create your own uml modeler, I
suggest you to take a look on UML Designer here
https://github.com/ObeoNetwork/UML-Modeling/tree/4.0.0_M1 and more
specifically in the viewpoint specification project here
https://github.com/ObeoNetwork/UML-Modeling/tree/4.0.0_M1/plugins/org.obeonetwork.dsl.uml2.design.
But if you want to use sirius as an uml editor you can install the
sirius uml designer from the Nightly build:
http://marketplace.obeonetwork.com/updates/nightly/uml/4.0.0/repository


On 18/01/2014 11:50, Luís de Sousa wrote:
> Hi Florian, I haven't been able to translate your message into practical
> results. I have some doubts on some of the things you wrote:
>
> Florian Barbin wrote on Wed, 15 January 2014 04:26
>> the model in your modeling project has to be based on this meta-model
>> to have the viewpoint available.
>
>
> How do I base a modelling project on a meta-model? I already have a UML
> model (Papyrus ".di" file) inside the modelling project on which I
> applied the profile.


The *.pi file is a specific papyrus model, not an uml model. If you have
created your own UML modeler in a first step, you just have to create an
UML model in your modeling project (*.uml file) and your viewpoint
should be available in the viewpoint selection view. See
http://www.eclipse.org/sirius/doc/user/general/Modeling%20Project.html#ViewpointSelection
for more details.

> Florian Barbin wrote on Wed, 15 January 2014 04:26
>> a viewpoint is available if at least one of its representation matches
>> the meta-model on which the model is based on.
>
>
> How can I create a representation matching the meta-model?
> The representation.aird file in my modelling project contains the
> following:
>
> <models xmi:type="ecore:EPackage"
> href="platform:/resource/basicFamily.DSL/basicFamily.ecore#/"/>
>

Once your uml viewpoint is activated, you should be able to create new
representations:
http://www.eclipse.org/sirius/doc/user/general/Modeling%20Project.html#ReprCreation

> Does it need something more?
> Thank you.
>

Regards,

Florian
Re: UML models as semantic models in a Modelling Project [message #1237057 is a reply to message #1233699] Tue, 28 January 2014 18:57 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Hi again Florian.

I'm having a hard time understanding your answers (I'm new to Sirius). I do not wish to create a new UML modeller, or perform UML modelling with Sirius, Papyrus already does that (granted, with serious limitations). In essence, Papyrus profiles and models are basically XMI documents. Sirius seems able to consume these assets (after the transformation to ecore) in Viewpoint Specification projects. But for such specification to be useful, Sirius also needs to consume XMI (or ecore) in a Modelling project to be useful.

From your last message and further trials with the tool I get the impression Sirius is not able to intake XMI profiles and models in a Modelling project. Is this correct?

A side note: I use Acceleo to generate code from Papyrus models; once I generate the ecore for a profile Acceleo is no longer able to transform models with that profile applied on.

Thank you.
Re: UML models as semantic models in a Modelling Project [message #1237274 is a reply to message #1237057] Wed, 29 January 2014 09:30 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
On 28/01/2014 19:57, Luís de Sousa wrote:
> Hi again Florian.

Hi Luís,
>
> I'm having a hard time understanding your answers (I'm new to Sirius). I
> do not wish to create a new UML modeller, or perform UML modelling with
> Sirius, Papyrus already does that (granted, with serious limitations).
> In essence, Papyrus profiles and models are basically XMI documents.
> Sirius seems able to consume these assets (after the transformation to
> ecore) in Viewpoint Specification projects. But for such specification
> to be useful, Sirius also needs to consume XMI (or ecore) in a Modelling
> project to be useful.

The purpose of Sirius is to create your own modeling environment based
on your specific domain, or eventually reuse already defined modelers
(like the UML modeler for instance). For that you have to distinguish
two different steps (and roles):

The first step consists in creating a "Viewpoint Specification
Project". That is the specifier role. This step consists in defining your
own modeler based on an ecore model (a meta-model in fact) where are
defined your domain concepts. The odesign file lets you associate
graphical elements (like edges, containers, nodes, etc.) to those
concepts. You also can defined tools which let you create those elements
or manage them. If we take the uml modeler based on Sirius, the
*.odesign file defines (among other things), a "class diagram" where an
UML Class is represented by a container.

The second step matches the "Modeling Project". That is the user role.
The modeling project is based on a model (like uml) which is an instance
of your meta-model (the UML Meta-model in this case). You will be able to
create diagram, table, tree as defined in the first specifying step.
Those representations are serialized in the *.aird file.

>
> From your last message and further trials with the tool I get the
> impression Sirius is not able to intake XMI profiles and models in a
> Modelling project. Is this correct?

Sirius just come with an ecore based modeler sample but yes, without any
uml modeler installed, you can't create any representations based on uml
models.

>
> A side note: I use Acceleo to generate code from Papyrus models; once I
> generate the ecore for a profile Acceleo is no longer able to transform
> models with that profile applied on.

I haven't enough context to answer you but for any questions about
Acceleo I suggest you to ask them on the Acceleo forum, the team will
answer more specifically.
>
> Thank you.

Hope I have clarified things,

Regards,

Florian

[Updated on: Wed, 29 January 2014 09:43]

Report message to a moderator

Re: UML models as semantic models in a Modelling Project [message #1237480 is a reply to message #1237274] Wed, 29 January 2014 20:37 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Thank you Florian for the continued support on this.

I initially understood Sirius as an MDA tool, but it is slowly becoming clear it isn't so. It might be possible to use it for ad hoc UML modelling but from what I understand code generation is not an option (at least not based of MOFM2T).

Besides this I'm wary of going forward with a closed tool like the Obeo UML Modeller. Even if I come to chose that way, there are more powerful closed MDD tools out there.

Thank you.
Re: UML models as semantic models in a Modelling Project [message #1237672 is a reply to message #1237480] Thu, 30 January 2014 09:45 Go to previous messageGo to next message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Hi Luis,

Sirius is not about code generation *at all*, Acceleo does that and implements the OMG specification regarding code generation.

Sirius is about specifying and designing a specific tooling for any kind of models, being UML, Profiled UML, an Ecore based model or an Xcore one. Any model which - indeed- is compliant with the EMF runtime.

That being said, it looks like you are having a hard time getting started in using Sirius from an UML Profile which got transformed into an Ecore based model. That's not surprising me as this use case is not really covered by the documentation. On the other hand that's what "SysML Designer" does with Sirius (https://github.com/ObeoNetwork/SysML-Designer/tree/sirius) and I'm confident your use case is supported.

To make things right, there is no such thing as a closed "Obeo UML Modeller". There is UML Designer which is OpenSource under the EPL license and which, now that Sirius exists in Eclipse, only depends on EPL plugins. The source code is here :https://github.com/ObeoNetwork/UML-Modeling/tree/sirius , anybody can fork it and build a variant, the UML models it can handles are not specific in any way and are the same Papyrus use.

That being said and getting back to the issue at hand, at this point the simplest way to proceed would be for you to provide us projects which we can use to reproduce the issue you encounter and to give you indications to move forward.
We would need at least the Eclipse projects you created which are defining your profile and the corresponding Ecore. If you can't publish them, please reproduce a dummy you can publish.

Once we have that, we can help you, Acceleo being supposed to support those use cases too, we could even gives you hint there.


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: UML models as semantic models in a Modelling Project [message #1238518 is a reply to message #1237672] Sat, 01 February 2014 15:45 Go to previous message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Hi Cedric, let me put my experiments with Sirius in context:

I have been using Papyrus + Acceleo for MDD (with OMG's MDA) for a few years, and things function generally ok. The problem is that Papyrus does not yet support symbology (stereotype icons and shapes) which makes the adoption of DSL developed this way difficult by less savy users.

When Sirius came out it seemed a good a idea to try it out to make DSLs defined in Papyrus more expressive. I was expecting to be able to develop particular graphical representations that could then be employed with with ease by users that may know nothing about MDD. And of course that the end result would still be consumable by Acceleo, hence the previous talk about XMI.

From the answers in this thread it seems I would need to develop something like SysML-Designer to achieve want I need; this is probably an overkill in my case. And then there is the issue with the ecore generation, that is breaking up the Acceleo templates.

Here you'll find some of the my Sirius trial projects: http://ubuntuone.com/2KA6fmIyFuolWXANQl4vxJ

From my perspective, and I believe from anyone else's coming from MDD, the documentation would need, if possible, a thorough MDA use case: (a) defining a UML profile, (b) creating a representation for that profile and (c) applying the profile through the representation specified.

Regarding the UML Modeller, it asked for registration so I thought it was something like the Designer. I'll try installing it again.

Thank you for the help.

Previous Topic:Tool creating
Next Topic:Sample Model in Tutorial
Goto Forum:
  


Current Time: Fri Apr 19 22:43:00 GMT 2024

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

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

Back to the top