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

Bug 340516

Summary: [Xtend] Index out of bounds in got to declaration on constructor call to StringBuilderBasedAppendable
Product: [Modeling] TMF Reporter: Sven Efftinge <sven.efftinge>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 2.0.0Flags: sven.efftinge: indigo+
Target Milestone: M7   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Sven Efftinge CLA 2011-03-20 12:34:28 EDT
StringBuildeRBasedAppendable defines two constructors.
If I use the default constructor in Xtend and go to declaration is broken.
The other constructor works.

org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=0, size=0
	at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:352)
	at org.eclipse.xtext.common.types.util.jdt.JavaElementFinder$Implementation.caseJvmConstructor(JavaElementFinder.java:149)
	at org.eclipse.xtext.common.types.util.jdt.JavaElementFinder$Implementation.caseJvmConstructor(JavaElementFinder.java:1)
	at org.eclipse.xtext.common.types.util.TypesSwitch.doSwitch(TypesSwitch.java:340)
	at org.eclipse.xtext.common.types.util.TypesSwitch.doSwitch(TypesSwitch.java:75)
	at org.eclipse.xtext.common.types.util.TypesSwitch.doSwitch(TypesSwitch.java:61)
	at org.eclipse.xtext.common.types.util.jdt.JavaElementFinder$Implementation.doSwitch(JavaElementFinder.java:183)
	at org.eclipse.xtext.common.types.util.jdt.JavaElementFinder.findElementFor(JavaElementFinder.java:44)
	at org.eclipse.xtext.common.types.xtext.ui.JdtHyperlinkFactory.createHyperlink(JdtHyperlinkFactory.java:39)
	at org.eclipse.xtext.common.types.xtext.ui.TypeAwareHyperlinkHelper.createHyperlinksTo(TypeAwareHyperlinkHelper.java:29)
	at org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper.createHyperlinksByOffset(HyperlinkHelper.java:83)
	at org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper.createHyperlinksByOffset(HyperlinkHelper.java:71)
	at org.eclipse.xtext.ui.editor.hyperlinking.DefaultHyperlinkDetector$1.exec(DefaultHyperlinkDetector.java:38)
	at org.eclipse.xtext.ui.editor.hyperlinking.DefaultHyperlinkDetector$1.exec(DefaultHyperlinkDetector.java:1)
	at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:86)
	at org.eclipse.xtext.ui.editor.hyperlinking.DefaultHyperlinkDetector.detectHyperlinks(DefaultHyperlinkDetector.java:36)
Comment 1 Sebastian Zarnekow CLA 2011-03-29 11:51:48 EDT
Fixed.
Comment 2 Karsten Thoms CLA 2017-09-19 17:52:05 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 18:02:48 EDT
Closing all bugs that were set to RESOLVED before Neon.0