Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » I want to get mouse event information (Mouse down/Up).
I want to get mouse event information (Mouse down/Up). [message #1767358] Wed, 05 July 2017 07:46 Go to next message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
Hello.

I attach an image for explaining my situation.

index.php/fa/29850/0/

Left side is a sample instance diagram and right one is its metamodel.

When a user has created two problems (in this case, A and B) and want to connect the two elements from B to A using a contribution element (this case, C), I want to get the source (i.e., B) and the target (i.e., A) information from mouse down and up events.
Is there any way to do it?

Thank you so much in advance.

Best regards,
Grace
Re: I want to get mouse event information (Mouse down/Up). [message #1767708 is a reply to message #1767358] Mon, 10 July 2017 07:54 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 500
Registered: July 2009
Location: Nantes, France
Senior Member
Hi,

It seems you need an Element-Based Edge [1] to represent the contribution elements and a edge creation tool [2].

For the edge mapping, with domain class Contribution, after setting the source and target mappings to your "Problem" mapping, you can use feature:contribType as source finder expression and feature:target as target finder expression. Do not forget to define the semantic candidate expression with an expression to retrieve the Contributions elements from the diagram semantic target.

Then you can define an edge creation tool referencing your mapping, in the tool operation you wll have to create the Contribution element and to set the contribType and target.

Regards,

Maxime


[1] https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#edges
[2] https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#edge_tools
Re: I want to get mouse event information (Mouse down/Up). [message #1767710 is a reply to message #1767708] Mon, 10 July 2017 08:05 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 500
Registered: July 2009
Location: Nantes, France
Senior Member
Hi again,

From the title of your post "I want to get mouse event information (Mouse down/Up)", it seems that my previous answer might not be adapted.

In Sirius, you have the possibility to define the double click behavior with the corresponding tool, but if your need to get mouse event you will have to look into GEF capabilities and maybe provide your own drag tracker, edit policies, etc

Regards
Re: I want to get mouse event information (Mouse down/Up). [message #1768940 is a reply to message #1767710] Tue, 25 July 2017 07:11 Go to previous message
eunjung park is currently offline eunjung parkFriend
Messages: 72
Registered: April 2015
Member
Thank you so much for your help.
I could solve the problem.

Best regards,
Grace
Previous Topic:Add multi-touch gestures to Sirius
Next Topic:Validation Quick Fixes using external Java Actions
Goto Forum:
  


Current Time: Sat Feb 27 01:12:27 GMT 2021

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

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

Back to the top