Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[xtext-dev] Outline expansion state retention

Hi,

I was able to further improve outline expansion state retention by modifying equals/hashcode on ContentOutineNode to only consider the label and the parent of a node. 

It works very well in most situations now. However, I discovered that when authoring Xtext DSLs, one can easily produce situations in which the tail of a file (i.e. everything from the cursor location to the end of the file) becomes invalid, although it should be pretty clear that the file is only partially invalid. Whenever such a situation occurs, the outline will collapse.

Here is how to produce such a situation:

1) Create a new sample DSL
2) Insert a new rule:
Dummy: "dummy" name=ID;

As soon as you type the opening quotation mark, the rest of the file is marked as invalid. 

Even if I try to help the parser by writing:
Dummy: name=ID;
before I start inserting the keyword, the rest of the file will still be marked invalid as soon as I type the quotation mark, although it should be clear that the file is only invalid up to the semicolon.

Is there any chance of improving the parser so it only marks the rule invalid?

Peter

PS: If I am fast enough and manage to insert two quotation marks before the reconciler kicks in, everything is fine :-)

Back to the top