|Would like to update a file in workspace during IResourceChangeListener notifications [message #555614]
||Fri, 27 August 2010 11:15
| Jerome Correnoz
Registered: July 2009
In my application, some projects of the workspace do have some cross references. Eg. Project A do refers toProject B and vice-versa.
To do so, I store some preferences in the projects of the workspace using Preferences on ProjectContext. Through this way I can set a reference value to the cross-referenced project in a preference file located under <projectA>.setting folder.
My problem is the following: When a project is renamed in the workspace, I would like to update the cross-references in the preference file. To do that, I use the IResourceChangeListener. But when the notification occurs, the workspace is locked and I can't update the preferences.
Could some please tell me how to do it ? Is there a any way to update a file in the workspace during a resourceChanged notification ?
Note that in the past, I stored my preferences using setPersistentProperty on the project. Preferences are then located in .metadata folder hierarchy. But I had a limitation with it: When exporting a project, the settings/preferences were lost. So I decided to store the preferences in .settings folder.
Any idea to better do it ?
Powered by FUDForum
. Page generated in 0.01808 seconds