예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
 public IPsiSourceFile Resolve(T4ResolvedPath path) =>
 Selector.FindMostSuitableFile(ResolvePath(path), path.SourceFile);