Community
Participate
Working Groups
Created attachment 185326 [details] Project that demonstrates the compile error. Starting this out at EMF mainly as a heads up since it is in generated model code that the compile errors occur. However, this issue appears to originate with something that has changed in the JDT compiler at 3.7. It's unclear whether the compiler has acquired a new bug or had one fixed. I expect this bug will need to be transferred to JDT core to make this determination. If you import the attached project in Eclipse 3.6, you will not see compile errors. However, if you import it in Eclipse 3.7m4, there will be compile errors in the form of "Cannot cast from FeatureMap to InternalEList". This occurs in the generated model code. Key to the compile error is the J2SE-1.4 execution environment and the compiler compliance level matching that execution environment. If the compiler compliance level is changed from "1.4" to "1.5", the compile errors go away. This project is a new plug-in project with the "servertype" model definition imported from the Web Tools Platform project with the same name. The model code was generated, which created the Java files found under the "org.eclipse.jst.server.generic.servertype.definition" package. I have verified that identical code is generated when using Eclipse + EMF for both 3.6.1 + 2.6.1 and 3.7m4 + 2.7.0m4. The only difference is the compile errors when the compiler compliance level is "1.4" and Eclipse 3.7m4 is used. To fix this issue in WTP, we'll be updating the project to J2SE-1.5 and the corresponding compiler compliance level. As a result, WTP won't be depending on any particular outcome from this bug.
Just to reference the context, see also the discussion thread on our wtp-releng mailing list: http://dev.eclipse.org/mhonarc/lists/wtp-releng/msg08177.html (Thanks Larry).
I thought I'd already moved this to JDT. This looks like a regression in M4.
Srikanth, please investigate.
Hello ! Can you please provide a self contained test case ? The attached project references several extraneous packages and types. I am having trouble fetching the referenced projects to my workspace. If I use cvsroot/org.eclipse/www/modeling/emf and cvsroot/org.eclipse/www/emf as the repository path as mentioned in http://www.eclipse.org/projects/project_summary.php?projectid=modeling.emf, pserver aborts upon checkout.
Looks like that web page is out of date and the emf sources come from /cvsroot/modeling. Even then I don't know what all I need to download and what set up I should use. It shouldn't be that hard to get a small stand alone test case outside of EMF that shows this problem - Can you please attach one ? TIA.
I'm doubtful that I can successfully remove the "EMF" without disturbing the problem. If you create a Target Platform using an Eclipse 3.7M4 SDK and an EMF + XSD 2.7.0M4a SDK, the project should have all of its dependencies satisfied. For Windows, this target would use: http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/S-3.7M4-201012081300/eclipse-SDK-3.7M4-win32.zip http://www.eclipse.org/downloads/download.php?file=/modeling/emf/emf/downloads/drops/2.7.0/S201012150940/emf-xsd-SDK-2.7.0M4a.zip
Created attachment 185987 [details] junit tests (In reply to comment #6) > I'm doubtful that I can successfully remove the "EMF" without disturbing the > problem. If you create a Target Platform using an Eclipse 3.7M4 SDK and an EMF > + XSD 2.7.0M4a SDK, the project should have all of its dependencies satisfied. Actually, producing a standalone test case was very straightforward, nevertheless, thanks a lot for your instructions which were helpful. Attached patch contains two junits one showing the behavior in 1.5 and another in 1.4.
Created attachment 185993 [details] Patch + test - under test
See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=47074 In the code introduced to fix the bug mentioned above, we get confused if one of the types is raw and the is parameterized when we check if co-variance is being employed. We should look at the original methods in both cases for 1.4-, which is what we do with the current patch. Ayush, please review, TIA.
Released in HEAD for 3.7 M5.
Looks good.
Verified for 3.7M5 using I20110124-1800