Skip to main content



      Home
Home » Eclipse Projects » Sirius » Create a new secondary aird file programmatically and as an enduser using the user interface
Create a new secondary aird file programmatically and as an enduser using the user interface [message #1573015] Mon, 19 January 2015 08:28 Go to next message
Eclipse UserFriend
Hi,

I have noticed recently that it is now possible to have multiple aird files in the same project (part of the same session). One of the aird files being the "main representations file" and the other ones are "secondary aird files", as mentioned in the documentation (https://www.eclipse.org/sirius/doc/developer/Architecture.html#session).

I have seen this method to retrieve all the secondary aird files of a given session, using session.getReferencedSessionResources()... so far so good Smile

1) My question is how do we *create programmatically* one secondary aird file ? I have not seen any addReferencedSessionResources or similar method.

2) Also how do we create, as an enduser, using Eclipse/Sirius UI such a secondary aird file. For now, the only way I found was to use the contextual feature "Extract to .aird file..." on a representation in the Model Explorer.

many thanks in advance,
Benoît
Re: Create a new secondary aird file programmatically and as an enduser using the user interface [message #1574597 is a reply to message #1573015] Tue, 20 January 2015 05:06 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

The action your are looking for is named "Control". This allows you to
move an object to another resource, and therefore split a model
(semantic or aird) into a main model and sub model.

1/ You should use a
org.eclipse.sirius.business.api.control.SiriusControlCommand and set the
path of your second aird in the parameter "representationsDest".

2/ The enduser can right-click on a semantic element in the modeling
project view and select "Control". This will create a new submodel with
the selected element as root. The wizard will also list the
representations available on the "controlled" element and its sub
elements and offer you to possiblity to place the representations of
your choice into a new representation file.

Regards,
Steve

Le 19/01/2015 14:28, Benoit Ries a écrit :
> Hi,
>
> I have noticed recently that it is now possible to have multiple aird
> files in the same project (part of the same session). One of the aird
> files being the "main representations file" and the other ones are
> "secondary aird files", as mentioned in the documentation
> (https://www.eclipse.org/sirius/doc/developer/Architecture.html#session).
>
> I have seen this method to retrieve all the secondary aird files of a
> given session, using session.getReferencedSessionResources()... so far
> so good :)
>
> 1) My question is how do we *create programmatically* one secondary aird
> file ? I have not seen any addReferencedSessionResources or similar method.
>
> 2) Also how do we create, as an enduser, using Eclipse/Sirius UI such a
> secondary aird file. For now, the only way I found was to use the
> contextual feature "Extract to .aird file..." on a representation in
> the Model Explorer.
>
> many thanks in advance,
> Benoît


--
Steve Monnier - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Create a new secondary aird file programmatically and as an enduser using the user interface [message #1580001 is a reply to message #1574597] Fri, 23 January 2015 03:15 Go to previous message
Eclipse UserFriend
Thanks a lot for the help !
Previous Topic:Sirius could not execute Value Expression in Acceleo 3 format
Next Topic:Containers inside containers
Goto Forum:
  


Current Time: Fri May 23 12:09:16 EDT 2025

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

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

Back to the top