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

Bug 370011

Summary: [Xtend] Cannot call static method on class with same (simple) name as surrounding class
Product: [Modeling] TMF Reporter: Sven-Torben Janus <janus>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: janus, sebastian.zarnekow
Version: 2.2.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Sven-Torben Janus CLA 2012-01-27 16:06:38 EST
Build Identifier: Build Identifier: 2.2.1 (on Eclipse Version: 3.7.1 Build id: M20110909-1335)

Calling a static method on a class with full package name, gives error "Couldn't resolve reference to JvmIdentifiableElement '<ElementName'.".
As demonstrated in section "Steps to reproduce", this is especially problematic when surrounding class has the same name as class on which static method should be called.

Reproducible: Always

Steps to Reproduce:
1. Create a new Xtend file with the following contents:

package test
class Response {
	def public get() {
		javax.ws.rs.core.Response::seeOther (new java.net.URI("http://www..host.tld/")).build
	}	
}

2. Save file
Comment 1 Sebastian Zarnekow CLA 2012-01-30 03:11:25 EST
It should be 

javax::ws::rs::core::Response::seeOther

Please reopen if the problem persists.
Comment 2 Karsten Thoms CLA 2017-09-19 17:47:22 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:58:30 EDT
Closing all bugs that were set to RESOLVED before Neon.0