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

Bug 362214

Summary: [Xtend] Xtend name conflicts in generated Java classes extending class with same name but from different package
Product: [Modeling] TMF Reporter: Ingo Meyer <ingo.meyer>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: jan, sebastian.zarnekow
Version: unspecifiedFlags: jan: indigo+
Target Milestone: SR2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Ingo Meyer CLA 2011-10-27 11:48:28 EDT
Build Identifier: 20110609-2236

In Xtend 2.0.1.v201108151710 I have a similar error then bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=345722.

When class a.Test extends class b.Test the fqn is removed in the generated java class and gives and cycle error.

Maybe there is a Unit test missing for that case? ;-)

Reproducible: Always

Steps to Reproduce:
1. make two classes

package org.eclipse.xtext.example.domainmodel.test1
class Test {}

package org.eclipse.xtext.example.domainmodel.test2
class Test extends org.eclipse.xtext.example.domainmodel.test1.Test {}

2. the generated "...test2.Test.java" will look like:

package org.eclipse.xtext.example.domainmodel.test2;

import org.eclipse.xtext.example.domainmodel.test1.Test;

@SuppressWarnings("all")
public class Test extends Test {
}

3. bamm... :)
Comment 1 Jan Koehnlein CLA 2011-10-27 13:07:39 EDT
I've just checked in some change to the ImportManager that should deal with this situation. Could not reproduce this any more: I now get a cyclic dependency error marker and no code is built. Please reopen if the problem remains.
Comment 2 Sebastian Zarnekow CLA 2011-10-28 02:17:52 EDT
Marked as fixed (see last comment)
Comment 3 Ingo Meyer CLA 2011-10-28 03:32:31 EDT
(In reply to comment #1)
> I've just checked in some change to the ImportManager that should deal with
> this situation. Could not reproduce this any more: I now get a cyclic
> dependency error marker and no code is built. Please reopen if the problem
> remains.

yes, now it works. Thanks a lot.
Comment 4 Karsten Thoms CLA 2017-09-19 17:47:03 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 17:58:08 EDT
Closing all bugs that were set to RESOLVED before Neon.0