Summary: | A non-1.5 project with 1.5 projects in the classpath does not show methods with generics | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Michael East <mseast> | ||||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||||
Status: | CLOSED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | daniel_megert, david.stubbs | ||||||
Version: | 3.1 | ||||||||
Target Milestone: | 3.1 RC2 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Michael East
2005-06-05 02:59:24 EDT
You can only use 5.0 constructs if the project is set to 5.0. That's how the builder works. Created attachment 22392 [details]
Sample projects
I'm not suggesting that 1.4 should be able to make use of 1.5 constructs. What I'm saying is that if you have a 1.5 project and older 1.4 code is using it, markers incorrectly appear saying that methods do not exist. Please look at the two projects I'm attaching. Project A is 1.4 compliant, Project B is 1.5 compliant. You'll see that in A, there is a marker saying 'The method foo(List) is undefined for the type Blah'. If you use code assist to get methods for Blah, foo is not on the list. The appropriate behaviour should be that "Blah.foo(List arg0)" appear in code assist (whereas 1.5 projects would see "Blah.foo(List<String> list)"), and that marker should not be there. This is the bug, and it only happens with projects in the buildpath. If you export B into a jar and use it in A, "Blah.foo(List arg0)" appears. The project and the JAR should behave the same way. Created attachment 22408 [details]
Editor with temporary error
There's no error marker reported but a temporary problem is reported (see
attached picture) by JDT Core and the method is not reported by code assist.
+1 for RC2 Source type converter should filter out 1.5 artifacts when client project is not 1.5 source level. *** Bug 98262 has been marked as a duplicate of this bug. *** Changed SourceTypeConverter to not convert 1.5 constructs if in 1.4 mode or below. Added regression test ReconcilerTest#testTwoProjectsWithDifferentCompliance() Verified with N20050609-0010 + JDT/Core HEAD Verified for 3.1 RC2 using build I20050610-0010 |