List<String> (PsiFile file) { if (!(PythonSdkFlavor.getFlavor(mySdk) instanceof IronPythonSdkFlavor)) { return Collections.emptyList(); } final List<String> result = new ArrayList<>(); file.accept(new PyRecursiveElementVisitor() { @Override public void visitPyCallExpression(@NotNull PyCallExpression node) { super.visitPyCallExpression(node); // TODO: What if user loads it not by literal? We need to ask user for list of DLLs if (node.isCalleeText("AddReference", "AddReferenceByPartialName", "AddReferenceByName")) { final PyExpression[] args = node.getArguments(); if (args.length == 1 && args[0] instanceof PyStringLiteralExpression) { result.add(((PyStringLiteralExpression)args[0]).getStringValue()); } } } }); return result; }