Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Formatting and quickfix with model modification
Formatting and quickfix with model modification [message #1828576] Fri, 12 June 2020 17:02
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
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


Previous Topic:Beginner tries on Xtext
Next Topic:Content assist testing with 2 grammars
Goto Forum:
  


Current Time: Fri Apr 26 06:04:33 GMT 2024

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

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

Back to the top