Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 51290

Summary: Java Browsing selection should be updated when CU is reconciled
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: kai-uwe_maetzel
Version: 3.0   
Target Milestone: 3.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Dani Megert CLA 2004-02-06 10:24:07 EST
Builds > 20040206

Up to now the selection in the browsing views was always in sync with the caret
location in the editor because we reconciled the CU in the UI thread using:

    synchronized (unit) {
        unit.reconcile(false, null);
    }

This caused performance blockers in the UI for large files. We now only set the
selection if the CU is consistent. As a result, if the name of a member is
changed in the editor then it will no longer be selected in the Members view.

This can be fixed in three ways:
1) the editor offers clients a reconciled listener
2) the browsing views setup a thread which reconciles the CU, but this can
result in several reconcile calls since the selection change and the background
reconciler aren't in sync
3) the browsing views setup a thread that polls whether the CU is reconciled

I prefer 1) since the time when the update is done is then in sync with the
outline page synchronization.
Comment 1 Dirk Baeumer CLA 2004-04-27 08:49:09 EDT
Daniel is there anything planned in text to resolve this ?
Comment 2 Dani Megert CLA 2004-04-27 09:01:35 EDT
Infrastructure is there. We could fix this (time permitting during bug fixing
milestone).
Comment 3 Dirk Baeumer CLA 2004-05-10 04:40:05 EDT
Daniel I will assign this to you to decide if you can do something for 3.0
Comment 4 Dani Megert CLA 2004-05-25 09:06:49 EDT
low prio
Comment 5 Dani Megert CLA 2004-06-04 10:29:45 EDT
not for 3.0
Comment 6 Dani Megert CLA 2006-09-27 10:25:29 EDT
    synchronized (unit) {
        unit.reconcile(false, null);
    }

is no longer needed at all and has been removed from all JDT code.