Hi,
I (programmatically) added some models to a wrong ResourceSet, which I want now to remove. As I couldn't find out where this information are stored or how to remove them via the Eclipse GUI, I tried to solve that programmatically by this code snippet:
ResourceSet resourceSet = pc.eResource().getResourceSet();
for (Resource res : resourceSet.getResources()) {
if(!(resff instanceof XMIResourceImpl)){
try {
resff.delete(((XMLResource) resff).getDefaultLoadOptions());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
However, it seems that something happened, but now I always the error "Problems encountered in file..... - Resource .. does not exist" when some action on the ResourceSet (e.g. open a (not deleted) model from the ResourceSet) occurs.

I'm wondering how I completely remove the resources from the ResourceSet?
[Updated on: Wed, 01 March 2017 12:04] by Moderator