Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Automatically add model to project dependencies
Automatically add model to project dependencies [message #1729247] Tue, 12 April 2016 11:50 Go to next message
Amine Kechaou is currently offline Amine KechaouFriend
Messages: 32
Registered: April 2016
Location: Karlsruhe, Germany
Member
Hi,

I'm currently creating a graphical editor using Sirius. In the the representation I can add a Method and choose its return type in the Properties tab. Thing is the return type depends on some model that is not automatically loaded in the Modelling Project. Thus the return types won't show in the list in the Properties tab.
When I go to the corresponding tree editor, I can easily add the return type in the Properties tab. By doing so, a dependency is added to the Project Dependencies, containing my return types and when I go back to the representation all return types are then available in the list.
My question now : How to automatically add dependencies when I select my Viewpoint ?

Thank you
Re: Automatically add model to project dependencies [message #1729335 is a reply to message #1729247] Wed, 13 April 2016 08:05 Go to previous messageGo to next message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 182
Registered: October 2014
Senior Member
Le 12/04/2016 14:12, Amine Kechaou a écrit :
> Hi,
Hi
>
> I'm currently creating a graphical editor using Sirius. In the the
> representation I can add a Method and choose its return type in the
> Properties tab. Thing is the return type depends on some model that is
> not automatically loaded in the Modelling Project. Thus the return types
> won't show in the list in the Properties tab.
> When I go to the corresponding tree editor, I can easily add the return
> type in the Properties tab. By doing so, a dependency is added to the
> Project Dependencies, containing my return types and when I go back to
> the representation all return types are then available in the list. My
> question now : How to automatically add dependencies when I select my
> Viewpoint ?
When defining your RepresentationDescription in your odesign, make sure
that all required meta-models(and thus your MM defining the return type
Class) are declared as metamodels. This help sirius in many feature to
work better and faster. [1]
>
> Thank you

[1]
http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.sirius.doc%2Fdoc%2Fspecifier%2Fgeneral%2FSpecifying_Viewpoints.html&cp=69_2_0_2&anchor=vsp


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Automatically add model to project dependencies [message #1729380 is a reply to message #1729335] Wed, 13 April 2016 14:15 Go to previous messageGo to next message
Amine Kechaou is currently offline Amine KechaouFriend
Messages: 32
Registered: April 2016
Location: Karlsruhe, Germany
Member
Hi, thanks but it didn't work as expected. I added the metamodel via the properties tab of my diagram description but the return types still don't show up in the editor and the dependencies aren't automatically added.
Re: Automatically add model to project dependencies [message #1729387 is a reply to message #1729380] Wed, 13 April 2016 15:26 Go to previous messageGo to next message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 182
Registered: October 2014
Senior Member
Le 13/04/2016 16:15, Amine Kechaou a écrit :
> Hi, thanks but it didn't work as expected. I added the metamodel via the
> properties tab of my diagram description but the return types still
> don't show up in the editor and the dependencies aren't automatically
> added.
>
Add the metamodel you use as a dependency of your VSP. It helps Sirius
to better find or restraint the metamodel used for completion,
validation and runtime.


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Automatically add model to project dependencies [message #1729395 is a reply to message #1729387] Wed, 13 April 2016 17:46 Go to previous messageGo to next message
Amine Kechaou is currently offline Amine KechaouFriend
Messages: 32
Registered: April 2016
Location: Karlsruhe, Germany
Member
Can you please tell me how to add the Metamodel to the VSP dependencies ?
Re: Automatically add model to project dependencies [message #1729437 is a reply to message #1729395] Thu, 14 April 2016 07:54 Go to previous messageGo to next message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 182
Registered: October 2014
Senior Member
Le 13/04/2016 19:46, Amine Kechaou a écrit :
> Can you please tell me how to add the Metamodel to the VSP dependencies ?
I mean plugin dependency : edit the Viewpoint Specification Projet
MANIFEST.MF and add a dependency to the plugin containing your semantic
Meta-model


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Automatically add model to project dependencies [message #1729489 is a reply to message #1729437] Thu, 14 April 2016 15:43 Go to previous messageGo to next message
Amine Kechaou is currently offline Amine KechaouFriend
Messages: 32
Registered: April 2016
Location: Karlsruhe, Germany
Member
I added the plugin containing the metamodel as a Require-Bundle to the manifest file but the metamodel still won't show in Project Dependencies in the modelling project where I test my editor.

I will try to rephrase the issue here. In the editor tree, in addition to the diagram whose name begins by "platform:/" the metamodel containing the return types is also loaded via its URI beginning with "pathmap://". The second I assign a return type to a signature in my diagram via the editor tree, the metamodel is added to the Project Dependencies, and only then the return types will be available in the graphical editor.
It would be great if these dependencies could be directly loaded when I select my Viewpoint.
Re: Automatically add model to project dependencies [message #1748836 is a reply to message #1729489] Tue, 29 November 2016 08:52 Go to previous message
Amine Kechaou is currently offline Amine KechaouFriend
Messages: 32
Registered: April 2016
Location: Karlsruhe, Germany
Member
I could add the models via an external java action at the root of the representation description. That way it will execute as soon as the representation is created.
Previous Topic:Trying to create View for my own model
Next Topic:Create Textfield with sirius aql interpreter/contentprovider support
Goto Forum:
  


Current Time: Thu Apr 25 05:30:02 GMT 2024

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

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

Back to the top