Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » [Sirius] Get element from mouse hover event on diagram(How to get the node on diagram, which User is hovering)
[Sirius] Get element from mouse hover event on diagram [message #1728005] Wed, 30 March 2016 08:02 Go to next message
Nguyen Xuan Nhan is currently offline Nguyen Xuan NhanFriend
Messages: 11
Registered: February 2016
Junior Member
Hi all friends,

I'm working with Sirius to develop my own diagram.
I want to get element on diagram, which User is hovering mouse over.
Do you have any idea to get element from mouseover event?
Re: [Sirius] Get element from mouse hover event on diagram [message #1728011 is a reply to message #1728005] Wed, 30 March 2016 08:58 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
On 30-Mar-16 10:02, Nguyen Xuan Nhan wrote:
> Hi all friends,
>
> I'm working with Sirius to develop my own diagram.
> I want to get element on diagram, which User is hovering mouse over. Do
> you have any idea to get element from mouseover event?

I would try this: Create a dummy tool with a dummy predicate expression
that calls a java service. In your service method, set a breakpoint.
Start a debug session, disable the breakpoint. Hover over some element
and then activate the breakpoint which should hit as soon as you move
the mouse. Then look at the stacktrace and you should get some clues.

Felix
Re: [Sirius] Get element from mouse hover event on diagram [message #1728018 is a reply to message #1728011] Wed, 30 March 2016 09:18 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
On 30-Mar-16 10:58, Felix Dorner wrote:
> On 30-Mar-16 10:02, Nguyen Xuan Nhan wrote:
>> Hi all friends,
>>
>> I'm working with Sirius to develop my own diagram.
>> I want to get element on diagram, which User is hovering mouse over. Do
>> you have any idea to get element from mouseover event?
>
> I would try this: Create a dummy tool with a dummy predicate expression
> that calls a java service. In your service method, set a breakpoint.
> Start a debug session, disable the breakpoint. Hover over some element
> and then activate the breakpoint which should hit as soon as you move
> the mouse. Then look at the stacktrace and you should get some clues.

Well rofl, that's impossible to do.. But anyway, the breakpoint should
hit as soon as the mouse enters the diagram..

> Felix
Re: [Sirius] Get element from mouse hover event on diagram [message #1728422 is a reply to message #1728018] Mon, 04 April 2016 09:51 Go to previous messageGo to next message
Nguyen Xuan Nhan is currently offline Nguyen Xuan NhanFriend
Messages: 11
Registered: February 2016
Junior Member
Hi Felix,
Thank you for your quick reply.
Re: [Sirius] Get element from mouse hover event on diagram [message #1728423 is a reply to message #1728422] Mon, 04 April 2016 09:52 Go to previous messageGo to next message
Nguyen Xuan Nhan is currently offline Nguyen Xuan NhanFriend
Messages: 11
Registered: February 2016
Junior Member
Any other suggestion is welcome!

[Updated on: Mon, 04 April 2016 09:52]

Report message to a moderator

Re: [Sirius] Get element from mouse hover event on diagram [message #1728563 is a reply to message #1728423] Tue, 05 April 2016 13:07 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
On 04/04/2016 11:52, Nguyen Xuan Nhan wrote:
> Any other suggestions?
Couldn't you get along with my hint?

Felix
Re: [Sirius] Get element from mouse hover event on diagram [message #1728644 is a reply to message #1728563] Wed, 06 April 2016 08:33 Go to previous messageGo to next message
Nguyen Xuan Nhan is currently offline Nguyen Xuan NhanFriend
Messages: 11
Registered: February 2016
Junior Member
Hi Felix,

Felix Dorner wrote on Tue, 05 April 2016 13:07

Couldn't you get along with my hint?


I follow your hint, however I cannot hovering mouse during enable breakpoint.

As my investigation, hovering mouse to element is processed by SiriusPopupBarEditPolicy (PopupBarEditPolicy). And I'm stuck in modify popupbar editpolicy, replace the default SiriusPopupBarEditPolicy by my own editpolicy.

I think there is extension to add popupbar editpolicy.

Nhan
Re: [Sirius] Get element from mouse hover event on diagram [message #1728658 is a reply to message #1728644] Wed, 06 April 2016 10:29 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
On 06-Apr-16 10:33, Nguyen Xuan Nhan wrote:
> Hi Felix,
>
> Felix Dorner wrote on Tue, 05 April 2016 13:07
>> Couldn't you get along with my hint?
>
>
> I follow your hint, however I cannot hovering mouse during enable
> breakpoint.

I seem to remember that the predicate expression breakpoint will hit as
soon as you enter the diagram with your dummy tool?

> As my investigation, hovering mouse to element is processed by
> SiriusPopupBarEditPolicy (PopupBarEditPolicy). And I'm stuck in modify
> popupbar editpolicy, replace the default SiriusPopupBarEditPolicy by my
> own editpolicy.

I have no clue about that.
Previous Topic:Copy File containing objects with diagrams
Next Topic:Service to query itemprovider combobox elements when connecting reference based edge
Goto Forum:
  


Current Time: Fri Apr 19 22:59:22 GMT 2024

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

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

Back to the top