Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [graphiti-dev] Text underline && rich tooltips

Great! As it seems your change will not affect rotating, so Bug 372922 should be treated separately . Looking forward to your Gerrit push.

 

Regards,

Michael

 

 

From: graphiti-dev-bounces@xxxxxxxxxxx [mailto:graphiti-dev-bounces@xxxxxxxxxxx] On Behalf Of Felix Velasco
Sent: Freitag, 28. September 2012 11:12
To: Discuss development topics on Graphiti
Subject: Re: [graphiti-dev] Text underline && rich tooltips

 

Hi Michael,

 

Regarding your concerns:

 - Rotation: drawTextLayout does indeed support rotation, worry not. I hadn't seen #372922 before, but I made some rotation tests and run into the very same issues reported there. Width and height switch makes no sense, rotacion center is a difficult issue (specially in decorations), and I'm totally clueless on what to do regarding text orientation. As for the clipping, shouldn't it be handled by the underlying graphics object? If we specify rotation, shouldn't clipping coordinates be rotated, too?

 

 - The changes in the model only add new childs to existing elements, so old models can be read with no problem. As for unifying StyledText and AbstractText, it wouldn't affect compatibility. The only reason they are separated is because first I thought of only modifying MuiltiText. I'll unify them.

 

I'll try and make a first push to gerrit so the code can be reviewed. I also plan on adding some factory methods for TextStyle and TextStyleRegion objects before committing it all.

 

Regards,

Félix

2012/9/28 Wenz, Michael <michael.wenz@xxxxxxx>

Hi Felix,

 

that sounds really good and would be two cool features. Some comments from my side:

 

-          The drawTextFeature should be sufficient, they cover the >90% case of the possible usages, so I agree with you that spending that much extra effort for full html support will not be that benficial

-          There is on backlog item on our list that deals with the unification of the rotate functionality of Text and MultiText (https://bugs.eclipse.org/bugs/show_bug.cgi?id=375922). Is rotation also possible using drawTextLayout? I don’t know that API so far, so I’m asking.

-          Changing the pictogram model is always tricky and needs extra care. We have to ensure that old diagram model files can still be read by a new version of Graphiti. Needing some kind of migration to use new features is possible and we have done that before. At first glance I appears better to me to unify StyledText and AbstractText, but I’m not sure yet what that means with respect to compatibility.

 

Regarding setting up Gerrit. There is a short description of the necessary steps in the Wiki: http://wiki.eclipse.org/GMP/Graphiti#Repository . Also http://wiki.eclipse.org/Gerrit#Using_Gerrit_with_EGit: provides a more general description of the necessary steps. Just let me know if these pages help; as I just browsed over them I thought some step by step description would be nice…

 

Regards,

Michael

 

From: graphiti-dev-bounces@xxxxxxxxxxx [mailto:graphiti-dev-bounces@xxxxxxxxxxx] On Behalf Of Felix Velasco
Sent: Donnerstag, 27. September 2012 23:42
To: graphiti-dev@xxxxxxxxxxx
Subject: [graphiti-dev] Text underline && rich tooltips

 

  Hi,

 

  I've been working in a a change to allow rich text in graphiti, and I'd like some feedback, since I'm not totally sure my approach is the best.

 

  Currently, both in GFText and GFTextFlow graphiti uses (directly or not) graphics.drawText(), which allows very little customization. If we use graphics.drawTextLayout() instead, we could define subregions with underline, strikeout, different fore and background colors, font boldness, etc.... It's clearly less powerful than html parsing, as proposed in bug #373299, but I believe that's way too much work for the benefit.

 

  I've modified the graphiti ecore to resemble the TextLayout structure, like this. I've also made changes to GFText, GFMultilineText and GFTextFlow to properly draw the proposed structure. In order to support tooltips, I've added a getRichToolTip method to IToolBehaviorProvider, and a default implementation in DefaultToolBehaviorProvider for it that provides backwards compatibility by calling getToolTip. I've also played with SketchToolBehavior to provide a working example.

 

  All in all, it means changes in over 80 classes (many of them because of the model changes). I don't feel any confident at all in my knowledge of gerrit, in order to publish a branch for you to see it and comment on it. Could you please guide me on how to push these changes to gerrit so they can be reviewed?

 

  Regards,

Félix Velasco

 


_______________________________________________
graphiti-dev mailing list
graphiti-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/graphiti-dev

 


Back to the top