[brailleblaster] "Views" that aren't really Views

  • From: "Susan Jolly" <easjolly@xxxxxxxxxxxxx>
  • To: <brailleblaster@xxxxxxxxxxxxx>
  • Date: Sat, 11 Jun 2011 17:27:32 -0600

The StyledText widget does not by default present a View of an underlying document in the MVC sense. It works with a physical copy of the text of the underlying document that it has obtained via its setText method.


If you really want a proper MVC View, then, as I tried to make clear yesterday, you need to define your own content model (which has to satisfy the StyledTextContent interface) and use the StyledText setContent method to tell the widget to use your content model rather than its default.

There are probably more sophisticated ways of doing this with JFace since I think that Eclipse itself uses a true MVC paradigm.

Susan

Other related posts: