public void testIndexWithEmptyContent() throws Exception { File tmpDir = null; try { String src = "\n"; // Generate some files to index! tmpDir = new File( FileUtil.getTempDirectory().toOSString(), "testIndexWithEmptyContent" + System.currentTimeMillis()); tmpDir.mkdirs(); File coffeeFile = new File(tmpDir, "index_me.coffee"); IOUtil.write(new FileOutputStream(coffeeFile), src); IFileStore fileStore = EFS.getStore(coffeeFile.toURI()); BuildContext context = new FileStoreBuildContext(fileStore); IProgressMonitor monitor = new NullProgressMonitor(); indexer.index(context, null, monitor); } finally { // Clean up the generated files! FileUtil.deleteRecursively(tmpDir); } }