Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339997 - [formatter] Formatter matches missing elements
Summary: [formatter] Formatter matches missing elements
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-15 07:09 EDT by Carl Wannheden CLA
Modified: 2011-04-04 10:13 EDT (History)
2 users (show)

See Also:
moritz.eysholdt: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Wannheden CLA 2011-03-15 07:09:27 EDT
Build Identifier: M20110210-1200

This is a regression, probably related to Bug 336235.
The following Domainmodel example:
  entity D { }
formats differently in Xtext 1.0.2 than before.

Reproducible: Always

Steps to Reproduce:
1. Create Domainmodel source
  entity D { }
2. In M20110210-1200 it formats as

entity D {
}

3. In prior versions it formats as

entity { }
Comment 1 Moritz Eysholdt CLA 2011-04-01 05:44:11 EDT
Hi Carl,

I can confirm that in the domain-model-example, the formatting-rule 

-----
c.setLinewrap(1, 1, 2).around(f.getFeatureRule());
-----

matches 

-----
Entity:	'entity' name=ID ('extends' superType=JvmTypeReference)? '{'
    features+=Feature*
'}';
-----


even thought Entity.features is an empty list.

This shouldn't be the case because when Entity.features is empty the rule Feature is never called.
Comment 2 Moritz Eysholdt CLA 2011-04-04 10:13:49 EDT
fixed in HEAD