Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Labels broken?
Labels broken? [message #229907] Wed, 13 May 2009 08:22 Go to next message
No real name is currently offline No real nameFriend
Messages: 62
Registered: July 2009
Member
Hi,

I have a question regarding labels. In my editor for safe state machines
I have labels for signals which show the signal's name and type.
Everything worked fine at first, but since a few days - I can't recall
exactly when it started - when I change the signal's name in the label,
it isn't changed at all. I debugged it, and the setName method for
signals is not called when entering a name in the label. However, when I
type the name in the properties view in the field 'name' and press
enter, it works. The setName method is called and the label properly
displays the signal's name and its type.

I have no idea where to look to fix things. Can someone point out the
direction I have to go? It probably could have something to do with the
editor, edit and view pattern of the label as these are the last things
I changed (although it worked at first after changing this. However, I
didn't do anything with the labels after that). The edit and editor
patterns only show the signal's name as this is the attribute that is
supposed to be changed by modifying the label, while the view pattern
contains the name and the type of the signal.

Can someone help me out?

Regards,
Matthias
Re: Labels broken? [message #230005 is a reply to message #229907] Wed, 13 May 2009 11:33 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Matthias,

Try debugging XXXEditPart.getParser() and a parser returned from this method
for the not working labels.

-----------------
Alex Shatalin
Re: Labels broken? [message #230034 is a reply to message #230005] Wed, 13 May 2009 12:37 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 62
Registered: July 2009
Member
Hm, the method returns the right parser it seems:

Parser |MessageFormatParser
defaultPattern |null
editorPattern |"{0}"
editorProcessor |MessageFormat
editPattern |"{0}"
editProcessor |MessageFormat
features |EAttribute[2]
viewPattern |"{0}: {1},"
viewProcessor |MessageFormat

'{0}' represents the attribute 'name' and
'{1}' the attribute 'type'.

Alex Shatalin wrote:
> Hello Matthias,
>
> Try debugging XXXEditPart.getParser() and a parser returned from this
> method for the not working labels.
>
> -----------------
> Alex Shatalin
>
>
Re: Labels broken? [message #230049 is a reply to message #230034] Wed, 13 May 2009 12:40 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Matthias,

Try debugging parser returned from this method.

-----------------
Alex Shatalin
Re: Labels broken? [message #231281 is a reply to message #230049] Tue, 26 May 2009 08:07 Go to previous message
No real name is currently offline No real nameFriend
Messages: 62
Registered: July 2009
Member
Hi again,

I finally found the problem: It seems it is not possible to leave away
parts of the string in the edit and editor pattern, because when I
debugged the parser, it was waiting for 2 arguments and I gave it only
one. So this means, the other patterns also have to contain both {0} and
{1}.

Thanks for the help :)
Matthias

Alex Shatalin wrote:
> Hello Matthias,
>
> Try debugging parser returned from this method.
>
> -----------------
> Alex Shatalin
>
>
Previous Topic:Adding attribute for relationship between entities
Next Topic:Deletion of elements and OpenDiagramEditPolicy
Goto Forum:
  


Current Time: Thu Apr 25 06:01:14 GMT 2024

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

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

Back to the top