Пример #1
0
        private void WatcherChangeHandler(ChangeType type, string path)
        {
            var change = new Change(type, path);
            _rawHandler(change);

            if (!_patterns.Contains(Path.GetExtension(path)))
                return;
            _buffer.Push(change);
        }
Пример #2
0
        private void handle(Change file)
        {
            if (file == null)
                return;
            var extension = Path.GetExtension(file.Path).ToLower();
            if (extension == null)
                return;

            _eventDispatcher.Send(
                "codemodel filesystem-change-" +
                file.Type.ToString().ToLower() +
                " \"" + file.Path + "\"");

            _plugins.ForEach(x =>
                {
                    if (x.Supports(extension) && !x.FilesToHandle.Contains(file.Path))
                        x.FilesToHandle.Add(file.Path);
             	});

            _eventDispatcher.Send("codemodel file-crawled \"" + file.Path + "\"");
        }
Пример #3
0
        private void handle(Change file)
        {
            if (file == null)
                return;
            var extension = Path.GetExtension(file.Path).ToLower();
            if (extension == null)
                return;

            try {
                _eventDispatcher.Send(
                    "codemodel filesystem-change-" +
                    file.Type.ToString().ToLower() +
                    " \"" + file.Path + "\"");

                _plugins.ForEach(x =>
                    {
                        if (x.Supports(extension) && !x.FilesToHandle.Contains(file.Path))
                            x.FilesToHandle.Add(file.Path);
                 	});

                _eventDispatcher.Send("codemodel file-crawled \"" + file.Path + "\"");
            } catch (Exception ex) {
                Logger.Write("Failed while handling file system changes. CodeModel may be out of sync");
                Logger.Write(ex);
            }
        }
Пример #4
0
        private void WatcherChangeHandler(ChangeType type, string path)
        {
            if (_ignoreDirectories.Any(x => path.StartsWith(x)))
                return;

            var change = new Change(type, path);
            _rawHandler(change);

            if (!_patterns.Contains(Path.GetExtension(path)))
                return;
            _buffer.Push(change);
        }