Preserve Line Breaks [message #1121060] |
Mon, 30 September 2013 08:20 |
Lars Martin Messages: 24 Registered: July 2009 |
Junior Member |
|
|
Following Jan's Blog post I can modify parts of my model. This works great (Xtext 2.4.3) except for Strings where line breaks need to be preserved.
IXtextDocument xtextDocument = xtextEditor.getDocument();
xtextDocument.modify(new IUnitOfWork.Void<XtextResource>() {
public void process(XtextResource resource) {
...
Variable.setValue("a\nb\\nc\\\nd\\\\ne");
...
}
}
No matter what type of escaping the NEWLINE char I use, the Xtext editor receive exactly that passed String.
result:
V="a\nb\\nc\\\nd\\\\ne"
expected:
V="a
b
c
d
e"
Any hints how to preserve line breaks?
Regards, Lars M.
[Updated on: Mon, 30 September 2013 08:21] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04035 seconds