Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Capturing/Listening to the start point of a Label Edit Event on a diagram
icon5.gif  Capturing/Listening to the start point of a Label Edit Event on a diagram [message #1729022] Sat, 09 April 2016 16:08 Go to next message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
Hi Everyone,

Do you guys have any idea on how I can listen to the starting of a label edit ?

Currently, we can define a tool for EditLabel in Sirius and run a java service to do a desired action. However, it only fires when the editing is finished. For example, I need to show a form when the user clicks on a label to edit. If I write a java service to show the form, the form is shown when the editing action is done. I need to show the form when the label has entered in the editing mode !

I tried to use Input Label Expression as it is fired at the beginning of the label edit. But, for some reasons it run the java service 6 times !!!

To give you a more concrete idea, I need to show a Xtext embedded editor to the user to edit the transition label.

Thank you,
Bests,
Parsa

[Updated on: Sun, 10 April 2016 01:36]

Report message to a moderator

Re: Capturing/Listening to the Start Label Edit Event on a diagram [message #1729212 is a reply to message #1729022] Tue, 12 April 2016 08:37 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
On 09-Apr-16 18:08, Parsa Pourali wrote:
> I tried to use Input Label Expression as it is fired at the beginning of
> the label edit. But, for some reasons it run the java service 6 times !!!
Maybe it's normal, but sure sounds fishy.. Maybe you can produce a
simple example so we can see why it's executed that often?


> To give you a more concrete idea, I need to show a Xtext embedded editor
> to the user to edit the transition label.

Very interesting. I don't know if this is possible, but for sure I would
like to see a solution for this.

Felix
Re: Capturing/Listening to the Start Label Edit Event on a diagram [message #1729251 is a reply to message #1729212] Tue, 12 April 2016 12:04 Go to previous message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
Hi Felix,

>Maybe it's normal, but sure sounds fishy.. Maybe you can produce a
>simple example so we can see why it's executed that often?

You can just create an edge that connects to nodes (e.g. a transition in state machine). Then crate an edit label tool for the transition edge and in the input label expression of the editlabel just add ==>> service:myservice()

also add JOptionPane.ShowMessageDialog(null, "myservice");

into the body of the myservice method. You can see that it displays the option dialog 6 times !!! Not sure if this 6 is fixed though Wink

Best Regards,
Parsa
Previous Topic:Add key listener on an element of diagram
Next Topic:Eclipse/EMF/Sirius Developer (Paris, France)
Goto Forum:
  


Current Time: Fri Apr 26 00:06:22 GMT 2024

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

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

Back to the top