コード例 #1
0
        /// <summary>
        /// Unregisters the search scopes provided by the document service.
        /// </summary>
        private void RemoveSearchScopes()
        {
            if (_searchService == null)
                return;

            _searchService.SearchScopes.Remove(_currentDocumentSearchScope);
            _currentDocumentSearchScope = null;

            _searchService.SearchScopes.Remove(_openDocumentsSearchScope);
            _openDocumentsSearchScope = null;
        }
コード例 #2
0
        /// <summary>
        /// Unregisters the search scopes provided by the document service.
        /// </summary>
        private void RemoveSearchScopes()
        {
            if (_searchService == null)
            {
                return;
            }

            _searchService.SearchScopes.Remove(_currentDocumentSearchScope);
            _currentDocumentSearchScope = null;

            _searchService.SearchScopes.Remove(_openDocumentsSearchScope);
            _openDocumentsSearchScope = null;
        }
コード例 #3
0
        /// <summary>
        /// Registers the search scopes provided by the document services.
        /// </summary>
        private void AddSearchScopes()
        {
            if (_searchService == null)
                return;

            _currentDocumentSearchScope = new CurrentDocumentSearchScope(this);
            _searchService.SearchScopes.Add(_currentDocumentSearchScope);

            _openDocumentsSearchScope = new OpenDocumentsSearchScope(Editor, this);
            _searchService.SearchScopes.Add(_openDocumentsSearchScope);

            // Make "Current document" the default search scope.
            _searchService.Query.Scope = _currentDocumentSearchScope;
        }
コード例 #4
0
        /// <summary>
        /// Registers the search scopes provided by the document services.
        /// </summary>
        private void AddSearchScopes()
        {
            if (_searchService == null)
            {
                return;
            }

            _currentDocumentSearchScope = new CurrentDocumentSearchScope(this);
            _searchService.SearchScopes.Add(_currentDocumentSearchScope);

            _openDocumentsSearchScope = new OpenDocumentsSearchScope(Editor, this);
            _searchService.SearchScopes.Add(_openDocumentsSearchScope);

            // Make "Current document" the default search scope.
            _searchService.Query.Scope = _currentDocumentSearchScope;
        }