Community
Participate
Working Groups
I'm not sure why this problem hasn't surfaced before. I've been hacking at refactoring the preference code to make it easier for clients to create their own preferences and wrote some new test cases and to my surprise, this one failed. - get instance scope - create node /instance/foo - set a=b key/value pair - flush /instance/foo - confirm file is on disk - remove node /instance/foo - flush parent At this point we would expect the file to be removed from disk but it is still there. We don't see this problem in the project preferences because we have change events which react to the deletion and they remove the files from the project using the Workspace APIs. In this case we call flush on /instance which iterates over the children and since the child has been removed, it isn't returned in the list and we do nothing. If we call flush on the node itself, we would get an error because it has been removed. Seems like we need to keep track of children which have been removed and when flush is called, go through and delete them.
Current behaviour appears to delete the file if all the contents are empty. This is incorrect and we should have an empty file instead because deleting the file will produce incorrect results from the initialization of parent.childrenNames().
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.
This bug was marked as stalebug a while ago. Marking as worksforme. If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.