Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 109780 - (PatchAttached)[CVS Watch/Edit] Inconsistent function of the "Configure projects to use Watch/Edit on checkout" after implementing of the "Enable temporary watches on edit" feature.
Summary: (PatchAttached)[CVS Watch/Edit] Inconsistent function of the "Configure proje...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.2 M2   Edit
Assignee: Platform Team Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 35997
Blocks:
  Show dependency tree
 
Reported: 2005-09-16 14:11 EDT by Vadim Doreziouk CLA
Modified: 2005-09-21 14:21 EDT (History)
0 users

See Also:


Attachments
cvs core project patch (I20050912 sources) (818 bytes, patch)
2005-09-16 14:13 EDT, Vadim Doreziouk CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim Doreziouk CLA 2005-09-16 14:11:34 EDT
After as the new feature “Enable temporary watches on edit” was implemented 
(see e.g. I20050826 release)  setting  the “Configure projects to use 
Watch/Edit on checkout” to ON is not more enough to force the projects being 
checked out as read-only with Watch/Edit option as in early versions and as 
one might think from the name of the checkbox.

To reproduce: 
1. Set “Configure projects to use Watch/Edit on checkout” in global 
preferences to ON. (DOESN’T set “Enable temporary watches on edit”! Leave all 
others as default too.)
2. Check out some project.
3. Consult projects CVS setting. The “Enable watch/edit for this project” is 
Unset.

If one checks the “Enable temporary watches on edit” global option as well, 
then the behavior turns back to its right original way.

It seems to occur by setting preferences:

public class WatchEditPreferencePage extends CVSFieldEditorPreferencePage {
…
protected void pushPreferences() {
 store = getCVSPreferenceStore();
 Preferences target = CVSProviderPlugin.getPlugin().getPluginPreferences();
 target.setValue(	CVSProviderPlugin.READ_ONLY,
		store.getBoolean(ICVSUIConstants.PREF_CHECKOUT_READ_ONLY));
 target.setValue(	CVSProviderPlugin.ENABLE_WATCH_ON_EDIT,
		store.getBoolean(ICVSUIConstants.PREF_ENABLE_WATCH_ON_EDIT));
	}

where preference names have the same ID’s/values:

public class CVSProviderPlugin extends Plugin {
	// preference names
	public static final String READ_ONLY = "cvs.read.only";
	public static final String ENABLE_WATCH_ON_EDIT = "cvs.read.only"; 
	..
	..}

As result setting the last one overrides the setting for the first one.

I am submitting a simple patch to the cvs core project that fixes this problem 
(as a draft - it wasn’t checked for possible side-effects jet):
<<
 public static final String ENABLE_WATCH_ON_EDIT = "cvs.watch.on.edit"; 
>>
Comment 1 Vadim Doreziouk CLA 2005-09-16 14:13:39 EDT
Created attachment 27223 [details]
cvs core project patch (I20050912 sources) 

cvs core project patch as annonced over
Comment 2 Michael Valenta CLA 2005-09-16 14:23:47 EDT
Thanks for the fix. I've released it so it will be available in 3.2 M2
Comment 3 Bogdan Gheorghe CLA 2005-09-21 14:21:00 EDT
Verified in I20050920-0010