diff --git a/instasearch/src/it/unibz/instasearch/indexing/WorkspaceIndexerJDT.java b/instasearch/src/it/unibz/instasearch/indexing/WorkspaceIndexerJDT.java index 7c38710..55d3afa 100755 --- a/instasearch/src/it/unibz/instasearch/indexing/WorkspaceIndexerJDT.java +++ b/instasearch/src/it/unibz/instasearch/indexing/WorkspaceIndexerJDT.java @@ -190,10 +190,13 @@ private void indexClassFiles(IndexWriter indexWriter, IPackageFragmentRoot jar, for(IClassFile classFile: pkg.getClassFiles()) { if( classFile.getElementName().contains("$") ) continue; // not type root - ClassFileSourceStorage classFileSourceStorage = new ClassFileSourceStorage(classFile); - - if( classFileSourceStorage.hasSource() ) - indexStorageWithRetry(indexWriter, classFileSourceStorage, projectPath, IResource.NULL_STAMP, jarName); + try { + ClassFileSourceStorage classFileSourceStorage = new ClassFileSourceStorage(classFile); + + if (classFileSourceStorage.hasSource()) indexStorageWithRetry(indexWriter, classFileSourceStorage, projectPath, IResource.NULL_STAMP, jarName); + } catch (Exception e) { + //Issue #69. Avoid Ex where Eclipse has trouble loading a source file. + } if( monitor.isCanceled() ) return; }