public VirtualFileSystemPath ResolvePath(T4ResolvedPath path) { var absolute = path.TryResolveAbsolutePath(); if (absolute != null) { return(absolute); } // search in global include paths var asGlobalInclude = Environment.IncludePaths .Select(includePath => includePath.Combine(path.ResolvedPath)) .FirstOrDefault(resultPath => resultPath.ExistsFile); return(asGlobalInclude ?? VirtualFileSystemPath.GetEmptyPathFor(InteractionContext.SolutionContext)); }
public FileSystemPath ResolvePath(T4ResolvedPath path) { var absolute = path.TryResolveAbsolutePath(); if (absolute != null) { return(absolute); } // search in global include paths var asGlobalInclude = Environment.IncludePaths .Select(includePath => includePath.Combine(path.ResolvedPath)) .FirstOrDefault(resultPath => resultPath.ExistsFile); return(asGlobalInclude ?? FileSystemPath.Empty); }
public IPsiSourceFile Resolve(T4ResolvedPath path) => Selector.FindMostSuitableFile(ResolvePath(path), path.SourceFile);