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
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?