diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EclipseResourceStorageProvider.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EclipseResourceStorageProvider.java index 7623c604be4d46e72305f2b8f10bb61d533e7a21..714adc85dab16953c5fe1708a763f7bb2df182d2 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EclipseResourceStorageProvider.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EclipseResourceStorageProvider.java @@ -51,7 +51,7 @@ import org.osgi.framework.Bundle; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 9FBC1CF2E10E3E2AB1E12642A139F7C3 + * @ConQAT.Rating YELLOW Hash: B8363ADD63E4E6D34D97577B26670CEB */ public class EclipseResourceStorageProvider implements IResourceChangeListener, IResourceDeltaVisitor, IStorageProvider { @@ -92,18 +92,32 @@ public class EclipseResourceStorageProvider implements IResourceChangeListener, for (IResource res : project.members()) { if (res instanceof IFile) { IFile file = (IFile) res; - for (IEclipseResourceStorageLocationProvider provider : storageProviderList) { - if (provider.isStorageLocation(file)) { - loadContext(file); - break; - } - } + checkLocationProviderAndLoadContext(file); } } } catch (CoreException e) { - // ignore - } catch (IOException ioex) { - // ignore + LoggingUtils.error(ToolingKernelActivator.getDefault(), + "Core Exception while scanning Eclipse workspace", e); + } + } + } + + /** + * Searches all location providers and loads the model context if some + * location provider validates the given file as model storage file. + */ + private void checkLocationProviderAndLoadContext(IFile file) { + for (IEclipseResourceStorageLocationProvider provider : storageProviderList) { + if (provider.isStorageLocation(file)) { + try { + loadContext(file); + } catch (IOException ioex) { + LoggingUtils.error( + ToolingKernelActivator.getDefault(), + "IO Exception while loading model file: " + + file.getName(), ioex); + } + break; } } }