Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Disable label editor for newly inserted symbols
Disable label editor for newly inserted symbols [message #209570] Mon, 27 October 2008 10:50 Go to next message
Eclipse UserFriend
Originally posted by: knakov.scopeset.de

Hi,

I don't want the label editor to be started when I insert a new symbol
in the diagram. How can I do that?

Thanks in advance,
Kalin
Re: Disable label editor for newly inserted symbols [message #209603 is a reply to message #209570] Mon, 27 October 2008 12:27 Go to previous message
Eclipse UserFriend
Originally posted by: knakov.scopeset.de

Hi,

I have found some solution - I use static variable to indicate if the
new object should be labeled immediately after insertion. The variable
is set in the CreateElementCommand (I need this since I show some dialog
box there which indicates if an existing object is added or a new one is
created). Then in the performDirectEdit() method of the edit part I
check if the static variable is set and the clear it so the next time
the object can be labeled with F2. This has 2 disadvantages:

1) It is not object oriented, this static variable is a patch.
2) I rely on the sequence in which doDefaultElementCreation() and
performDirectEdit are called.

Is there a better way to do a conditional run of the label editor on
newly create elements? Perhaps there is some way to transfer a flag or
something. I saw that in the source code the label editor is *always*
started for newly created elements.

Cheers,
Kalin

Kalin Nakov wrote:
> Hi,
>
> I don't want the label editor to be started when I insert a new symbol
> in the diagram. How can I do that?
>
> Thanks in advance,
> Kalin
Previous Topic:problems with multiple dynamic emf models
Next Topic:Model and Notation is still in the memory after diagram is closed
Goto Forum:
  


Current Time: Thu Apr 25 01:18:40 GMT 2024

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

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

Back to the top