How to use diagram extension [message #1708675] |
Fri, 18 September 2015 10:57  |
Eclipse User |
|
|
|
Hi,
I have two languages (related to each other) and want to present one editor to my users. However I want to create two VSP projects such that the mappings and tools related to the two languages can be developed separately.
So I have a language L1, containing the notion of System. In language L2 I have the notion of ComposedSystem which extends L1::System.
In VSP1, I create a diagram description (ModelDiagram) with a layer allowing visualisation of System nodes and a tool that allows creation of Systems.
In VSP2, I create a diagram extension which adds another layer: ComposedSystem. This layer contains a Tool section with a tool that creates a Composed System.
I can verify that this works to some extent in the sense that after creating a Model and a ModelDiagram, I can activate the ComposedSystem layer; the tool appears.
However, I am not capable of creating a new ComposedSystem. My problem is that, on the ModelDiagram, a ComposedSystem should be rendered by the same mapping as the System. So I would like to refer to a Node Mapping of VSP1 in a tool that is defined in a VSP2. I don't seem to be able to do that. I created a separate Node Mapping for ComposedSystem in VSP2. Now the tool definition can be completed but the editor does not allow creation of the ComposedSystem node mappings on the diagram defined by VSP1.
How do I reuse a Node mapping defined in VSP1 in a layer defined in VSP2; or am I conceptually on the wrong track?
Greetings,
Wilbert.
|
|
|
Re: How to use diagram extension [message #1708916 is a reply to message #1708675] |
Tue, 22 September 2015 09:05   |
Eclipse User |
|
|
|
Le 18/09/2015 16:57, Wilbert Alberts a écrit :
> However, I am not capable of creating a new ComposedSystem. My problem
> is that, on the ModelDiagram, a ComposedSystem should be rendered by the
> same mapping as the System. So I would like to refer to a Node Mapping
> of VSP1 in a tool that is defined in a VSP2. I don't seem to be able to
> do that.
You should be able to if you first make the first VSM (from VSP1)
available in the context of the editor for VSP2. Inside the VSM editor
(with VSP2 loaded), right-click and select "Load resource...". Enter the
"viewpoint:" URI you used in the Diagram Extension (something like
viewpoint:/vsp1.design/V1). The VSM from VSP1 should now be available,
and all the tools and mappings it defines become visible in the relevant
UIs, for example in the "Reused Mappings" property of your additional
layer (accessible on the "Import" property section).
PS: Make sure you load the referenced VSM using a "viewpoint:/" URI,
which will work whether you are at development-time with all your VSPs
in your workspace, or at runtime with the modelers deployed.
--
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
|
Re: How to use diagram extension [message #1710533 is a reply to message #1709278] |
Wed, 07 October 2015 06:46  |
Eclipse User |
|
|
|
Hi Pierre-Charles,
Should I consider these remaining bi-directional dependencies as bugs? Are there plans to remove them? I really appreciate the ability to develop various viewpoints in parallel and these dependencies might complicate integration of them. I am willing to document them as I find them and file a bug report if desired.
The one that I did encounter is related with a Diagram Extension containing a Diagram Creation tool. Adding such tool seems to add a dependency in the mapping that allows creation of the new diagram. That mapping is defined viewpoint owning the extended diagram.
Greetings,
Wilbert.
[Updated on: Wed, 07 October 2015 06:52] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03683 seconds