Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Drill Down on Double Click(Open a sub diagram by double click)
Drill Down on Double Click [message #1220044] Mon, 09 December 2013 05:26 Go to next message
Kunal Prasad is currently offline Kunal Prasad
Messages: 18
Registered: September 2009
Junior Member
Hi,

I have a container node on which I would like to configure double click description for following behavior:

1. Open another layer in the same diagram presentation.
2. Open another presentation for the same model. [This is I guess already supported]

It will be great if someone can help me to achieve the first goal of opening a layer of same diagram using Sirius Viewpoint Specification Editor.

Thanks & Regards,
Kunal
Re: Drill Down on Double Click [message #1220085 is a reply to message #1220044] Mon, 09 December 2013 10:26 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime Porhel
Messages: 32
Registered: July 2009
Member
Le 09/12/2013 11:26, Kunal Prasad a écrit :
> Hi,

Hi.

>
> I have a container node on which I would like to configure double click
> description for following behavior:
>
> 1. Open another layer in the same diagram presentation.
By default, the user can change the layers activation through the tabbar.
But you can create a Java service [1][2] to activate/deactivate a layer
and use it from a double clic description. You have to create a
'ChangeContext' operation as child of your tool 'Initial Operation'.
Then you will call your service from the browse expression. You will
find a sample service able to change a layer activation at [3]. With
this service in the VSM project and declared as 'Java extension' on the
current Viewpoint, you can call the service from the 'ChangeContext'
with the browse expression
"service:changeSampleLayerActivation(elementView)"



> 2. Open another presentation for the same model. [This is I guess
> already supported]

This is supported by the use of model operations in the VSM and more
precisely the 'Navigation' operation [4], but only for diagrams.
First you need to create a 'ChangeContext' operation as child of your
tool 'Initial Operation' to select the root semantic element of the
representation to open. If you want to open a representation on the
clicked element, you can simply use var:element as brows expression.
Then you can create a 'Navigation' operation as child of the 'Change
Context', select a diagram description to indicates the type of diagram
to open and enable or not the creation of a diagram if none exists with
the 'Create if not Existent' property.
'
>
> It will be great if someone can help me to achieve the first goal of
> opening a layer of same diagram using Sirius Viewpoint Specification
> Editor.
>
> Thanks & Regards,
> Kunal

Regards,

Maxime

[1]
http://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#service_methods
[2]
http://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#specialized
[3] https://gist.github.com/mPorhel/7873875
[4]
http://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html#navigation
Re: Drill Down on Double Click [message #1220191 is a reply to message #1220085] Tue, 10 December 2013 05:14 Go to previous messageGo to next message
Kunal Prasad is currently offline Kunal Prasad
Messages: 18
Registered: September 2009
Junior Member
Thanks Maxime for the methods to solve the problems. I was wondering if we can use Detail Descriptions for the same purpose, where a node provides a next level of presentation in the same diagram.

Can you detail how we can use the feature of 'Detail Descriptions'. I have tried to find ways to create a new Detail Description, but no luck so far Crying or Very Sad

Thanks,
Kunal
Re: Drill Down on Double Click [message #1220201 is a reply to message #1220191] Tue, 10 December 2013 06:03 Go to previous message
Maxime Porhel is currently offline Maxime Porhel
Messages: 32
Registered: July 2009
Member
Le 10/12/2013 11:14, Kunal Prasad a écrit :
> Thanks Maxime for the methods to solve the problems. I was wondering if
> we can use Detail Descriptions for the same purpose, where a node
> provides a next level of presentation in the same diagram.


A Representation Creation Description [1] linked to a diagram element
mapping A will produce (regarding the precondition check) a contextual
menu entry: right click a diagram element described by the mapping A >
Navigate > New Detail : Tool Label. This menu will allow to create a new
representation on the clicked sementic element or on a semantic element
accessible from the clicked element throught the Browse Expression.

You can also look into Representation Navigation Description [2] which
allow to open existing diagrams.

>
> Can you detail how we can use the feature of 'Detail Descriptions'. I
> have tried to find ways to create a new Detail Description, but no luck
> so far :cry:

The detail description property section allows you to select
Diagram/Table/Tree Creation Description tools. These tools must first be
created in a tool section of an existing Diagram Description or in a
Table/Tree Description. Then you can link a mapping and a Representation
Creation Description from the mappin Details Descriptions property
section or from the tool Mappings property section.


> Thanks,
> Kunal


Regards,

Maxime

[1]
http://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#representation_creation

[2]
http://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#representation_navigation
Previous Topic:Custom properties editor
Next Topic:Diagram not showing model elements from imported models
Goto Forum:
  


Current Time: Wed Apr 23 17:52:44 EDT 2014

Powered by FUDForum. Page generated in 0.02536 seconds