Formatting and quickfix with model modification [message #1828576] |
Fri, 12 June 2020 17:02 |
|
Hi
in one of my Xbase DSLs I have implemented basic formatting, basically delegating to the default XbaseFormatter for XBlockExpressions. Then, I have a quickfix based on model modification (not textual modification) that moves an XExpression of an XBlockExpression in a different position of the XBlockExpression. A quickfix based on model modification triggers the formatting, and this happens, but the result is that the formatter does not insert any blank character (neither space nor newline) after the moved XExpression (resulting in an invalid program after quickfix).
For example, given this initial model
{
exp1
exp2
}
where the quickfix is meant to move exp1 after exp2 the result is (see no space between the two exp2 after movement)
{
exp2exp1
}
In memory the XExpression is correctly moved.
Any idea of how I could handle/fix that? Of course I could switch to a quickfix based on textual replacement but that would be harder to implement...
many thanks in advance
Lorenzo
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Powered by
FUDForum. Page generated in 0.02934 seconds