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

Bug 352286

Summary: NPE when hyperlinking at EOF
Product: [Modeling] TMF Reporter: Matthieu Wipliez <matthieu.wipliez>
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:

Description Matthieu Wipliez CLA 2011-07-17 07:39:05 EDT
Build Identifier: 20110615-0604

When trying to open declaration (with Ctrl) at the end of a file, there is a NullPointerException in org.eclipse.xtext.resource.EObjectAtOffsetHelper.internalResolveElementAt.

Stack trace:

java.lang.NullPointerException
	at org.eclipse.xtext.resource.EObjectAtOffsetHelper.internalResolveElementAt(EObjectAtOffsetHelper.java:42)
	at org.eclipse.xtext.resource.EObjectAtOffsetHelper.resolveCrossReferencedElementAt(EObjectAtOffsetHelper.java:35)
	at org.eclipse.xtext.xbase.jvmmodel.JvmEObjectAtOffsetHelper.resolveCrossReferencedElementAt(JvmEObjectAtOffsetHelper.java:26)
	at org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper.createHyperlinksByOffset(HyperlinkHelper.java:79)
...

Reproducible: Always

Steps to Reproduce:
1. open an Xtext editor (tried with two of my own grammars and with the Domain-Model)
2. go to the last character
3. keep Ctrl pressed and move the mouse around the last character
Comment 1 Sebastian Zarnekow CLA 2011-07-22 05:53:14 EDT
I can no longer reproduce the issue with the latest version (though it was easy with Xtext 2.0). Marked as Fixed for SR1.
Comment 2 Karsten Thoms CLA 2017-09-19 16:56:32 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:07:31 EDT
Closing all bugs that were set to RESOLVED before Neon.0