|Re: Drill Down on Double Click [message #1220085 is a reply to message #1220044]
||Mon, 09 December 2013 15:26
|| Maxime Porhel
Registered: July 2009
Location: Nantes, France
Le 09/12/2013 11:26, Kunal Prasad a écrit :|
> 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  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 . 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
> 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 , 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
> Thanks & Regards,
Maxime Porhel - Obeo
Need training or professional services for Sirius?
|Re: Drill Down on Double Click [message #1385674 is a reply to message #1220201]
||Tue, 10 June 2014 12:52
| Wenjing Yuan
Registered: May 2014
I have tried the java service you provided above, it do works for adding a new layer to the current diagram, but I would like to remove the previous layer from the diagram, it seems not possible. I have it like this:
EList<Layer> currentLayers = diagram.getActivatedLayers();
Is that because the DefaultLayer could not be removed or the restriction of double-click event which does not allow the element triggers the double click to be removed.
My goal is the same as described above, I need a more detailed view of one specific element after double-click while the general view should not be shown at the same time. And there needs some way to go back to the generalView in detailedView.
As shown in attachment image, The generated view should only contain "A_TopEle" and "B_TopEle", when user click A, "A_SubEles" should be seen and if B_Top is clicked, only "B_SubEles" are shown. I have thought about using different presentations or diagrams to show, but pass the targeted element could be a problem or? Could you give me some suggestions here which would be better to handle this situation?
Powered by FUDForum
. Page generated in 0.02555 seconds