Community
Participate
Working Groups
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.
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.
*** Bug 7349 has been marked as a duplicate of this bug. ***
How are you adding getter/setter ? Are you simply editing the working copy or using something different ?
I select a field in the outliner and use the context menu item 'Create Getter/Setter'.
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 ?
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.
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.