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

Bug 345519

Summary: [generator][serializer] NPE if language has no super grammar
Product: [Modeling] TMF Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: moritz.eysholdt
Version: 2.0.0Flags: moritz.eysholdt: indigo+
Target Milestone: SR1   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Performed to xtext.tests workflows none

Description Sebastian Zarnekow CLA 2011-05-12 01:38:22 EDT
java.lang.NullPointerException
	at org.eclipse.xtext.GrammarUtil.getNamespace(GrammarUtil.java:66)
	at org.eclipse.xtext.generator.Naming.basePackageRuntime(Naming.java:97)
	at org.eclipse.xtext.generator.serializer.GeneratedFile.getName(GeneratedFile.java:18)
	at org.eclipse.xtext.generator.serializer.SemanticSequencer.getQualifiedName(SemanticSequencer.java:16)
	at org.eclipse.xtext.generator.serializer.AbstractSemanticSequencer.getFileContents(AbstractSemanticSequencer.java:311)
	at org.eclipse.xtext.generator.serializer.SerializerFragment.generate(SerializerFragment.java:80)
	at org.eclipse.xtext.generator.Xtend2GeneratorFragment.generate(Xtend2GeneratorFragment.java:40)
Comment 1 Sebastian Zarnekow CLA 2011-05-12 03:30:22 EDT
Created attachment 195462 [details]
Performed to xtext.tests workflows

Please find attached a patch for the workflows that generate the test languages. The patch adds the serializer fragment to the configuration for the runtime-test languages.
Comment 2 Moritz Eysholdt CLA 2011-07-31 12:07:22 EDT
I've migrated all tests languages from xtext.tests (except bug 346695 and the ones specific for the ParseTreeConstructor) to the new serializer. Code generation runs without NPEs. Therefore, I consider this fixed.
Comment 3 Karsten Thoms CLA 2017-09-19 16:58:32 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:09:45 EDT
Closing all bugs that were set to RESOLVED before Neon.0