Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Enable Direct Edit Label after Node Creation
Enable Direct Edit Label after Node Creation [message #1797131] Thu, 25 October 2018 22:03 Go to next message
Larissa Schmid is currently offline Larissa SchmidFriend
Messages: 3
Registered: October 2018
Junior Member
Hi,

I created direct edit labels for some elements in my Sirius editor. Is there any way to enable them directly after I created an element, so that the user does not have to create the node and then select the property and open the direct edit manually? I tried using the "Elements to select" property, but all it does is selecting the element and not opening the edit label. When I am trying to navigate to the direct edit label via an Acceleo expression in the "Elements to select" property, it just silently fails. Sending a direct edit request to the edit part in an external java action does not work because the View seems to be created after the execution of the java action.

I noticed it works for Notes/Note Attachments, but was not able to find the exact implementation.

Regards,
Larissa
Re: Enable Direct Edit Label after Node Creation [message #1797368 is a reply to message #1797131] Tue, 30 October 2018 11:19 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

If you have set a direct edit tool on a mapping, you can "enter" in edit mode either by pressing F2, or by directly typing text. Therefore if the creation tool selects the new diagram element, you can immediately edit the label by typing text.

Regards,
Steve


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Enable Direct Edit Label after Node Creation [message #1797491 is a reply to message #1797368] Wed, 31 October 2018 15:44 Go to previous messageGo to next message
Larissa Schmid is currently offline Larissa SchmidFriend
Messages: 3
Registered: October 2018
Junior Member
Hi,

thank you for your reply. Unfortunately it is not exactly what I'm looking for. To be more precise, I want to open the cell editor directly after the creation without the need to type something (just as if a direct edit command was sent to the edit part).

Regards,
Larissa
Re: Enable Direct Edit Label after Node Creation [message #1797500 is a reply to message #1797491] Wed, 31 October 2018 17:28 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

Ok I see. I think you will need to create a java service in order to perform a org.eclipse.gef.requests.DirectEditRequest on the edit part concerning the newly created element.

Regards,
Steve


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Enable Direct Edit Label after Node Creation [message #1797503 is a reply to message #1797500] Wed, 31 October 2018 19:13 Go to previous message
Larissa Schmid is currently offline Larissa SchmidFriend
Messages: 3
Registered: October 2018
Junior Member
Edit: Sorry, I confused Services and Java Actions. But I just tried the service and it seems to has the same problem as the external java action in that it is executed before the editPart is created. Is there any way to force it to be executed later? Now I just added a "Change context" where I placed the service call after the creation of the node and the instance contained in it. I want to access the editPart of the instance.

Hi,

that's what I've tried already. I included an external java action in the node creation but the problem is that when the external java action is executed, the editPart is not yet created so I can't send an EditRequest to it. Do you have a hint on how to ensure that it is created earlier/the java action is executed later or which listener I could register on the editor in order to get notified when the editPart is created?

Regards,
Larissa

[Updated on: Wed, 31 October 2018 19:45]

Report message to a moderator

Previous Topic:Sirius - Tree Editor creation
Next Topic:How to implement a copy&paste tool on Edit Table
Goto Forum:
  


Current Time: Fri Apr 19 12:39:19 GMT 2024

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

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

Back to the top