{
char path[MAX_LOCATION];
char relative[MAX_LOCATION];
- node.GetFullFilePath(path, true);
+ node.GetFullFilePath(path, true, true);
bp.absoluteFilePath = path;
MakePathRelative(path, prj.topNode.path, relative);
bp.relativeFilePath = relative;
DataRow r = null;
ProjectNode node = prj.topNode;
char filePath[MAX_LOCATION];
- prj.topNode.GetFullFilePath(filePath, true);
+ prj.topNode.GetFullFilePath(filePath, true, true);
lastSelectionProject = CopyString(filePath);
findWherePrjNode.Clear();
ListProjectNodeFolders(node, null);
if(node)
{
char filePath[MAX_LOCATION];
- node.GetFullFilePath(filePath, true);
+ node.GetFullFilePath(filePath, true, true);
lastSelectionProjectNode = CopyString(filePath);
}
}
Project p = (Project)(intptr)row.tag;
if(p)
{
- p.topNode.GetFullFilePath(filePath, true);
+ p.topNode.GetFullFilePath(filePath, true, true);
if(!fstrcmp(filePath, lastSelectionProject))
break;
}
for(frame = 1; frame && !abort && frame < stackSize-1;)
{
+ bool relative = true; // would be option
+ char fileRelative[MAX_LOCATION];
+ char filePath[MAX_LOCATION];
+ filePath[0] = '\0';
+ fileRelative[0] = '\0';
+ if(stack[frame].type == file || stack[frame].type == folder || stack[frame].type == folderOpen)
+ {
+ stack[frame].GetFullFilePath(filePath, true, true);
+ //MakePathRelative(filePath, prj.topNode.path, fileRelative);
+ MakePathRelative(filePath, prj.topNode.path, fileRelative);
+ }
switch(stack[frame].type)
{
case project:
break;
case file:
{
- bool relative = true;
- char fileRelative[MAX_LOCATION];
- char filePath[MAX_LOCATION];
- filePath[0] = '\0';
- PathCat(filePath, prj.topNode.path);
- PathCat(filePath, stack[frame].path);
- PathCat(filePath, stack[frame].name);
- fileRelative[0] = '\0';
- PathCat(fileRelative, stack[frame].path);
- PathCat(fileRelative, stack[frame].name);
if(relative && mode == workspace && prj != ide.project)
{
char special[MAX_LOCATION];
}
case folder:
{
- bool relative = true;
- char fileRelative[MAX_LOCATION];
- char filePath[MAX_LOCATION];
- filePath[0] = '\0';
- PathCat(filePath, prj.topNode.path);
- PathCat(filePath, stack[frame].path);
- fileRelative[0] = '\0';
- PathCat(fileRelative, stack[frame].path);
if(relative && mode == workspace && prj != ide.project)
{
char special[MAX_LOCATION];
{
char filePath[MAX_LOCATION];
Window document;
- node.GetFullFilePath(filePath, true);
+ node.GetFullFilePath(filePath, true, true);
if(FileExists(filePath))
ide.projectView.OpenNode(node, key.ctrl && key.shift);
else
{
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;
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);
}
}
}
- char * GetFullFilePath(char * buffer, bool resolveVars)
+ char * GetFullFilePath(char * buffer, bool absolute, bool resolveVars)
{
if(buffer)
{
- strcpy(buffer, root.path);
+ *buffer = 0;
+ if(absolute)
+ strcpy(buffer, root.path);
if(resolveVars)
{
if(path && path[0])
else if(child.name && !fstrcmp(lastDirName, child.name))
{
char p[MAX_LOCATION];
- child.GetFullFilePath(p, true);
+ child.GetFullFilePath(p, true, true);
if(!fstrcmp(p, path))
{
result = child;
if(!strcmpi(extension, &h2s))
{
char filePath[MAX_LOCATION];
- GetFullFilePath(filePath, true);
+ GetFullFilePath(filePath, true, true);
OutputLog($"No compilation required for header file "); OutputLog(filePath); OutputLog("\n");
ChangeExtension(moduleName, h2s, moduleName);
if(prj.topNode.Find(moduleName, false))
{
char filePath[MAX_LOCATION];
char ext[MAX_EXTENSION];
- node.GetFullFilePath(filePath, true);
+ node.GetFullFilePath(filePath, true, true);
GetExtension(filePath, ext);
if(binaryDocExt.Find(ext))
fileDialog.master = parent;
while(node)
{
- node.GetFullFilePath(path, true);
+ node.GetFullFilePath(path, true, true);
while(path[0])
{
StripLastDirectory(path, path);
}
if(prj)
{
- node.GetFullFilePath(absolute, true);
+ node.GetFullFilePath(absolute, true, true);
return CopyString(absolute);
}