ErlangEngine.getInstance().getModelUtilService()
.getImportsAsList(moduleE),
project.getProperties().getExternalModules(),
model.getPathVars(project.getWorkspaceProject()));
assertTrue(res instanceof ExternalCallOpenResult);
final ExternalCallOpenResult eres = (ExternalCallOpenResult) res;
final IErlFunction function = ErlangEngine
.getInstance()
.getModelFindService()
.findFunction(model, project, moduleE, eres.getMod(), eres.getPath(),
new ErlangFunction(eres.getFun(), eres.getArity()),
IErlElementLocator.Scope.PROJECT_ONLY);
assertNotNull(function);
final IErlElement module = model.findModuleFromProject(project,
function.getModuleName(), eres.getPath(),
IErlElementLocator.Scope.PROJECT_ONLY);
// then
// the function should be returned and the module, in External Files
assertNotNull(module);
assertEquals(function.getParent(), module);