Bug 36232 - binding do not fully consider working copies
Summary: binding do not fully consider working copies
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-08 13:45 EDT by Adam Kiezun CLA
Modified: 2003-07-16 04:51 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2003-04-08 13:45:31 EDT
(i asked on the mailing list but received no answer so i will treat it as a bug)

I have a cu on disk - the cu looks like this:
class A{}
it has a corresponding shared working copy

then i create 2 working copies:
the first exists only in memory and has no corresponding cu on disk
interface I{}

and seconds one (this is _not_ the shared working copy - this one should shadow 
the shared working copy)
class A implements I{}

The problem is, that when I call resolveBinding() on A in the second
working copy i get a binding with no superinterfaces.
Comment 1 Philipe Mulet CLA 2003-04-11 03:01:01 EDT
Agreed. The unit where the resolve action is initiated should take precedence.
Shared working copies are triggered in resolution slightly too early.
Comment 2 Philipe Mulet CLA 2003-04-16 08:20:26 EDT
Ignore my previous comment, I misunderstood the problem.

Resolution of non local names only searches in existing units, as opposed to 
working copies (shared or not). What you are requesting instead is a mechanism 
for providing a set of working copies to override these existing units.

This isn't currently planned.
Comment 3 Adam Kiezun CLA 2003-04-16 08:27:56 EDT
this is not good since it stops me from implementing important functionality
i will try to come with a workaround and if i am not able to i will ask for 
reconsideration
Comment 4 Jerome Lanneluc CLA 2003-06-16 09:25:11 EDT
Reopening to consider with the work on closing the gap between cus and working 
copies.
Comment 5 Jerome Lanneluc CLA 2003-06-27 06:02:22 EDT
Added APIs to take a working copy owner (that now defines how working copies 
are shared) into argument:
- AST.parseCompilationUnit(char[] source, String unitName, IJavaProject 
project, WorkingCopyOwner owner)
- AST.parseCompilationUnit(IClassFile classFile, boolean resolveBindings, 
WorkingCopyOwner owner)
- AST.parseCompilationUnit(ICompilationUnit unit, boolean resolveBindings, 
WorkingCopyOwner owner)

These APIs do the resolution considering the working copies of the given owner 
first.
Comment 6 David Audel CLA 2003-07-16 04:51:11 EDT
Verified.