Bug 4986 - List of methods out of synch when changes unsaved in java class
Summary: List of methods out of synch when changes unsaved in java class
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Kai-Uwe Maetzel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-15 11:51 EDT by Veronika Irvine CLA
Modified: 2001-11-06 09:12 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Veronika Irvine CLA 2001-10-15 11:51:14 EDT
Eclipse 204
Windows 2000

1) Open the Java Type Hierarchy Perspective
2) Open a java editor on the following java file:

public class Test {

private int x;

public int getX() {
	return 1;
}
public int getY() {
	return 1;
}
public int getZ() {
	return 1;
}
}

3) Click on "Show source of selected Element Only"  item in toolbar
4) Select the method getX in the Hiearchy view and change it to look like this:
public int getX() {
	//1
	//2
	//3
	return 1;
}
5) Select the method getZ - one that is below the method that you have edited 
in the file.  Notice that method getY is shown in the editor.

If you perform a save, the method list gets resynched with the file positions.
Comment 1 Martin Aeschlimann CLA 2001-10-15 12:27:00 EDT
I couldn't reproduce this.
Its the reconciler that does the range updating (not an save).
Sometimes when the machine is overloaded threads with lower prio 
dont get cycles. Never saw this for the reconciler, but for the hover.
Comment 2 Veronika Irvine CLA 2001-10-15 12:58:17 EDT
I can reproduce it every time - with or without Lotus Notes running - which 
means to me that it is not a thread starvation issue.  Please follow the steps 
exactly.

In fact I have seen this even when in the "Show Complete Source" mode and I 
click on the Type Hierarchy to get to another method - I sometimes get the 
method in the editor above the one I am selecting in the tree (depending how 
much code I have added).
Comment 3 Martin Aeschlimann CLA 2001-10-16 05:20:51 EDT
Ok, I can reproduce it. Thanks.

JavaEditor.setSelection should try to find the element in the working copy.
Comment 4 Kai-Uwe Maetzel CLA 2001-11-06 09:12:02 EST
Build > 207.