Skip to main content



      Home
Home » Eclipse Projects » Sirius » Reuse of models
Reuse of models [message #1722445] Thu, 04 February 2016 16:06 Go to next message
Eclipse UserFriend
I'm new in Sirius and am developing a modeling framework for a DSL. In this project, the users can develop the models and share it with other users, like libraries. For example, a user (A) creates a model with some data types (datatype.xml). The user (B) creates a model (myproject.xml) and would like to reuse the elements of the datatype.xml to define other elements of his project.

For example, in the Sirius, when you put a Diagram Description element is possible to select other metamodels (properties tab), and I'd like to do this in my project.

So, how can I do the user (B) reuse another models or metamodels into creating the new model using my framework?

Best regards,
Re: Reuse of models [message #1722477 is a reply to message #1722445] Fri, 05 February 2016 03:38 Go to previous messageGo to next message
Eclipse UserFriend
On 05-Feb-16 02:04, Marcelo Alves wrote:

> So, how can I do the user (B) reuse another models or metamodels into
> creating the new model using my framework?

In the modeling perspective you can right click on the .aird file and
select "Add model".
Re: Reuse of models [message #1722492 is a reply to message #1722477] Fri, 05 February 2016 04:38 Go to previous messageGo to next message
Eclipse UserFriend
Hi Marcelo and Felix

Le 05/02/2016 09:38, Felix Dorner a écrit :
> On 05-Feb-16 02:04, Marcelo Alves wrote:
>
>> So, how can I do the user (B) reuse another models or metamodels into
>> creating the new model using my framework?
>
> In the modeling perspective you can right click on the .aird file and
> select "Add model".
>
>

If you are using ModelingProjects, note that every files "EMF loadable"
you drop in a ModelingProject will be loaded by the Sirius session of
the current project and elements will be available from the modeler.

You might find information in [1], [2], [3], [4]


Regards


--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1]
https://www.eclipse.org/sirius/doc/user/general/Modeling%20Project.html#Introduction
[2]
https://www.eclipse.org/sirius/doc/user/general/Modeling%20Project.html#ModelsInMP
[3]
https://www.eclipse.org/sirius/doc/user/general/Modeling%20Project.html#Lifecycle
[4]
https://www.eclipse.org/sirius/doc/user/general/Modeling%20Project.html#Lifecycle
Re: Reuse of models [message #1726690 is a reply to message #1722492] Tue, 15 March 2016 15:17 Go to previous messageGo to next message
Eclipse UserFriend
Hi Maxime,

I'm back with the framework development. I saw your recommendation, but I didn't get a good result.

For example:

A started a new model (model1-datatype.png) where was modelled some datatypes for reused in other models.

index.php/fa/25312/0/

Also, I created another model (model1-serviceType.png) where it was modelled a type that represents a Rest Service.

index.php/fa/25313/0/

I created a new information model (model1-information.png) where I wanted to use those elements. I've inserted those models as dependencies, but those elements are shown immediately without I select them.

index.php/fa/25315/0/

My doubts:

How can I use those elements into new models without show them immediately?

How can I select the created elements for insert into the new model?

Cheers,

Marcelo
Re: Reuse of models [message #1726768 is a reply to message #1726690] Wed, 16 March 2016 06:50 Go to previous messageGo to next message
Eclipse UserFriend
Hi Marcelo,

If you have datatypes displayed when adding your datatypes model to the
Modeling Project, it could means that you have not defined semantic
candidates expression in mapping of your odesign. Then to not display
datatypes you should restrict the instances returned by your semantic
candidates expression, because when this expression is empty by default
all instances of domainClass existing your semantic resources of your
Sirius session will be returned.

Best Regards.

Le 15/03/2016 20:17, Marcelo Alves a écrit :
> Hi Maxime,
>
> I'm back with the framework development. I saw your recommendation, but I didn't get a good result.
>
> For example:
>
> A started a new model (model1-datatype.png) where was modelled some datatypes for reused in other models.
>
>
>
> Also, I created another model (model1-serviceType.png) where it was modelled a type that represents a Rest Service.
>
>
>
> I created a new information model (model1-information.png) where I wanted to use those elements. I've inserted those models as dependencies, but those elements are shown immediately without I select them.
>
>
>
> My doubts:
>
> How can I use those elements into new models without show them immediately?
>
> How can I select the created elements for insert into the new model?
>
> Cheers,
>
> Marcelo
>



--
Esteban Dugueperoux - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Reuse of models [message #1726823 is a reply to message #1726768] Wed, 16 March 2016 12:30 Go to previous messageGo to next message
Eclipse UserFriend
Hi Esteban,

I tried to do this, but I did not have a good result.

Could you give me an example?

My Situation:

Elements of the shared models
DataTypes - platform:/resource/dataTypes/dataTypes.iotainformation
ServiceType - platform:/resource/serviceTypes/serviceTypes.iotainformation

The elements above won't show when the new model is created, only when I put it into my new diagram.

Cheers
Re: Reuse of models [message #1726836 is a reply to message #1726823] Wed, 16 March 2016 15:09 Go to previous messageGo to next message
Eclipse UserFriend
Hi Esteban,

I found the fault, and now when I create new diagrams, the shared elements aren't showed. However, I have doubt yet and need your help.

How can I insert the shared items in the new model?

index.php/fa/25330/0/
  • Attachment: newModel.png
    (Size: 103.04KB, Downloaded 286 times)
Re: Reuse of models [message #1726876 is a reply to message #1726836] Thu, 17 March 2016 04:29 Go to previous message
Eclipse UserFriend
Hi Marcelo,

If you want to have model elements displayed manually in your diagram,
you must change the synchronization mode(see section synchronization in
|1]) defined in your mappings and add drag'n drop tool from Model
Explorer to your diagram. You can look at EcoreTools example to see an
example of synchronization mode use with drag'n drop tool [2].

[1] https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html
[2]
http://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/tree/org.eclipse.emf.ecoretools.design

Best Regards.

Le 16/03/2016 20:09, Marcelo Alves a écrit :
> Hi Esteban,
>
> I found the fault, and now when I create new diagrams, the shared elements aren't showed. However, I have doubt yet and need your help.
>
> How can I insert the shared items in the new model?
>
>
>



--
Esteban Dugueperoux - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Listen for changes on a diagram element
Next Topic:[SOLVED] Select Viewpoint doesn't show when using XText metamodel/grammar
Goto Forum:
  


Current Time: Sun Nov 09 22:22:09 EST 2025

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

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

Back to the top