Community
Participate
Working Groups
In core.resources I'm trying to replace the simple (but deprecated): ResourcesPlugin.getPlugin().getPluginPreferences().addPropertyChangeListener(this); with: InstanceScope.INSTANCE.getNode(ResourcesPlugin.PI_RESOURCES).addPreferenceChangeListener(this); So that the class is notified when the preference is changed at workspace instance scope. Making this change in core.resources and it works for a bit, but when running the full automated testsuite the tests fail as the listeners is lost. Adding a Node change listener may fix this, but would seem to be overkill as I'd then need to implement another 2 methods. Also doing so requires using more magic strings and casting osgi.Preferences to IEclipsePreferences which seems wrong... Bug 80314 suggests this should work. Am I doing something wrong?
Dj, could you take a look at the issue?
I think I need to dig a bit deeper into where it's getting lost... I know it's there after plugin startup, but a few hundred tests in it's not -- I'll have to think of a creative mechanism to debug...
I think this is similar/dup of bug 340983. I'm not sure what the solution is though.
(In reply to comment #3) > I think this is similar/dup of bug 340983. > I'm not sure what the solution is though. Yep bug 340983 (which has your historical perspective) is the core.resources bug for me adding a use of deprecated Plugin preferences API instead of the eclipse preferences. It looks like there are a whole bunch of CDT preference listeners (amongst others) that don't have node change listeners and expect to persist :(
I meant to bump this bug to major see: Bug 340983 comment 2 , Bug 340983 comment 3
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.