So this is a little tricky. What you need to do is call: project.eResource().unload(); What this does is walk through all the children of project( and project) and turns them all into proxies so that when they are accessed again they are reloaded. The problem is that the reloaded objects are new objects so if any objects retain references to the old projects, maps, layers, etc... they will be referencing the wrong objects. What I suggest is that you close all editors to maps within that project before unloading the project, then unload the project... I suppose there could be a problem though since the maps try to save the project when being closed, seems like that would overwrite the changes. Thinking.... The easy way for me is for you to change you program so that you have a central repository and get copies from the repository and run uDig on those copies instead of directly against the repository projects. Especially since you are bound to have read/write conflicts if you are directly hacking the repository. Might be a good plan for you anyhow. So how it might work is you can close your maps, unload the project, get a new copy and then re-open you maps and project. Otherwise I think I would have to put in make a change so that you can turn off autosaving is a preference that can be turned off. But if I do that then when would things be saved? I guess you would have to implement that yourself and manage all the read/write transactions to the repository anyhow. So maybe the suggestion is the least amount of work for both of us... I'm open to suggestions. Jesse On 11-May-06, at 6:16 AM, M.S.Bachler wrote:
|
_______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
