OtpErlangObject res2 = null;
String moduleName = null;
final IErlImport ei = module.findImport(erlangFunction);
boolean _tripleNotEquals_1 = (ei != null);
if (_tripleNotEquals_1) {
IErlangEngine _instance = ErlangEngine.getInstance();
final IErlModel model = _instance.getModel();
String _importModule = ei.getImportModule();
moduleName = _importModule;
IErlangEngine _instance_1 = ErlangEngine.getInstance();
OpenService _service = _instance_1.<OpenService>getService(OpenService.class);
IResource _resource = module.getResource();
OtpErlangList _pathVars = model.getPathVars(_resource);
ErlangProjectProperties _properties = erlProject.getProperties();
String _externalModules = _properties.getExternalModules();
OtpErlangObject _sourceFromModule = _service.getSourceFromModule(_pathVars, moduleName, _externalModules);
res2 = _sourceFromModule;
}
if ((res2 instanceof OtpErlangString)) {
boolean _tripleNotEquals_2 = (moduleName != null);
if (_tripleNotEquals_2) {
final String modulePath = ((OtpErlangString)res2).stringValue();
IErlangEngine _instance_2 = ErlangEngine.getInstance();
final IErlElementLocator model_1 = _instance_2.getModel();
return this.modelFindService.findFunction(model_1, erlProject, module, moduleName, modulePath, erlangFunction, scope);
}
}
IErlangEngine _instance_3 = ErlangEngine.getInstance();
ModelFindService _modelFindService = _instance_3.getModelFindService();
final Collection<IErlModule> allIncludedFiles = _modelFindService.findAllIncludedFiles(module);
for (final IErlModule includedModule : allIncludedFiles) {
{
final IErlFunction function = includedModule.findFunction(erlangFunction);
boolean _tripleNotEquals_3 = (function != null);