From aaa67ad217bcfaa778ca22156272df473e4b565f Mon Sep 17 00:00:00 2001 From: Pluto Date: Wed, 30 Oct 2024 01:10:00 +0530 Subject: [PATCH] docs: fix jsdoc issues --- docs/API-Reference/search/FindUtils.md | 24 ------- docs/API-Reference/search/QuickSearchField.md | 10 +++ .../search/ScrollTrackMarkers.md | 66 ------------------- src/search/FindUtils.js | 22 +++++++ src/search/QuickSearchField.js | 2 - src/search/ScrollTrackMarkers.js | 2 - 6 files changed, 32 insertions(+), 94 deletions(-) delete mode 100644 docs/API-Reference/search/ScrollTrackMarkers.md diff --git a/docs/API-Reference/search/FindUtils.md b/docs/API-Reference/search/FindUtils.md index 489981b86..2d805e27f 100644 --- a/docs/API-Reference/search/FindUtils.md +++ b/docs/API-Reference/search/FindUtils.md @@ -3,30 +3,6 @@ const FindUtils = brackets.getModule("search/FindUtils") ``` - - -## instantSearchDisabled : boolean -if instant search is disabled, defaults to false - -**Kind**: global variable - - -## indexingInProgress : boolean -if indexing in progress, defaults to false - -**Kind**: global variable - - -## workerSearchCount : number -count of worker search, defaults to 0 - -**Kind**: global variable - - -## collapseResults : boolean -if collapse results, defaults to false - -**Kind**: global variable ## parseDollars(replaceWith, match) ⇒ string diff --git a/docs/API-Reference/search/QuickSearchField.md b/docs/API-Reference/search/QuickSearchField.md index b67cbfefb..5200180d3 100644 --- a/docs/API-Reference/search/QuickSearchField.md +++ b/docs/API-Reference/search/QuickSearchField.md @@ -11,6 +11,8 @@ const QuickSearchField = brackets.getModule("search/QuickSearchField") * [QuickSearchField](#QuickSearchField) * [new QuickSearchField($input)](#new_QuickSearchField_new) * [.options](#QuickSearchField+options) : Object + * [.$input](#QuickSearchField+$input) : jQueryObject + * [.$positionEl](#QuickSearchField+$positionEl) : jQueryObject * [.updateResults()](#QuickSearchField+updateResults) * [.setText(value)](#QuickSearchField+setText) * [.destroy()](#QuickSearchField+destroy) @@ -40,6 +42,14 @@ Attaches to an existing "input" tag ### quickSearchField.options : Object **Kind**: instance property of [QuickSearchField](#QuickSearchField) + + +### quickSearchField.$input : jQueryObject +**Kind**: instance property of [QuickSearchField](#QuickSearchField) + + +### quickSearchField.$positionEl : jQueryObject +**Kind**: instance property of [QuickSearchField](#QuickSearchField) ### quickSearchField.updateResults() diff --git a/docs/API-Reference/search/ScrollTrackMarkers.md b/docs/API-Reference/search/ScrollTrackMarkers.md deleted file mode 100644 index 7e61ebed9..000000000 --- a/docs/API-Reference/search/ScrollTrackMarkers.md +++ /dev/null @@ -1,66 +0,0 @@ -### Import : -```js -const ScrollTrackMarkers = brackets.getModule("search/ScrollTrackMarkers") -``` - - - -## \_ -Manages tickmarks shown along the scrollbar track. -NOT yet intended for use by anyone other than the FindReplace module. -It is assumed that markers are always clear()ed when switching editors. - -**Kind**: global variable - - -## getScrollbarTrackOffset() ⇒ number -Vertical space above and below the scrollbar. - -**Kind**: global function -**Returns**: number - amount Value in pixels - - -## setScrollbarTrackOffset(offset) -Sets how much vertical space there's above and below the scrollbar, which depends -on the OS and may also be affected by extensions - -**Kind**: global function - -| Param | Type | Description | -| --- | --- | --- | -| offset | number | Value in pixels | - - - -## clear() -Clear any markers in the editor's tickmark track, but leave it visible. Safe to call when -tickmark track is not visible also. - -**Kind**: global function - - -## setVisible() -Add or remove the tickmark track from the editor's UI - -**Kind**: global function - - -## addTickmarks(curEditor, posArray) -Add tickmarks to the editor's tickmark track, if it's visible - -**Kind**: global function - -| Param | Type | -| --- | --- | -| curEditor | Editor | -| posArray | Object | - - - -## markCurrent(index) -**Kind**: global function - -| Param | Type | Description | -| --- | --- | --- | -| index | number | Either -1, or an index into the array passed to addTickmarks() | - diff --git a/src/search/FindUtils.js b/src/search/FindUtils.js index 34395944d..2cf5a2b70 100644 --- a/src/search/FindUtils.js +++ b/src/search/FindUtils.js @@ -37,24 +37,32 @@ define(function (require, exports, module) { /** * if instant search is disabled, defaults to false + * + * @private * @type {boolean} */ let instantSearchDisabled = false; /** * if indexing in progress, defaults to false + * + * @private * @type {boolean} */ let indexingInProgress = false; /** * count of worker search, defaults to 0 + * + * @private * @type {number} */ let workerSearchCount = 0; /** * if collapse results, defaults to false + * + * @private * @type {boolean} */ let collapseResults = false; @@ -66,6 +74,7 @@ define(function (require, exports, module) { * regexp match info. * NOTE: we can't just use the ordinary replace() function here because the string has been * extracted from the original text and so might be missing some context that the regexp matched. + * * @param {string} replaceWith The string containing the $-expressions. * @param {Object} match The match data from the regexp. * @return {string} The replace text with the $-expressions substituted. @@ -97,6 +106,7 @@ define(function (require, exports, module) { /** * Does a set of replacements in a single document in memory. + * * @private * @param {!Document} doc The document to do the replacements in. * @param {Object} matchInfo The match info for this file, as returned by `_addSearchMatches()`. Might be mutated. @@ -130,6 +140,7 @@ define(function (require, exports, module) { /** * Does a set of replacements in a single file on disk. + * * @private * @param {string} fullPath The full path to the file. * @param {Object} matchInfo The match info for this file, as returned by `_addSearchMatches()`. @@ -172,6 +183,7 @@ define(function (require, exports, module) { /** * Does a set of replacements in a single file. If the file is already open in a Document in memory, * will do the replacement there, otherwise does it directly on disk. + * * @private * @param {string} fullPath The full path to the file. * @param {Object} matchInfo The match info for this file, as returned by `_addSearchMatches()`. @@ -281,6 +293,7 @@ define(function (require, exports, module) { /** * Returns label text to indicate the search scope. Already HTML-escaped. + * * @param {?Entry} scope * @return {string} */ @@ -299,6 +312,7 @@ define(function (require, exports, module) { /** * Parses the given query into a regexp, and returns whether it was valid or not. + * * @param {{query: string, caseSensitive: boolean, isRegexp: boolean}} queryInfo * @return {{queryExpr: RegExp, valid: boolean, empty: boolean, error: string}} * queryExpr - the regexp representing the query @@ -337,6 +351,7 @@ define(function (require, exports, module) { /** * Prioritizes the open file and then the working set files to the starting of the list of files + * * @param {Array.<*>} files An array of file paths or file objects to sort * @param {?string} firstFile If specified, the path to the file that should be sorted to the top. * @return {Array.<*>} @@ -381,6 +396,7 @@ define(function (require, exports, module) { /** * Returns the path of the currently open file or null if there isn't one open + * * @return {?string} */ function getOpenFilePath() { @@ -390,6 +406,7 @@ define(function (require, exports, module) { /** * enable/disable instant search + * * @param {boolean} disable true to disable web worker based search */ function setInstantSearchDisabled(disable) { @@ -398,6 +415,7 @@ define(function (require, exports, module) { /** * if instant search is disabled, this will return true we can only do instant search through worker + * * @return {boolean} */ function isInstantSearchDisabled() { @@ -406,6 +424,7 @@ define(function (require, exports, module) { /** * check if a search is progressing in worker + * * @return {Boolean} true if search is processing in worker */ function isWorkerSearchInProgress() { @@ -472,6 +491,7 @@ define(function (require, exports, module) { /** * Return true if indexing is in progress in worker + * * @return {boolean} true if files are being indexed in worker */ function isIndexingInProgress() { @@ -480,6 +500,7 @@ define(function (require, exports, module) { /** * Set if we need to collapse all results in the results pane + * * @param {boolean} collapse true to collapse */ function setCollapseResults(collapse) { @@ -489,6 +510,7 @@ define(function (require, exports, module) { /** * check if results should be collapsed + * * @return {boolean} true if results should be collapsed */ function isCollapsedResults() { diff --git a/src/search/QuickSearchField.js b/src/search/QuickSearchField.js index 69c53292c..66a8995a2 100644 --- a/src/search/QuickSearchField.js +++ b/src/search/QuickSearchField.js @@ -152,13 +152,11 @@ define(function (require, exports, module) { /** * @type {!jQueryObject} - * @private */ QuickSearchField.prototype.$input = null; /** * @type {!jQueryObject} - * @private */ QuickSearchField.prototype.$positionEl = null; diff --git a/src/search/ScrollTrackMarkers.js b/src/search/ScrollTrackMarkers.js index bcb934bdd..83ccce6bd 100644 --- a/src/search/ScrollTrackMarkers.js +++ b/src/search/ScrollTrackMarkers.js @@ -19,8 +19,6 @@ * */ -// @INCLUDE_IN_API_DOCS - /** * Manages tickmarks shown along the scrollbar track. * NOT yet intended for use by anyone other than the FindReplace module.