Пример #1
0
        public void Store()
        {
            int oldHash = 0, newHash = 0;
            var refs = Project.References.RawIncludes;

            foreach (var p in refs)
            {
                oldHash += p.GetHashCode();
            }
            refs.Clear();

            foreach (var p in text_Includes.Buffer.Text.Split('\n'))
            {
                var p_ = p.Trim().TrimEnd('\\', '/');
                if (string.IsNullOrWhiteSpace(p_))
                {
                    continue;
                }
                refs.Add(p_);
                newHash += p_.GetHashCode();
            }

            if (oldHash != newHash)               // Only reparse if paths changed
            {
                Project.NeedsFullRebuild = true;

                try {
                    // Update parse cache immediately
                    Project.UpdateLocalIncludeCache();
                } catch (Exception ex) {
                    LoggingService.LogError("Include path analysis error", ex);
                }
            }
        }
Пример #2
0
        public void Store()
        {
            var refs = Project.References.RawIncludes;

            refs.Clear();
            foreach (var p in text_Includes.Buffer.Text.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries))
            {
                refs.Add(p.TrimEnd('\\', '/'));
            }

            try {
                // Update parse cache immediately
                Project.UpdateLocalIncludeCache();
            } catch (Exception ex) {
                LoggingService.LogError("Include path analysis error", ex);
            }
        }