コード例 #1
0
        protected override HashSet <CppInjectionInfo> BuildData(IPsiSourceFile sourceFile)
        {
            var injections = ShaderLabCppHelper.GetCppFileLocations(sourceFile).Select(t =>
                                                                                       new CppInjectionInfo(t.Location.Location, t.Location.RootRange, t.IsInclude));

            return(new HashSet <CppInjectionInfo>(injections));
        }
コード例 #2
0
        public IEnumerable <CppFileLocation> GetCppFileLocations(SeldomInterruptCheckerWithCheckTime checker)
        {
            foreach (var module in myPsiModules.GetSourceModules())
            {
                if (module.ContainingProjectModule is IProject project && project.IsVCXMiscProjectInVs2015())
                {
                    continue;
                }

                foreach (var f in module.SourceFiles)
                {
                    checker?.CheckForInterrupt();

                    if (f.IsValid() && f.LanguageType.Is <ShaderLabProjectFileType>())
                    {
                        foreach (var cppFileLocation in ShaderLabCppHelper.GetCppFileLocations(f))
                        {
                            yield return(cppFileLocation.Location);
                        }
                    }
                }
            }
        }