bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js
function(meta, useParentLocation){
			var locationName = "";
			var noneRootMeta = null;
			this._setLocationbyURL(meta);
			this._searchRootLocation = meta.WorkspaceLocation || this._fileClient.fileServiceRootURL(meta.Location);
			if(useParentLocation && meta && meta.Parents && meta.Parents.length > 0){
				if(useParentLocation.index === "last"){
					noneRootMeta = meta.Parents[meta.Parents.length-1];
				} else {
					noneRootMeta = meta.Parents[0];
				}
			} else {
				noneRootMeta = this._getNoneRootMeta(meta);
			} 
			if(noneRootMeta){
				this.setLocationbyURL(noneRootMeta.Location);
				locationName = noneRootMeta.Name;
				this._childrenLocation = noneRootMeta.ChildrenLocation;
			} else if(meta){
				this.setLocationbyURL(this._searchRootLocation);
				locationName = this._fileClient.fileServiceName(meta.Location);
				this._childrenLocation = meta.ChildrenLocation;
			}
			var searchInputDom = lib.node("search"); //$NON-NLS-0$
			if(!locationName){
				locationName = "";
			}
			this._searchLocationName = locationName;
			if(searchInputDom && searchInputDom.placeholder){
				searchInputDom.value = "";
				var placeHolder = i18nUtil.formatMessage(messages["Search ${0}"], locationName);
				
				if(placeHolder.length > 30){
					searchInputDom.placeholder = placeHolder.substring(0, 27) + "..."; //$NON-NLS-0$
				} else {
					searchInputDom.placeholder = i18nUtil.formatMessage(messages["Search ${0}"], locationName);
				}
			}
			if(searchInputDom && searchInputDom.title){
				searchInputDom.title = messages["TypeKeyOrWildCard"] + locationName;
			}
		}
function(meta, useParentLocation){
			var locationName = "";
			var noneRootMeta = null;
			this._setLocationbyURL(meta);
			this._searchRootLocation = meta.WorkspaceLocation || this._fileClient.fileServiceRootURL(meta.Location);
			if(useParentLocation && meta && meta.Parents && meta.Parents.length > 0){
				if(useParentLocation.index === "last"){
					noneRootMeta = meta.Parents[meta.Parents.length-1];
				} else {
					noneRootMeta = meta.Parents[0];
				}
			} else {
				noneRootMeta = this._getNoneRootMeta(meta);
			} 
			if(noneRootMeta){
				this.setLocationbyURL(noneRootMeta.Location);
				locationName = noneRootMeta.Name;
				this._childrenLocation = noneRootMeta.ChildrenLocation;
			} else if(meta){
				this.setLocationbyURL(this._searchRootLocation);
				locationName = this._fileClient.fileServiceName(meta.Location);
				this._childrenLocation = meta.ChildrenLocation;
			}
			var searchInputDom = lib.node("search"); //$NON-NLS-0$
			if(!locationName){
				locationName = "";
			}
			this._searchLocationName = locationName;
			if(searchInputDom && searchInputDom.placeholder){
				searchInputDom.value = "";
				var placeHolder = i18nUtil.formatMessage(messages["Search ${0}"], locationName);
				
				if(placeHolder.length > 30){
					searchInputDom.placeholder = placeHolder.substring(0, 27) + "..."; //$NON-NLS-0$
				} else {
					searchInputDom.placeholder = i18nUtil.formatMessage(messages["Search ${0}"], locationName);
				}
			}
			if(searchInputDom && searchInputDom.title){
				searchInputDom.title = messages["TypeKeyOrWildCard"] + locationName;
			}
		}
function ( meta , useParentLocation ) { var locationName = "" ; var noneRootMeta = null ; this . _setLocationbyURL ( meta ) ; this . _searchRootLocation = meta . WorkspaceLocation || this . _fileClient . fileServiceRootURL ( meta . Location ) ; if ( useParentLocation && meta && meta . Parents && meta . Parents . length > 0 ) { if ( useParentLocation . index === "last" ) { noneRootMeta = meta . Parents [ meta . Parents . length - 1 ] ; } else { noneRootMeta = meta . Parents [ 0 ] ; } } else { noneRootMeta = this . _getNoneRootMeta ( meta ) ; } if ( noneRootMeta ) { this . setLocationbyURL ( noneRootMeta . Location ) ; locationName = noneRootMeta . Name ; this . _childrenLocation = noneRootMeta . ChildrenLocation ; } else if ( meta ) { this . setLocationbyURL ( this . _searchRootLocation ) ; locationName = this . _fileClient . fileServiceName ( meta . Location ) ; this . _childrenLocation = meta . ChildrenLocation ; } var searchInputDom = lib . node ( "search" ) ; //$NON-NLS-0$ if ( ! locationName ) { locationName = "" ; } this . _searchLocationName = locationName ; if ( searchInputDom && searchInputDom . placeholder ) { searchInputDom . value = "" ; var placeHolder = i18nUtil . formatMessage ( messages [ "Search ${0}" ] , locationName ) ; if ( placeHolder . length > 30 ) { searchInputDom . placeholder = placeHolder . substring ( 0 , 27 ) + "..." ; //$NON-NLS-0$ } else { searchInputDom . placeholder = i18nUtil . formatMessage ( messages [ "Search ${0}" ] , locationName ) ; } } if ( searchInputDom && searchInputDom . title ) { searchInputDom . title = messages [ "TypeKeyOrWildCard" ] + locationName ; } }
Used to update "selectd" and "project" search scope based on the file or folder selected.
Used to update selectd and project search scope based on the file or folder selected .