コード例 #1
0
ファイル: T4IncludeResolver.cs プロジェクト: JetBrains/ForTea
        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
ファイル: T4IncludeResolver.cs プロジェクト: JetBrains/ForTea
 public IPsiSourceFile Resolve(T4ResolvedPath path) =>
 Selector.FindMostSuitableFile(ResolvePath(path), path.SourceFile);