Namespace exports.searchUtils
exports.searchUtils
Defined in: </shared/eclipse/e4/orion/I201303252315/plugins/org.eclipse.orion.client.ui/web/orion/searchUtils.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
Utility methods
|
Method Attributes | Method Name and Description |
---|---|
<static> |
exports.searchUtils.addRecentSearch(serviceRegistry, searchName, useRegEx)
|
<static> |
exports.searchUtils.convertFindURLBinding(findParams)
|
<static> |
exports.searchUtils.convertSearchParams(searchParams)
|
<static> |
exports.searchUtils.copySearchParams(searchParams, copyReplace)
|
<static> |
exports.searchUtils.doSearch(searcher, serviceRegistry, searchStr, advOptions)
|
<static> |
exports.searchUtils.findRegExp(pattern, flags, startIndex, startIndex)
Helper for finding regex matches in text contents.
|
<static> |
exports.searchUtils.fullPathNameByMeta(parents)
|
<static> |
exports.searchUtils.generateFindURLBinding(searchParams, inFileQuery, lineNumber, replaceStr)
|
<static> |
exports.searchUtils.generateMatchContext(contextAroundLength, fileContents, lineNumber)
|
<static> |
exports.searchUtils.generateNewContents(updating, oldContents, newContents, fileModelNode, replaceStr, searchStrLength)
|
<static> |
exports.searchUtils.generateSearchHelper(searchParams, fromStart)
|
generateSearchHelper(searchParams, fromStart)
Generate a helper query object used for search result renderer.
|
|
<static> |
exports.searchUtils.generateSearchHref(options)
|
<static> |
exports.searchUtils.getMixedSearches(serviceRegistry, mixed, checkDuplication, callback)
|
<static> |
exports.searchUtils.getOpenSearchPref(serviceRegistry, callback)
|
<static> |
exports.searchUtils.getSearches(serviceRegistry, type, callback)
|
<static> |
exports.searchUtils.path2FolderName(filePath, fileName, keepTailSlash)
|
<static> |
exports.searchUtils.replaceCheckedMatches(text, replacingStr, originalMatches, checkedMatches, defaultMatchLength)
|
<static> |
exports.searchUtils.replaceRegEx(text, regEx, replacingStr)
|
<static> |
exports.searchUtils.replaceStringLiteral(text, keyword, replacingStr)
|
<static> |
exports.searchUtils.searchOnelineLiteral(inFileQuery, lineString, onlyOnce)
|
<static> |
exports.searchUtils.searchOnelineRegEx(inFileQuery, lineString, onlyOnce)
|
<static> |
exports.searchUtils.searchWithinFile(inFileQuery, fileModelNode, fileContentText, lineDelim, replacing, caseSensitive)
|
<static> |
exports.searchUtils.setOpenSearchPref(serviceRegistry, openInNewTab)
|
<static> |
exports.searchUtils.splitFile(text)
|
splitFile(text)
Split file contents into lines.
|
Method Detail
<static>
exports.searchUtils.addRecentSearch(serviceRegistry, searchName, useRegEx)
- Parameters:
- serviceRegistry
- searchName
- useRegEx
<static>
exports.searchUtils.convertFindURLBinding(findParams)
- Parameters:
- findParams
<static>
exports.searchUtils.convertSearchParams(searchParams)
- Parameters:
- searchParams
<static>
exports.searchUtils.copySearchParams(searchParams, copyReplace)
- Parameters:
- searchParams
- copyReplace
<static>
exports.searchUtils.doSearch(searcher, serviceRegistry, searchStr, advOptions)
- Parameters:
- searcher
- serviceRegistry
- searchStr
- advOptions
<static>
{Object}
exports.searchUtils.findRegExp(pattern, flags, startIndex, startIndex)
Helper for finding regex matches in text contents.
- Parameters:
- {String} pattern
- A valid regexp pattern.
- {String} flags
- Valid regexp flags: [is]
- {Number} startIndex Optional
- Default is false.
- startIndex
- Returns:
- {Object} An object giving the match details, or
null
if no match found. The returned object will have the properties:
{Number} index
{Number} length
<static>
exports.searchUtils.fullPathNameByMeta(parents)
- Parameters:
- parents
<static>
exports.searchUtils.generateFindURLBinding(searchParams, inFileQuery, lineNumber, replaceStr)
- Parameters:
- searchParams
- inFileQuery
- lineNumber
- replaceStr
<static>
exports.searchUtils.generateMatchContext(contextAroundLength, fileContents, lineNumber)
- Parameters:
- contextAroundLength
- fileContents
- lineNumber
<static>
exports.searchUtils.generateNewContents(updating, oldContents, newContents, fileModelNode, replaceStr, searchStrLength)
- Parameters:
- updating
- oldContents
- newContents
- fileModelNode
- replaceStr
- searchStrLength
<static>
exports.searchUtils.generateSearchHelper(searchParams, fromStart)
- Parameters:
- searchParams
- fromStart
{Object}
generateSearchHelper(searchParams, fromStart)
Generate a helper query object used for search result renderer.
- Parameters:
- {Object} searchParams
- The search parameters.
- {Boolean} fromStart
- True if doing file name search, otherwise false.
- Returns:
- {Object} An object having the properties:
<static>
exports.searchUtils.generateSearchHref(options)
- Parameters:
- options
<static>
exports.searchUtils.getMixedSearches(serviceRegistry, mixed, checkDuplication, callback)
- Parameters:
- serviceRegistry
- mixed
- checkDuplication
- callback
<static>
exports.searchUtils.getOpenSearchPref(serviceRegistry, callback)
- Parameters:
- serviceRegistry
- callback
<static>
exports.searchUtils.getSearches(serviceRegistry, type, callback)
- Parameters:
- serviceRegistry
- type
- callback
<static>
exports.searchUtils.path2FolderName(filePath, fileName, keepTailSlash)
- Parameters:
- filePath
- fileName
- keepTailSlash
<static>
exports.searchUtils.replaceCheckedMatches(text, replacingStr, originalMatches, checkedMatches, defaultMatchLength)
- Parameters:
- text
- replacingStr
- originalMatches
- checkedMatches
- defaultMatchLength
<static>
exports.searchUtils.replaceRegEx(text, regEx, replacingStr)
- Parameters:
- text
- regEx
- replacingStr
<static>
exports.searchUtils.replaceStringLiteral(text, keyword, replacingStr)
- Parameters:
- text
- keyword
- replacingStr
<static>
exports.searchUtils.searchOnelineLiteral(inFileQuery, lineString, onlyOnce)
- Parameters:
- inFileQuery
- lineString
- onlyOnce
<static>
exports.searchUtils.searchOnelineRegEx(inFileQuery, lineString, onlyOnce)
- Parameters:
- inFileQuery
- lineString
- onlyOnce
<static>
exports.searchUtils.searchWithinFile(inFileQuery, fileModelNode, fileContentText, lineDelim, replacing, caseSensitive)
- Parameters:
- inFileQuery
- fileModelNode
- fileContentText
- lineDelim
- replacing
- caseSensitive
<static>
exports.searchUtils.setOpenSearchPref(serviceRegistry, openInNewTab)
- Parameters:
- serviceRegistry
- openInNewTab
<static>
exports.searchUtils.splitFile(text)
- Parameters:
- text
{Array}
splitFile(text)
Split file contents into lines. It also handles the mixed line endings with "\n", "\r" and "\r\n".
- Parameters:
- {String} text
- The file contetns.
- Returns:
- {Array} Split file lines.