Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Text foreground color always red?
Text foreground color always red? [message #758554] Wed, 23 November 2011 16:20 Go to next message
Patrick Talbot is currently offline Patrick TalbotFriend
Messages: 36
Registered: November 2011
Member
Using Graphiti 0.8.1, I'm having a weird behavior where whatever the way I try to set the text foreground color, it always end up being displayed in red...

I verified the generated xmi and the colors are there and seem to be referenced correctly by the node (also reflected in the Outline view), but somehow the foreground color is ignored.

It wasn't doing that when I worked on the tutorial with the example EClass model, but it is the case since I'm now refering to my own EMF Model.

So I'm wondering if this is some kind of build-in validation hint (although my EMF model is correct as far as I can tell and the generated xmi validates)?

Did anyone ever encounter something like that?

Thanks for you help,
-Patrick Talbot
Re: Text foreground color always red? [message #758629 is a reply to message #758554] Wed, 23 November 2011 23:48 Go to previous messageGo to next message
Felix Velasco is currently offline Felix VelascoFriend
Messages: 43
Registered: July 2009
Member
Red foreground color usually means it need to be updated. Do you have any UpdateFeature that might be wanting to update the text, as in updateNeeded returning true?
Re: Text foreground color always red? [message #758637 is a reply to message #758629] Thu, 24 November 2011 03:14 Go to previous message
Patrick Talbot is currently offline Patrick TalbotFriend
Messages: 36
Registered: November 2011
Member
That was it!

Actually I discovered that my UpdateFeatures updateNeeded were called twice, once with a context PictogramElement being a Shape (the RoundedRectangle) then with a ContainerShape.
Since I was getting the value of the inside Text by testing instanceof ContainerShape, the first time the value stayed null, so it was found to be different from the Model value...

Thanks for the hint Felix!
-Patrick
Previous Topic:Using Zest LayoutAlgorithm in Graphiti
Next Topic:ConnectionDecorator text decoration
Goto Forum:
  


Current Time: Fri Mar 29 07:54:22 GMT 2024

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

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

Back to the top