Bug 35671 - 'Synchronize CVS projects' does not always synchronized all projects
Summary: 'Synchronize CVS projects' does not always synchronized all projects
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux-GTK
: P2 normal (vote)
Target Milestone: 2.1.1   Edit
Assignee: Dean Roberts CLA
QA Contact:
URL:
Whiteboard:
Keywords: readme
Depends on:
Blocks:
 
Reported: 2003-03-25 16:40 EST by Luc Bourlier CLA
Modified: 2003-06-02 11:41 EDT (History)
1 user (show)

See Also:


Attachments
Reposition combo box selection listener (1.28 KB, patch)
2003-04-28 13:56 EDT, Dean Roberts CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luc Bourlier CLA 2003-03-25 16:40:45 EST
20030324
Linux-GTK

In some cases, 'Synchronize CVS projects' synchronizes only the projects of a
working set instead of all projects.

1. In a workspace with at least 2 CVS projects, change a file in one project.
2. Click on the 'Synchronize CVS projects' button.
3. On the dialog, select 'Include working set resources shared with CVS:', add
click 'Other...'.
4. Create a new working set which contains only the project with no changes.
Select this working set, click 'OK'.
5. Click 'OK'.
The dialog 'Workspace resources are the same as remote' is displayed.
6. Click on the 'Synchronize CVS projects' button.
7. Select 'Include all projects shared with CVS'.
8. Click 'OK'.
The changes are displayed.
9. Click on the 'Synchronize CVS projects' button.
10. Click 'OK'.
The dialog 'Workspace resources are the same as remote' is displayed.

It should display the change, as in the last synchronize request, 'Include all
projects shared with CVS' was selected. It look's like it synchronizes only the
projects of the working set.
Comment 1 Michael Valenta CLA 2003-03-25 16:50:01 EST
This works for me on Windows. Perhaps it is particulr to GTK.
Comment 2 Luc Bourlier CLA 2003-03-25 17:38:12 EST
I confirm that I cannot reproduce the problem on Windows.

I think is the same (type of) problem as in bug 29887 and bug 32078.

On GTK, when the drop-down list is filled, a 'selection changed' event is
generated. I guess that when the event occurs, you set some internal parameters
to do the synchronize only on the projects of the 'selected' working directory.

I see two fixes. You can move the addSelectionListener() call after the code
which populates the list. Or you change the selectionChanged() method, so you
take care of the events only if 'Include working set resources shared with CVS:'
is selected.
Comment 3 Michael Valenta CLA 2003-03-26 09:13:45 EST
I'm sure you are correct about the selection listener. The fix is easy but 
unfortunately, it's too late to make it into 2.1:-(
Comment 4 Jean-Michel Lemieux CLA 2003-03-26 09:51:56 EST
Based on the comments form Veronica in bug 29887, is it true that will have to
ensure that *every* seletion listener in Eclipse be changed to be GTK friendly
(e.g. added after widget is populated)?
Comment 5 Steve Northover CLA 2003-03-26 11:18:28 EST
Adding VI.  VI and SN need to revisit the "GTK combo box event different 
behavior" issue again, even though we think it's the correct platform 
behavior, because people keep hitting the difference.  If there is something 
simple and correct that SWT can do to work around this, we should do it.
Comment 6 Veronika Irvine CLA 2003-03-26 12:38:25 EST
Actually, Jean-Michel, in most cases the application wants to know about a 
selection and should add the selction listener before adding items to the 
combo list.  CVS seems to be unique here in that despite that the fact that 
the combo box shows a selected item, you wish to ignore it.

To correctly support GTK, I think we would need to ensure that the selection 
listener was added before adding the items in all cases in eclipse except 
special cases like yours.
Comment 7 Michael Valenta CLA 2003-04-14 15:59:27 EDT
This should be fixed for 2.1.1
Comment 8 Dean Roberts CLA 2003-04-28 13:56:43 EDT
Created attachment 4721 [details]
Reposition combo box selection listener

A patch to move the combo box selection listener for the mruList after the
point at which the mruList is initialized.

Tested bothe the scenerio in the bug and working set rename.  Tested on RedHat
GTK.
Comment 9 Dean Roberts CLA 2003-04-28 14:23:01 EDT
Released to HEAD will be released to 2.1.1 tomorrow
Comment 10 Dean Roberts CLA 2003-05-13 13:43:55 EDT
Verified in 2.1.1 Maintencance build and 3.0 HEAD build
Comment 11 Jean-Michel Lemieux CLA 2003-06-02 11:41:31 EDT
Verified.