Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to implement complex selections?
How to implement complex selections? [message #208625] Tue, 07 February 2006 18:25 Go to next message
Tomáš Studva is currently offline Tomáš StudvaFriend
Messages: 9
Registered: July 2009
Junior Member
Hi,
I'm member of team developing wysiswyg xml editor. roject is based on GEF and mainly diplaying text. We have chosen to use one editpart to controll one line of text. I need to (re)implement text selections. How to do that if standard GEF mechanism(selection is collection of editparts) doesn't handle this?
I have these ideas(possibilities):
1, to subclass GraphicalViewer and implement it there.
2, to use standard viewer and only add some editpart Text SelectionStatus and by new policy show text selections.
3,to use only mentioned policy(doesn't to select anything in viewer)
If you have more ideas or thing some is bad or good,please answer.
Tomas Studva
Re: How to implement complex selections? [message #208649 is a reply to message #208625] Tue, 07 February 2006 20:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

I am going to release an extendible selectionmodel class for EditPartViewer.
My test case is for exactly the same purpose: text editing. We have defined
a selection range, which includes two textlocations. A text location is an
editpart and an offset in that part.

"Tomas Studva" <tstudva@gmail.com> wrote in message
news:5217253.1139336768927.JavaMail.root@cp1.javalobby.org...
> Hi,
> I'm member of team developing wysiswyg xml editor. roject is based on GEF
> and mainly diplaying text. We have chosen to use one editpart to controll
> one line of text. I need to (re)implement text selections. How to do that
> if standard GEF mechanism(selection is collection of editparts) doesn't
> handle this?
> I have these ideas(possibilities):
> 1, to subclass GraphicalViewer and implement it there.
> 2, to use standard viewer and only add some editpart Text SelectionStatus
> and by new policy show text selections.
> 3,to use only mentioned policy(doesn't to select anything in viewer)
> If you have more ideas or thing some is bad or good,please answer.
> Tomas Studva
Re:Re: How to implement complex selections? [message #208708 is a reply to message #208649] Wed, 08 February 2006 09:34 Go to previous messageGo to next message
Tomáš Studva is currently offline Tomáš StudvaFriend
Messages: 9
Registered: July 2009
Junior Member
Wow, that is super, very helpful. Thanx. When can I expect these new features in GEF, which version and estimated date?
Is there any list with upcoming features?
Tomas
Prepared GEF text wysiwyg framework [message #208814 is a reply to message #208708] Thu, 09 February 2006 11:42 Go to previous messageGo to next message
Tomáš Studva is currently offline Tomáš StudvaFriend
Messages: 9
Registered: July 2009
Junior Member
I found the answer, what will be new. At www.eclipseorg/gef
can be found some info and also link to document describing prepared wysiwyg text editting framework part: http://www.eclipse.org/gef/team/wysiwyg.html.
I've read the document and some parts don't suit xml wysiwyg editor.
1, only one text selection - yes it is common, but what if there is now way to implement it this way, in wysiwyg xml editor we uses document ordering selection(like in HTML) in model, but this editor supports also XSLT transformation, which can in view divide one model selection to many. What about to make it extensible, also to many selections by user of the framework?
2,(Compound)textual editpart should be interface to allow implement it in application context(probably nothing new I say)
3, merging can be implemented automaticaly, but not always done, should be controlled by model(i.e. Command.canExecute())
Tomas Studva
Re: Prepared GEF text wysiwyg framework [message #209064 is a reply to message #208814] Fri, 10 February 2006 19:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

I'm not sure I understand you comments. There is one selection range in
terms of text editparts. This doesn't mean that the selection has to
correspond to a contiguous range in your model, or that your model is a
single document, or anything at all. Does this help any?

I am trying to release some code as provisional API for 3.2, but I am
pressed for time at the moment.

> 1, only one text selection - yes it is common, but what if there is now
> way to implement it this way, in wysiwyg xml editor we uses document
> ordering selection(like in HTML) in model, but this editor supports also
> XSLT transformation, which can in view divide one model selection to many.
> What about to make it extensible, also to many selections by user of the
> framework?
Re: Prepared GEF text wysiwyg framework [message #209073 is a reply to message #209064] Fri, 10 February 2006 21:41 Go to previous messageGo to next message
Tomáš Studva is currently offline Tomáš StudvaFriend
Messages: 9
Registered: July 2009
Junior Member
I try to explain it. Standard is to select wysiwyg style, what I selected(draged by mouse) is selected(highlighted).
But in our editor not always. Selection is constructed in model by two pointers collected from user(drag start and end point). So interval of model is constructed and than is transformed to many intervals to view. These intervals of view should be displayed.
If flow in model and flow in view is not same or model:view(object rate) is not 1:1, one user drag, which correspond to one model selection is displayed by many view selections.
<b>Example:</b> document with content(labels of chapters). if chapter is selected in content, also chapter in body of document is selected.

>but I am
> pressed for time at the moment.
Me too :-). So you say, we should code it by ourself. I can wait until start of may, for new(full&stable) api, but no longer. Thanx for help.

> I'm not sure I understand you comments. There is one
> selection range in
> terms of text editparts. This doesn't mean that the
> selection has to
> correspond to a contiguous range in your model, or
> that your model is a
> single document, or anything at all. Does this help
> any?
>
> I am trying to release some code as provisional API
> for 3.2, but I am
> pressed for time at the moment.
>
> > 1, only one text selection - yes it is common, but
> what if there is now
> > way to implement it this way, in wysiwyg xml editor
> we uses document
> > ordering selection(like in HTML) in model, but this
> editor supports also
> > XSLT transformation, which can in view divide one
> model selection to many.
> > What about to make it extensible, also to many
> selections by user of the
> > framework?
>
>
A multipage editor with palette [message #215264 is a reply to message #209073] Fri, 28 April 2006 09:09 Go to previous message
Eclipse UserFriend
Originally posted by: dessartn.imag.fr

Hello.

Can I make a multipages editor with a palette shared
throws each tab?


Thanks.
Previous Topic:Using AbstractTreeEditPart in a GEF Editor
Next Topic:Using SWT control as figure in GEF editor
Goto Forum:
  


Current Time: Sat Apr 20 01:06:09 GMT 2024

Powered by FUDForum. Page generated in 0.03351 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top