Summary: | "organize imports" does not find an import statement "add import" does. [code manipulation] | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Andreas Krüger <andreas.krueger> | ||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | dirk_baeumer | ||||
Version: | 2.0 | ||||||
Target Milestone: | 2.1 M2 | ||||||
Hardware: | PC | ||||||
OS: | Windows 2000 | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Andreas Krüger
2002-06-24 10:01:18 EDT
Andreas, can you please provide better steps to reproduce the problem. Organize import uses the AST and therefore requires some structural correctness of the CU. Without a test case it is hard to tell what caused the error. Created attachment 1766 [details]
Resonably short example that reproduces the problem.
Thanks for the test case. Martin, both add import and quick fix work, but not organize import. Please investigate. 20020911 The AST does not correctly resolve 'IOExpresion': 1. import the given source 2. set breakpoint in OrganizeImportsOperation.TypeReferenceProcessor.process 3. do organize imports 4. The first entry comming in is SimpleName. 'process' does a 'resolveBinding' on it. Strangly, the resolved binding goes to type X1 Moving to JCore The compiler binding of the name IOException is X1. I don't understand why. The method that binds TypeReference and its bindings is boggus. I am working on a fix. Fixed and released in 2.1 stream. Verified. |