Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348199 - NPE at content assist with unordered group
Summary: NPE at content assist with unordered group
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: SR1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-03 09:03 EDT by Martin Stockhammer CLA
Modified: 2017-09-19 17:18 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: indigo+


Attachments
Stacktrace of the NPE (7.18 KB, text/plain)
2011-06-03 09:03 EDT, Martin Stockhammer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Stockhammer CLA 2011-06-03 09:03:08 EDT
Build Identifier: I20110519-1138

A grammar like the following with unordered group yields a NullpointerException after typing STRG-SPACE inside the brackets on: 
defined timeperiod {

}


GRAMMAR:
Timeperiod:
	{Timeperiod}
	'define' 'timeperiod' '{'
	(NL+ time+=TimeDef)*
	( 
	(NL+ 'timeperiod_name' name=UID (NL+ time+=TimeDef)* ) &
	(NL+ 'otherelement' alias=UID (NL+ time+=TimeDef)*)?
	
	)
	NL+ '}';

TimeDef:
	'july' day=INT
;

NL Terminal ist a newline.


NullpointerException:
java.lang.NullPointerException
	at org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser.getFollowElements(AbstractContentAssistParser.java:94)
	at 

Reproducible: Always
Comment 1 Martin Stockhammer CLA 2011-06-03 09:03:49 EDT
Created attachment 197299 [details]
Stacktrace of the NPE
Comment 2 Martin Stockhammer CLA 2011-06-03 09:06:18 EDT
In:
org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser

LINE 94:
for(AbstractElement consumed: element.getHandledUnorderedGroupElements()) {

The following statement
  element.getHandledUnorderedGroupElements() 
returns null
Comment 3 Sebastian Zarnekow CLA 2011-07-17 13:47:51 EDT
Fixed in June 24.
Comment 4 Karsten Thoms CLA 2017-09-19 17:06:59 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 17:18:46 EDT
Closing all bugs that were set to RESOLVED before Neon.0