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

Bug 362235

Summary: [xtend][ui] NPE in XtendHighlightingCalculator resulting in XtextReconcilerJob dialog
Product: [Modeling] TMF Reporter: Knut Wannheden <knut.wannheden>
Component: XtextAssignee: Holger Schill <Holger.Schill>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: Holger.Schill, sebastian.zarnekow
Version: 2.1.0Flags: sebastian.zarnekow: indigo+
Target Milestone: SR2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Knut Wannheden CLA 2011-10-27 15:39:55 EDT
The following Xtend2 file results in the dreaded "An internal error occurred during: "XtextReconcilerJob"." dialog popping up:

class Other<T> {
	def foo() { 
	  	bar(i|i.toString)
	}
	def bar((Object)=>String o) {
	}
}

Here's the stack trace:


java.lang.NullPointerException
	at org.eclipse.xtext.xtend2.ui.highlighting.XtendHighlightingCalculator.highlightReferenceJvmType(XtendHighlightingCalculator.java:102)
	at org.eclipse.xtext.xbase.ui.highlighting.XbaseHighlightingCalculator.computeReferencedJvmTypeHighlighting(XbaseHighlightingCalculator.java:133)
	at org.eclipse.xtext.xbase.ui.highlighting.XbaseHighlightingCalculator.searchAndHighlightElements(XbaseHighlightingCalculator.java:120)
	at org.eclipse.xtext.xbase.ui.highlighting.XbaseHighlightingCalculator.doProvideHighlightingFor(XbaseHighlightingCalculator.java:106)
	at org.eclipse.xtext.xtend2.ui.highlighting.XtendHighlightingCalculator.doProvideHighlightingFor(XtendHighlightingCalculator.java:93)
	at org.eclipse.xtext.xbase.ui.highlighting.XbaseHighlightingCalculator.provideHighlightingFor(XbaseHighlightingCalculator.java:86)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.MergingHighlightedPositionAcceptor.provideHighlightingFor(MergingHighlightedPositionAcceptor.java:51)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.reconcilePositions(HighlightingReconciler.java:87)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingReconciler.modelChanged(HighlightingReconciler.java:275)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.notifyModelListeners(XtextDocument.java:118)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.afterModify(XtextDocument.java:172)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.afterModify(XtextDocument.java:1)
	at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.modify(AbstractReadWriteAcces.java:50)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.modify(XtextDocument.java:181)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.internalModify(XtextDocument.java:90)
	at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.reconcile(XtextDocumentReconcileStrategy.java:33)
	at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.run(XtextReconciler.java:239)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Knut Wannheden CLA 2011-10-27 15:48:19 EDT
Raising to major as this problem seems to occur with any Xtend class using generics.
Comment 2 Holger Schill CLA 2011-10-27 16:55:22 EDT
I will have a look at that this night (US GMT-4).
Comment 3 Holger Schill CLA 2011-10-27 17:30:55 EDT
pushed to master.
Comment 4 Karsten Thoms CLA 2017-09-19 17:08:13 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 17:19:47 EDT
Closing all bugs that were set to RESOLVED before Neon.0