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

Bug 348199

Summary: NPE at content assist with unordered group
Product: [Modeling] TMF Reporter: Martin Stockhammer <hurzl>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 2.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: SR1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Stacktrace of the NPE none

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