예제 #1
0
        public RefactorMenu(VBE vbe, AddIn addin, IRubberduckParser parser, IActiveCodePaneEditor editor)
            : base(vbe, addin)
        {
            _parser = parser;
            _editor = editor;

            _iconCache = new SearchResultIconCache();
        }
        public FindSymbolViewModel(IEnumerable<Declaration> declarations, SearchResultIconCache cache)
        {
            _declarations = declarations;
            _cache = cache;
            var initialResults = _declarations
                .Where(declaration => !ExcludedTypes.Contains(declaration.DeclarationType))
                .OrderBy(declaration => declaration.IdentifierName.ToLowerInvariant())
                .Select(declaration => new SearchResult(declaration, cache[declaration]))
                .ToList();

            MatchResults = new ObservableCollection<SearchResult>(initialResults);
        }
예제 #3
0
        public FindSymbolViewModel(IEnumerable <Declaration> declarations, SearchResultIconCache cache)
        {
            _declarations = declarations;
            _cache        = cache;
            var initialResults = _declarations
                                 .Where(declaration => !ExcludedTypes.Contains(declaration.DeclarationType))
                                 .OrderBy(declaration => declaration.IdentifierName.ToLowerInvariant())
                                 .Select(declaration => new SearchResult(declaration, cache[declaration]))
                                 .ToList();

            MatchResults = new ObservableCollection <SearchResult>(initialResults);
        }