Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gef-dev] status of org.eclipse.gef.examples.text


Thanks for helping out with the text support. Most of the problems you are finding in the example are hopefully related to the examples poor support for certain requests. In other words, it does not do a good job of manipulating its model based on text requests.

That area is receiving little attention right now because we are focusing on the portion of text editing that will be in GEF, and not the example.  A lot of code will be moving into GEF by the end of next week. We are trying to think through every possible scenario of what the user might try to do in different types of text applications, and support them in the text editing framework. The task of manipulating a model will always be the client's responsibility.

To answer your question about which tool should be active, our current thoughts are that the TextTool could be active all the time. When there is no selection range, it has no effect on its superclass' behavior. You should also be able to activate it in response to things like direct editing.

-Randy



John Bradley <john.bradley@xxxxxxxxx>
Sent by: gef-dev-bounces@xxxxxxxxxxx

01/12/2006 06:25 AM

Please respond to
GEF development

To
gef-dev@xxxxxxxxxxx
cc
Subject
[gef-dev] status of org.eclipse.gef.examples.text





I was interested in seeing whether a richer text model could be incorporated
into my developing GEF editor -- so that the contents of certain edit parts
could have richer text (with bold, underlining, lists, etc etc), and to that
end I have been looking at org.eclipse.gef.examples.text.

It doesn't seem to be quite ready for prime time as of yet.  I found quite
quickly at several errors in the behaviour:

(a) when I highlighted a block of text and clicked on the "bold" button the
window was redrawn with the bolded text shown on a line by itself.  If, for
example, I highlighted the word "embolden" in the text "I am trying to embolden
a part of this text" I got as a result:

I am trying to
embolden
a part of this text.

This seemed to stop happening (although, of course, this is not necessarily the
proper answer), by commenting out two lines in TextFlowPart that wanted to set
the TextFlow figure's layout manager to "SimpleTextLayout".

(b) If I then tried to add a second attribute to the same block of text (now,
tried to add "italics" to the word "embolden", a runtime exception was thown
(apparently the one in the TextFlowPart's CaretInfo method

(c) If I tried to select a portion of some bolded text, and clicked on the bold
button -- to "un-bold" it -- nothing seemed to happen

It, thus, seemed to me that the code shown here was really still under
development.  I'd still love, however, to be able to use some of this material
to provide rich text support in my GEF application.  I noted plans for
upgrading the text support, and it seemed to be a part of the plans for GEF
3.2.  What is the status of the code as I find it in 3.1.1 now??

A further question -- I wasn't sure how to set things up so that the text
facilities (the TextTool, and perhaps other components) would come into play
only in edit parts that contain the text.  In a really clumsy way, I tried
setting the text tool as the default tool whenever the mouse entered the figure
associated with the enriched thext, and then resetting the tool to whatever it
was when the mouse left the figure again -- but this seemed dubious at best --
although it did seem to work reasonably well.  What should I do instead?

Best wishes.                                 ... john bradley
_______________________________________________
gef-dev mailing list
gef-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gef-dev


Back to the top