Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334484

Summary: implement formatter for ROOM DSL
Product: [Modeling] eTrice Reporter: Henrik Rentz-Reichert <hrr>
Component: CoreAssignee: Project Inbox <etrice.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: 0.1.0
Attachments:
Description Flags
initial contribution by Herward Ahlheit
none
improved formatter
none
clean up of improved formatter
hrr: iplog+
Tight brackets if they are empty hrr: iplog+

Description Henrik Rentz-Reichert CLA 2011-01-16 13:15:58 EST
In conjunction with the graphical editors for structure and behavior Xtext formatters are needed to yield a pretty and well readable textual model file.

To this end the org.eclipse.etrice.core.formatting.RoomFormatter has to be filled with life.
Comment 1 Henrik Rentz-Reichert CLA 2011-02-10 03:50:32 EST
Created attachment 188658 [details]
initial contribution by Herward Ahlheit

Initial version of formatter for ROOM DSL
Comment 2 Henrik Rentz-Reichert CLA 2011-02-10 03:54:59 EST
Created attachment 188659 [details]
improved formatter

- whenever possible use grammar rule objects for linewraps and insert wraps after the rule
- simplify code if tokens have common rules (e.g. ".", ":")
- rules for <> and () brackets
- rules for single and multiline comments
Comment 3 Herward Ahlheit CLA 2011-03-03 07:59:02 EST
Created attachment 190256 [details]
clean up of improved formatter
Comment 4 Henrik Rentz-Reichert CLA 2011-03-03 08:04:44 EST
Comment on attachment 190256 [details]
clean up of improved formatter

accepted patch, thanks for the contribution!
Comment 5 Henrik Rentz-Reichert CLA 2011-03-04 08:07:28 EST
The formatter works quite fine now.
Comment 7 Herward Ahlheit CLA 2011-03-04 09:18:15 EST
Created attachment 190387 [details]
Tight brackets if they are empty
Comment 9 Henrik Rentz-Reichert CLA 2011-12-16 02:45:51 EST
closed resolved bug
Comment 10 Henrik Rentz-Reichert CLA 2011-12-16 02:48:11 EST
tagged as version 0.1.0