Community
Participate
Working Groups
When an EmbeddedEditor is created without an initial model org.eclipse.xtext.ui.editor.embedded.EmbeddedEditor.createPartialEditor() and after that somebody calls org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorModelAccess.updateModel(String, String, String) the complete input is selected. Hacky workaround: Call createPartialEditor("","x","",false") with a single char.
This is because of https://bugs.eclipse.org/bugs/show_bug.cgi?id=368827 . I've move the creation of the org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorModelAccess in the hover to a codesection that is only called if there is sugar. When 368827 is fixed we can move the codeline back to createContents without initial content. pushed to master.
Hello, I have the same issue with Xtext 2.5.0, the workaround still works !
Requested via bug 522520. -M.