@@ -32,8 +32,8 @@ import { FileChangeType, FileChangesEvent, IFileService } from 'vs/platform/file
3232import { Viewlet } from 'vs/workbench/browser/viewlet' ;
3333import { Match , FileMatch , SearchModel , FileMatchOrMatch , IChangeEvent , ISearchWorkbenchService } from 'vs/workbench/parts/search/common/searchModel' ;
3434import { QueryBuilder } from 'vs/workbench/parts/search/common/queryBuilder' ;
35- import { MessageType , InputBox } from 'vs/base/browser/ui/inputbox/inputBox' ;
36- import { getExcludes , ISearchProgressItem , ISearchComplete , ISearchQuery , IQueryOptions , ISearchConfiguration } from 'vs/platform/search/common/search' ;
35+ import { MessageType } from 'vs/base/browser/ui/inputbox/inputBox' ;
36+ import { ISearchProgressItem , ISearchComplete , ISearchQuery , IQueryOptions , ISearchConfiguration } from 'vs/platform/search/common/search' ;
3737import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService' ;
3838import { IStorageService , StorageScope } from 'vs/platform/storage/common/storage' ;
3939import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
@@ -48,7 +48,7 @@ import { KeyCode } from 'vs/base/common/keyCodes';
4848import { PatternInputWidget , ExcludePatternInputWidget } from 'vs/workbench/parts/search/browser/patternInputWidget' ;
4949import { SearchRenderer , SearchDataSource , SearchSorter , SearchAccessibilityProvider , SearchFilter } from 'vs/workbench/parts/search/browser/searchResultsView' ;
5050import { SearchWidget , ISearchWidgetOptions } from 'vs/workbench/parts/search/browser/searchWidget' ;
51- import { RefreshAction , CollapseAllAction , ClearSearchResultsAction , ConfigureGlobalExclusionsAction } from 'vs/workbench/parts/search/browser/searchActions' ;
51+ import { RefreshAction , CollapseAllAction , ClearSearchResultsAction } from 'vs/workbench/parts/search/browser/searchActions' ;
5252import { IReplaceService } from 'vs/workbench/parts/search/common/replace' ;
5353import Severity from 'vs/base/common/severity' ;
5454import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService' ;
@@ -60,7 +60,6 @@ import { editorFindMatchHighlight, diffInserted, diffRemoved, diffInsertedOutlin
6060import FileResultsNavigation from 'vs/workbench/parts/files/browser/fileResultsNavigation' ;
6161import { attachListStyler } from 'vs/platform/theme/common/styler' ;
6262import { IOutputService } from 'vs/workbench/parts/output/common/output' ;
63- import { Color } from 'vs/base/common/color' ;
6463import { getOutOfWorkspaceEditorResources } from 'vs/workbench/parts/search/common/search' ;
6564import { PreferencesEditor } from 'vs/workbench/parts/preferences/browser/preferencesEditor' ;
6665
@@ -94,8 +93,6 @@ export class SearchViewlet extends Viewlet {
9493 private size : Dimension ;
9594 private queryDetails : HTMLElement ;
9695 private inputPatternExcludes : ExcludePatternInputWidget ;
97- private inputPatternGlobalExclusions : InputBox ;
98- private inputPatternGlobalExclusionsContainer : Builder ;
9996 private inputPatternIncludes : PatternInputWidget ;
10097 private results : Builder ;
10198
@@ -141,7 +138,6 @@ export class SearchViewlet extends Viewlet {
141138
142139 this . toUnbind . push ( this . fileService . onFileChanges ( e => this . onFilesChanged ( e ) ) ) ;
143140 this . toUnbind . push ( this . untitledEditorService . onDidChangeDirty ( e => this . onUntitledDidChangeDirty ( e ) ) ) ;
144- this . toUnbind . push ( this . configurationService . onDidUpdateConfiguration ( e => this . onConfigurationUpdated ( ) ) ) ;
145141
146142 this . selectCurrentMatchEmitter = new Emitter < string > ( ) ;
147143 debounceEvent ( this . selectCurrentMatchEmitter . event , ( l , e ) => e , 100 , /*leading=*/ true )
@@ -150,12 +146,6 @@ export class SearchViewlet extends Viewlet {
150146 this . delayedRefresh = new Delayer < void > ( 250 ) ;
151147 }
152148
153- private onConfigurationUpdated ( ) : void {
154- const resource = this . contextService . hasWorkspace ( ) ? this . contextService . getWorkspace ( ) . roots [ 0 ] : undefined ;
155- const config = this . configurationService . getConfiguration < ISearchConfiguration > ( undefined , { resource } ) ;
156- this . updateGlobalPatternExclusions ( config ) ;
157- }
158-
159149 public create ( parent : Builder ) : TPromise < void > {
160150 super . create ( parent ) ;
161151
@@ -236,22 +226,6 @@ export class SearchViewlet extends Viewlet {
236226 this . inputPatternExcludes . onSubmit ( ( ) => this . onQueryChanged ( true , true ) ) ;
237227 this . trackInputBox ( this . inputPatternExcludes . inputFocusTracker ) ;
238228 } ) ;
239-
240- // add hint if we have global exclusion
241- this . inputPatternGlobalExclusionsContainer = builder . div ( { 'class' : 'file-types global-exclude' } , ( builder ) => {
242- let title = nls . localize ( 'global.searchScope.folders' , "files excluded through settings" ) ;
243- builder . element ( 'h4' , { text : title } ) ;
244-
245- this . inputPatternGlobalExclusions = new InputBox ( builder . getContainer ( ) , this . contextViewService , {
246- actions : [ this . instantiationService . createInstance ( ConfigureGlobalExclusionsAction ) ] ,
247- ariaLabel : nls . localize ( 'label.global.excludes' , 'Configured Search Exclude Patterns' ) ,
248- // override some styles because this input is disabled
249- inputBackground : Color . transparent ,
250- inputForeground : null
251- } ) ;
252- this . inputPatternGlobalExclusions . inputElement . readOnly = true ;
253- $ ( this . inputPatternGlobalExclusions . inputElement ) . attr ( 'aria-readonly' , 'true' ) ;
254- } ) . hide ( ) ;
255229 } ) . getHTMLElement ( ) ;
256230
257231 this . messages = builder . div ( { 'class' : 'messages' } ) . hide ( ) . clone ( ) ;
@@ -271,8 +245,6 @@ export class SearchViewlet extends Viewlet {
271245 this . toggleQueryDetails ( true , true , true ) ;
272246 }
273247
274- this . updateGlobalPatternExclusions ( this . configurationService . getConfiguration < ISearchConfiguration > ( ) ) ;
275-
276248 this . toUnbind . push ( this . viewModel . searchResult . onChange ( ( event ) => this . onSearchResultsChanged ( event ) ) ) ;
277249
278250 return TPromise . as ( null ) ;
@@ -524,30 +496,6 @@ export class SearchViewlet extends Viewlet {
524496 } ) ;
525497 }
526498
527- private updateGlobalPatternExclusions ( configuration : ISearchConfiguration ) : void {
528- if ( this . inputPatternGlobalExclusionsContainer ) {
529- let excludes = getExcludes ( configuration ) ;
530- if ( excludes ) {
531- let exclusions = Object . getOwnPropertyNames ( excludes ) . filter ( exclude => excludes [ exclude ] === true || typeof excludes [ exclude ] . when === 'string' ) . map ( exclude => {
532- if ( excludes [ exclude ] === true ) {
533- return exclude ;
534- }
535-
536- return nls . localize ( 'globLabel' , "{0} when {1}" , exclude , excludes [ exclude ] . when ) ;
537- } ) ;
538-
539- if ( exclusions . length ) {
540- const values = exclusions . join ( ', ' ) ;
541- this . inputPatternGlobalExclusions . value = values ;
542- this . inputPatternGlobalExclusions . inputElement . title = values ;
543- this . inputPatternGlobalExclusionsContainer . show ( ) ;
544- } else {
545- this . inputPatternGlobalExclusionsContainer . hide ( ) ;
546- }
547- }
548- }
549- }
550-
551499 public selectCurrentMatch ( ) : void {
552500 const focused = this . tree . getFocus ( ) ;
553501 const eventPayload = { focusEditor : true } ;
@@ -750,7 +698,6 @@ export class SearchViewlet extends Viewlet {
750698
751699 this . inputPatternExcludes . setWidth ( this . size . width - 28 /* container margin */ ) ;
752700 this . inputPatternIncludes . setWidth ( this . size . width - 28 /* container margin */ ) ;
753- this . inputPatternGlobalExclusions . width = this . size . width - 28 /* container margin */ - 24 /* actions */ ;
754701
755702 const messagesSize = this . messages . isHidden ( ) ? 0 : dom . getTotalHeight ( this . messages . getHTMLElement ( ) ) ;
756703 const searchResultContainerSize = this . size . height -
0 commit comments