| Summary: | Code folding and formatting does not work properly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Daniel Santos <daniel.santos> | ||||
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | moritz.eysholdt | ||||
| Version: | 1.0.1 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 198312 [details]
Shows the folding bug
(In reply to comment #0) > The same is happend whenever I try > to format the code - it will mess up the code formatting totally. hi Daniel, Did you define some formatting rules? If so, could you post them along with an example document that doesn't get formatted in the way you would expect it? The generic implementations don't support your style to write a grammar as folding is donw along the containment structure of your AST model. So you need to "explain" how to fold your models by subclassing org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider |
Build Identifier: Whenever I try to collapse/expand an element within my code in the editor it will folding just part of the sub elements. The same is happend whenever I try to format the code - it will mess up the code formatting totally. Reproducible: Always Steps to Reproduce: Grammar: Vehicle: (Bus | Truck) "plate:" plate=ID "model:" model=STRING "}"; Bus: "bus:" "{" "seats:" seats=INT; Truck: "truck:" "{" "maxlength:" maxlenght=INT; 1. Generate model based on grammar 2. Start ide application 3. Create the follow model bus: { seats: 3 plate: LU133223 model: "Audi" } 4. Collapse model element bus The editor will folding parts of the "bus" element. See attachments