ide: fix lack of support of variables in node path for find in files.
[sdk] / ide / src / ide.ec
index 766f5a6..93bbe59 100644 (file)
@@ -2826,7 +2826,7 @@ class IDEWorkSpace : Window
                {
                   if((n = p.topNode.Find(filePath, false)))
                   {
-                     n.GetFullFilePath(selectedPath, true);
+                     n.GetFullFilePath(selectedPath, true, true);
                      if((fileAttribs = FileExists(selectedPath)).isFile)
                      {
                         if(node) *node = n;
@@ -2942,6 +2942,18 @@ class IDEWorkSpace : Window
          strcpy(filePath, path);
       }
 
+      if(filePath[0] && strstr(filePath, "$("))
+      {
+         DirExpression pathExp { };
+         CompilerConfig compiler = GetCompilerConfig();
+         ProjectConfig config = prj.config;
+         int bitDepth = GetBitDepth();
+         pathExp.Evaluate(filePath, prj, compiler, config, bitDepth);
+         PathCatSlash(filePath, pathExp.dir);
+         delete compiler;
+         delete pathExp;
+      }
+
       if((fileAttribs = GoToCodeSelectFile(filePath, dir, prj, null, completePath, objectFileExt)))
          CodeLocationGoTo(completePath, fileAttribs, line, col);
    }