+ {
+ IntermediateFileType type = none;
+ ProjectConfig config;
+ if(ext[0])
+ {
+ char ext2[MAX_EXTENSION];
+ char stripExt[MAX_LOCATION];
+ strcpy(stripExt, moduleName);
+ StripExtension(stripExt);
+ GetExtension(stripExt, ext2);
+ if(ext2[0] && !strcmp(ext2, "main"))
+ dotMain = true;
+ if(!strcmp(ext, "ec"))
+ type = ec;
+ else if(!strcmp(ext, "c"))
+ type = c;
+ else if(!strcmp(ext, "sym"))
+ type = sym;
+ else if(!strcmp(ext, "imp"))
+ type = imp;
+ else if(!strcmp(ext, "bowl"))
+ type = bowl;
+ else if(!strcmp(ext, "o"))
+ type = o;
+
+ if(type)
+ {
+ for(prj : ide.workspace.projects; prj.lastBuildConfigName)
+ {
+ if((config = prj.GetConfig(prj.lastBuildConfigName)))
+ node = prj.FindNodeByObjectFileName(moduleName, type, dotMain, config);
+ if(node)
+ break;
+ }
+ }
+ }
+ if(node)
+ {
+ char name[MAX_FILENAME];
+ Project project = node.project;
+ CompilerConfig compiler = ideSettings.GetCompilerConfig(project.lastBuildCompilerName);
+ if(compiler)
+ {
+ int bitDepth = ide.workspace.bitDepth;
+ DirExpression objDir = project.GetObjDir(compiler, config, bitDepth);
+ strcpy(filePath, project.topNode.path);
+ PathCatSlash(filePath, objDir.dir);
+ node.GetObjectFileName(name, project.lastBuildNamesInfo, type, dotMain);
+ PathCatSlash(filePath, name);
+ delete objDir;
+ }
+ delete compiler;
+ }
+ }
+ if(!node)
+ filePath[0] = '\0';