Skip to content
Snippets Groups Projects
Commit 4667afc2 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

added error logging for exceptions during workspace scanning

parent 2d951f36
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment