[brailleblaster] Re: JFace and MVC for SWT widgets

  • From: Chris von See <chris@xxxxxxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Mon, 13 Jun 2011 14:03:28 -0700

I'm not particularly strong in JFace, but from looking at the code it seems odd to use Projections if you're not going to implement some sort of annotation such as those required for folding. Why not just make each view a JFace TextViewer?


On Jun 13, 2011, at 1:27 PM, Susan Jolly wrote:

Chris,

I think it is possible that there is an "amazing solution" if only we knew the right person to ask.

This article talks about the Eclipse capability to distinguish widget coordinates from model coordinates. "A widget coordinate corresponds to a position on the text viewer while a model coordinate corresponds to a position on the document." A view which doesn't show the entire document is here called a "projection." So one can imagine that the print view and braille views could be separate projections from the same document.

http://www.eclipse.org/articles/Article-Folding-in-Eclipse-Text-Editors/folding.html

Unfortunately the example code, which is for an XML editor, is built as an Eclipse plugin rather than as a stand-alone so I can't understand most of it.

Susan



Other related posts: