Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Embedded Xtext editor slects all text after using updateModel
Embedded Xtext editor slects all text after using updateModel [message #1744562] Wed, 28 September 2016 09:56 Go to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1635
Registered: January 2014
Senior Member

Hi,

As stated in the subject I have an embedded XText editor I use in a property sheet. This works in general very well. The only problem I currently have is that when I set the content of the editor it always shows the text completely selected. This is very anyoing for editing the text.

I tried to use the setSelection method of my editors' XtextSourceViewer with an emtpy TextSelection, but got now success.

Any tips what I can do here.

Thanks in advance,
Alois
Re: Embedded Xtext editor slects all text after using updateModel [message #1744578 is a reply to message #1744562] Wed, 28 September 2016 14:04 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14735
Registered: July 2009
Senior Member
can you please file a bug for that.

you can workaround the problem by initial creating the embedded editor using .createPartialEditor("","","", true)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Embedded Xtext editor slects all text after using updateModel [message #1744579 is a reply to message #1744578] Wed, 28 September 2016 14:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14735
Registered: July 2009
Senior Member
(ps i am not sure if this a feature for the "non artifical line breaks" part.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Embedded Xtext editor slects all text after using updateModel [message #1744614 is a reply to message #1744579] Wed, 28 September 2016 21:23 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1635
Registered: January 2014
Senior Member

Thanks for the fast answer. Yes this workaround fixes my issue.

Should I still report the bug?
Re: Embedded Xtext editor slects all text after using updateModel [message #1744622 is a reply to message #1744614] Thu, 29 September 2016 04:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14735
Registered: July 2009
Senior Member
Yes

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Embedded Xtext editor slects all text after using updateModel [message #1744633 is a reply to message #1744622] Thu, 29 September 2016 07:35 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1635
Registered: January 2014
Senior Member

done

https://bugs.eclipse.org/bugs/show_bug.cgi?id=502526
Previous Topic:Grammar Mixins
Next Topic:cross reference in different files
Goto Forum:
  


Current Time: Thu Dec 05 01:12:21 GMT 2024

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

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

Back to the top