Bug 8016 - getter/setter outliner reconciling broken
Summary: getter/setter outliner reconciling broken
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 7349 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-01-22 12:00 EST by Claude Knaus CLA
Modified: 2002-01-24 06:44 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Claude Knaus CLA 2002-01-22 12:00:30 EST
20020115-I smoke for 20020122-I on w2k:

1) select a field in the outliner
2) add a getter/setter using the context menu
3) observe that the outliner doesn't show the new methods.
Comment 1 Claude Knaus CLA 2002-01-23 05:45:02 EST
The Java element delta for getter/setter are not generated. It seems that the 
working copy is comparing oldInfo and newInfo where the oldInfo is already the 
newInfo, thus no delta is generated.

moving to jdt.core.
Comment 2 Dani Megert CLA 2002-01-23 08:45:38 EST
*** Bug 7349 has been marked as a duplicate of this bug. ***
Comment 3 Philipe Mulet CLA 2002-01-23 11:59:19 EST
How are you adding getter/setter ? Are you simply editing the working copy or 
using something different ?
Comment 4 Claude Knaus CLA 2002-01-23 12:23:53 EST
I select a field in the outliner and use the context menu item 'Create 
Getter/Setter'.
Comment 5 Philipe Mulet CLA 2002-01-24 04:56:09 EST
What evidence do you have this is jdt.core ? If you edit the working copy, then 
the reconciler picks the change without any problem.

What APIs are you calling ? 
Comment 6 Claude Knaus CLA 2002-01-24 06:01:54 EST
I'm not the owner of create getter/setter (cc'ing Martin). It's using 
IType.createMethod() to create the method stubs.

I have set a break point in JavaOutlinePage.ElementChangeListener to see if 
element changes are fired. The element changes are sent for adding members 
manually, but not for 'create getter/setter'.

I stepped through WorkingCopy.reconcile(). When the delta builder is 
constructed, the java elements for the method stubs are considered to be old.
The result is that there is no change when adding these method stubs and 
therefore no delta is generated.
Comment 7 Jerome Lanneluc CLA 2002-01-24 06:21:44 EST
The create method operation is making the working consistent, thus if the 
reconciler runs after that, it doesn't see any changes.

Fixed by forcing a reconcile when the WorkingCopy.save(...) is called (by the 
operation). This makes the working copy consistent and fires the fine-grain 
deltas.