Bug 415028 - [GrammarAccess] Can not leave rule 'TerminalRule' since the current object 'TerminalRule' has features with unconsumed values ...
Summary: [GrammarAccess] Can not leave rule 'TerminalRule' since the current object 'T...
Status: REOPENED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.4.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-14 04:16 EDT by Jens Von Pilgrim CLA
Modified: 2013-08-15 04:34 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Von Pilgrim CLA 2013-08-14 04:16:49 EDT
The generated GrammarAccess class is created differently, probably due to different JDKs. I would assume that some map is used somewhere, and the order of the map is not the same for different JDKs. This leads to unnecessary diffs and commits if the code is developed by a team using some SCM tool. Maybe you could use a sorted map or something like that.

The following code snippet shows the difference as they are created for my grammar (there are several similar lines):

	//  -> Can not leave rule 'TerminalRule' since the current object 'TerminalRule' has features with unconsumed values: 'type':1, 'fragment':1

vs.

	//  -> Can not leave rule 'TerminalRule' since the current object 'TerminalRule' has features with unconsumed values: 'fragment':1, 'type':1

As you can see, 'type' and 'fragment' are simply reordered.

Regards,
Jens
Comment 1 Sven Efftinge CLA 2013-08-15 02:53:13 EDT
pushed to review. please verify.
Comment 2 Sebastian Zarnekow CLA 2013-08-15 03:55:40 EDT
I wonder why there are these error messages at all in the grammar access.