What could be happening is that your plugin is being called after the
catalog has been saved. This is why we need to make these changes at
a framework level. See other email
Jesse.
On 1-Apr-06, at 6:13 AM, Jonas Johansson wrote:
Hi,
Sorry for asking so many questions...
I am trying to remove my IService (which is a MemoryServiceImpl) in
the
stop() method of my plug-in using the method
CatalogPlugin.getDefault().getLocalCatalog().remove(iService);
But the MemoryServiceImpl still shows up in the catalog in the next
session. What am I doing wrong here? More detail below.
I got the IService in the first place by calling:
IGeoResource geoResource =
CatalogPlugin.getDefault().getLocalCatalog().createTemporaryResource
(bufferType);
iService = geoResource.parent(new NullProgressMonitor());
In the stop() method I do:
CatalogPlugin.getDefault().getLocalCatalog().remove(iService);
While debugging, it appears that the Catalog is at least trying to
remove the IService but I don't understand exactly what happens in the
internals of Catalog. No exception is thrown as far as I can see, so I
don't see what is going wrong here. So why does it still show up in
the
next session if it was removed?
Jonas
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel