Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » click behaviour to edit a label
click behaviour to edit a label [message #1030782] Sun, 31 March 2013 15:08 Go to next message
Phil H is currently offline Phil H
Messages: 267
Registered: November 2012
Senior Member
Hi,

at the moment it seems that it take three clicks to edit a label. While the first click selects the node, the second one selects the label. I would like to change this behaviour, so that one click on a label directly allows me to edit it. But I couldn't find any method or attribute where I can define this.

Has anyone an idea how to apply this?

Re: click behaviour to edit a label [message #1031821 is a reply to message #1030782] Tue, 02 April 2013 04:34 Go to previous messageGo to next message
Valerian Merkling is currently offline Valerian Merkling
Messages: 71
Registered: May 2011
Member
Hi Phil,

I don't get your problem, even if you have to click twice to select your label, the first is enough to modify your label.

Click on your node, start to write the new label on your keyboard and the label will change.

Or am I missing somethings ?

Re: click behaviour to edit a label [message #1031920 is a reply to message #1031821] Tue, 02 April 2013 07:26 Go to previous messageGo to next message
Phil H is currently offline Phil H
Messages: 267
Registered: November 2012
Senior Member
Hi Valerian,

the problem is that when you just click once on a label you can't edit the label. You write a new label.

But what I want is that white window for editing existing labels with just one click. Hope you understand it now?

[Updated on: Tue, 02 April 2013 07:26]

Report message to a moderator

Re: click behaviour to edit a label [message #1032032 is a reply to message #1031920] Tue, 02 April 2013 09:44 Go to previous messageGo to next message
Valerian Merkling is currently offline Valerian Merkling
Messages: 71
Registered: May 2011
Member
Are you working with a node with a single label ? Or with a node with a compartment able to contains multiple labels ?
Re: click behaviour to edit a label [message #1032082 is a reply to message #1032032] Tue, 02 April 2013 10:49 Go to previous messageGo to next message
Phil H is currently offline Phil H
Messages: 267
Registered: November 2012
Senior Member
As you can see at the below image, I'm working on a node with a single label.

index.php/fa/14218/0/
  • Attachment: Unbenannt.JPG
    (Size: 11.06KB, Downloaded 134 times)
Re: click behaviour to edit a label [message #1032090 is a reply to message #1032082] Tue, 02 April 2013 10:56 Go to previous messageGo to next message
Valerian Merkling is currently offline Valerian Merkling
Messages: 71
Registered: May 2011
Member
There seems to be three labels... "Or", "Feature"1 and "Feature"2.

you said "the problem is that when you just click once on a label you can't edit the label. You write a new label."

What happend on your image? You've somethings like ?

+------------------+
| Or               |
| New Label        |
|------------------+
| Feature |Feature |

[Updated on: Tue, 02 April 2013 10:57]

Report message to a moderator

Re: click behaviour to edit a label [message #1032106 is a reply to message #1032090] Tue, 02 April 2013 11:16 Go to previous messageGo to next message
Phil H is currently offline Phil H
Messages: 267
Registered: November 2012
Senior Member
The "Or" one is the compartment, while "Feature" are two nodes. So one node contains a single label.

When I click on one of this labels, they're getting blue and I can rewrite it.
But I want to have this, after one click on the label:

index.php/fa/14221/0/
Re: click behaviour to edit a label [message #1036486 is a reply to message #1032106] Mon, 08 April 2013 08:50 Go to previous message
Thomas Beyer is currently offline Thomas Beyer
Messages: 55
Registered: February 2013
Member
Hi,

"F2" will also invoke the edit-behavior of your label.

If you want to shorten the way, you could listen to the setSelected-call of your label-editpart and programmatically invoke the edit-behavior.

public void setSelected(int value) {
  super.setSelected(value);
  performDirectEdit();
}


Regards
Thomas
Previous Topic:Empty runtime Outline
Next Topic:EOpposite in diagram editor
Goto Forum:
  


Current Time: Thu Aug 21 18:03:08 EDT 2014

Powered by FUDForum. Page generated in 0.02420 seconds