Bug 95889 - Ignored Resources not persistent
Summary: Ignored Resources not persistent
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.1   Edit
Hardware: Macintosh All
: P3 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Platform Team Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-05-19 00:07 EDT by Christian Pekeler CLA
Modified: 2007-05-01 10:04 EDT (History)
2 users (show)

See Also:


Attachments
Fix (1.17 KB, patch)
2007-03-07 10:54 EST, Krzysztof Daniel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Pekeler CLA 2005-05-19 00:07:57 EDT
If I enter new patterns in Preferences/Team/Ignored Resources, it works just fine until I restart Eclipse at 
which point I have to enter my patterns again.

Note that I'm using the Subclipse plugin.
Comment 1 Michael Valenta CLA 2005-05-19 09:49:53 EDT
Odd. It works for me on Windows and there's nothing platform specific about 
the preference. It is stored in the instance (i.e. workspace) preferences. Are 
other prefeences you change persisted accross restarts?
Comment 2 Christian Pekeler CLA 2005-05-20 00:07:52 EDT
I just tried again, this time on a different machine.

- launch eclipse
- open preferences and add '*.pbxuser' to Team/Ignored Resources
- click Apply, click OK
- reopen preferences to confirm '*.pbxuser' is still there (it is)
- quit eclipse and restart eclipse
- open preferences to confirm '*.pbxuser' is still there (it is NOT)
- add '*.pbxuser' to Team/Ignored Resources
- and change another preference setting (Java/Use Reduced Search Menu)
- click Apply, click OK
- reopen preferences to confirm '*.pbxuser' is still there (it is)
- quit eclipse and restart eclipse
- open preferences to confirm '*.pbxuser' is still there (NOW it is)

From now on I can change Team/Ignored Resources however I want - it's always persistent. It almost 
seems like the first time I had to change something else, too, to trigger something to work. I'll try this 
again on my work machine tomorrow.

Comment 3 Michael Valenta CLA 2005-05-20 13:48:44 EDT
I tried your steps on both the Mac and Windows and I didn't see any problem 
Could you try it out on a basic Eclipse with no extra plugins and see if the 
problem still occurs?
Comment 4 Michael Valenta CLA 2005-05-24 09:25:11 EDT
Awaiting response...
Comment 5 Christian Pekeler CLA 2005-05-24 20:28:16 EDT
I've tried several scenarios on two different machines and can't reproduce the problem any longer. Sorry.
Comment 6 Karl-Heinz Wirth CLA 2005-10-08 09:48:01 EDT
I'm having this bug now on my installation, in my case it seems to occur in
context of CDT. I'm running Eclipse on Windows, just the minimum plain binaries,
no SDK. 

Everything works fine, if nothing but basic Eclipse 3.1.1 is installed. After
installing the CDT 3.0.0 I get the trouble described above, e.g. if I want to
mark/unmark the *.a and *.exe patterns, these settings are lost after restarting
eclipse.

After i disable CDT in the "Help/Manage Configuration" dialog, again everything
is fine  - until I restore the original full configuration and press the OK or
APPLY button in the preferences dialog.

So, my workaround is:
 - disable CDT plugin
 - set/unset patterns of ignored resources
 - restore configuration
Settings seem to keep alive unless preferences are changed
Comment 7 Michael Valenta CLA 2005-10-08 13:40:25 EDT
Interesting. Sounds like there is a conflict between a user defined setting 
that is then replaced by a plugin setting.
Comment 8 Krzysztof Daniel CLA 2007-03-07 10:54:24 EST
Created attachment 60375 [details]
Fix

The problem explanation:
1. globalIgnores are initialized (Team plugin preferences).
2. pluginIgnores are initialized (extenstion point ignores).
any ignore from here is propagated to global only if it is not already there, so it is possible that the same pattern is globally enabled and disabled by plugin.
3. User disables unconsistent property.
4. Global ignores are wiped and replaced by those from UI preferences page.
5. Saved are only those, who are not equal with pluginIgnores. Changes are not saved.

Solution:
keep plugin- and globalIgnores consistent.

Please note, that this patch *does not* fix problem reported by bug report and comment #2. I believe this is different bug.
Comment 9 Michael Valenta CLA 2007-03-12 12:14:02 EDT
Patch released to HEAD. Thanks.