if (coord == null)
return null;
VirtualFile file = psiFile.getVirtualFile();
if (file == null)
return null;
Module module = getDeclModule(psiFile);
CompilerLocation compiler = CompilerLocation.get(module);
if (compiler == null)
return null;
String sourcePath = GHCUtil.rootsAsString(module, false);
List<String> args = compiler.getCompileOptionsList(
"-m", "GetDeclPos",
"-s", sourcePath,
"--line-number", String.valueOf(coord.line), "--column-number", String.valueOf(coord.column),
"-f", file.getPath()
);
final List<String> srcFiles = new ArrayList<String>();
ProjectFileIndex fileIndex = ProjectRootManager.getInstance(module.getProject()).getFileIndex();
fileIndex.iterateContent(new ContentIterator() {
public boolean processFile(VirtualFile virtualFile) {
if (HaskellCompiler.isCompilableFile(virtualFile)) {
srcFiles.add(virtualFile.getPath());
}