Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334484 - implement formatter for ROOM DSL
Summary: implement formatter for ROOM DSL
Status: CLOSED FIXED
Alias: None
Product: eTrice
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: 0.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-16 13:15 EST by Henrik Rentz-Reichert CLA
Modified: 2011-12-16 02:48 EST (History)
0 users

See Also:


Attachments
initial contribution by Herward Ahlheit (6.21 KB, text/plain)
2011-02-10 03:50 EST, Henrik Rentz-Reichert CLA
no flags Details
improved formatter (6.50 KB, text/plain)
2011-02-10 03:54 EST, Henrik Rentz-Reichert CLA
no flags Details
clean up of improved formatter (5.06 KB, patch)
2011-03-03 07:59 EST, Herward Ahlheit CLA
hrr: iplog+
Details | Diff
Tight brackets if they are empty (809 bytes, patch)
2011-03-04 09:18 EST, Herward Ahlheit CLA
hrr: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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