public static void deleteModule(final IErlModule module) throws CoreException { final String scannerName = module.getScannerName(); final IFile file = (IFile) module.getResource(); if (file != null) { file.delete(true, null); } final IPath stateDir = new Path(ErlangEngine.getInstance().getStateDir()); // FIXME this code should not know about caches! final String cacheExts[] = {".noparse", ".refs", ".scan"}; for (final String ext : cacheExts) { final IPath p = stateDir.append(scannerName + ext); final File f = new File(p.toOSString()); f.delete(); } module.dispose(); modulesAndIncludes.remove(module); }