Skip to content

Commit 55bce9c

Browse files
devvaannshabose
authored andcommitted
chore: auto update API docs
1 parent 75e561c commit 55bce9c

6 files changed

Lines changed: 172 additions & 15 deletions

File tree

‎docs/API-Reference/JSUtils/Session.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ the "currentIndex" property index of the hint the cursor is on, may be
243243

244244
### session.getJavascriptText() ⇒ <code>String</code>
245245
Get the javascript text of the file open in the editor for this Session.
246-
For a javascript file, this is just the text of the file. For an HTML file,
246+
For a javascript file, this is just the text of the file. For an HTML/PHP file,
247247
this will be only the text in the script tags. This is so that we can pass
248248
just the javascript text to tern, and avoid confusing it with HTML tags, since it
249249
only knows how to parse javascript.

‎docs/API-Reference/features/SelectionViewManager.md‎

Lines changed: 98 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,106 @@ performing any operations.
118118
to be shown to the user. The div contents can be later updated as and when more details are available.
119119
1. Note that the SelectionView could be hidden/removed any time by the SelectionViewManager.
120120
1. If multiple providers returns a valid popup, all of them are displayed.
121+
122+
* [features/SelectionViewManager](#module_features/SelectionViewManager)
123+
* [.getVisibleSelectionBounds(editor, bounds)](#module_features/SelectionViewManager..getVisibleSelectionBounds) ⇒ <code>Object</code> \| <code>null</code>
124+
* [.positionPreview(editor, [refreshBounds])](#module_features/SelectionViewManager..positionPreview)
125+
* [.suspendPreviewLayout()](#module_features/SelectionViewManager..suspendPreviewLayout)
126+
* [.restorePreviewLayout()](#module_features/SelectionViewManager..restorePreviewLayout)
127+
* [.schedulePreviewLayout()](#module_features/SelectionViewManager..schedulePreviewLayout)
128+
* [.onPanelResizeStart(event)](#module_features/SelectionViewManager..onPanelResizeStart)
129+
* [.onPanelResizeEnd(event)](#module_features/SelectionViewManager..onPanelResizeEnd)
130+
* [.showPreview(editor, selectionObj)](#module_features/SelectionViewManager..showPreview) ⇒ <code>Promise.&lt;void&gt;</code>
131+
* [.onEditorScroll()](#module_features/SelectionViewManager..onEditorScroll)
132+
* [.isSelectionViewShown()](#module_features/SelectionViewManager..isSelectionViewShown) ⇒ <code>boolean</code>
133+
134+
<a name="module_features/SelectionViewManager..getVisibleSelectionBounds"></a>
135+
136+
### features/SelectionViewManager.getVisibleSelectionBounds(editor, bounds) ⇒ <code>Object</code> \| <code>null</code>
137+
Measure the visible selection highlights, including wrapped lines and partial viewport selections.
138+
139+
**Kind**: inner method of [<code>features/SelectionViewManager</code>](#module_features/SelectionViewManager)
140+
**Returns**: <code>Object</code> \| <code>null</code> - Visible bounds and highlight rectangles, or null when none are visible.
141+
142+
| Param | Type | Description |
143+
| --- | --- | --- |
144+
| editor | <code>Editor</code> | Editor containing the selection. |
145+
| bounds | <code>Object</code> | Visible editor bounds in window coordinates. |
146+
147+
<a name="module_features/SelectionViewManager..positionPreview"></a>
148+
149+
### features/SelectionViewManager.positionPreview(editor, [refreshBounds])
150+
Prefer below-right, then above-right, and overlap only when no outside placement fits.
151+
152+
**Kind**: inner method of [<code>features/SelectionViewManager</code>](#module_features/SelectionViewManager)
153+
154+
| Param | Type | Description |
155+
| --- | --- | --- |
156+
| editor | <code>Editor</code> | Editor whose visible bounds constrain the popup. |
157+
| [refreshBounds] | <code>boolean</code> | Remeasure selection highlights after an editor layout change. |
158+
159+
<a name="module_features/SelectionViewManager..suspendPreviewLayout"></a>
160+
161+
### features/SelectionViewManager.suspendPreviewLayout()
162+
Hide the popup without discarding its controls, and cancel any pending layout measurements.
163+
164+
**Kind**: inner method of [<code>features/SelectionViewManager</code>](#module_features/SelectionViewManager)
165+
<a name="module_features/SelectionViewManager..restorePreviewLayout"></a>
166+
167+
### features/SelectionViewManager.restorePreviewLayout()
168+
Remeasure once after resizing finishes, then reveal the existing popup at its new position.
169+
170+
**Kind**: inner method of [<code>features/SelectionViewManager</code>](#module_features/SelectionViewManager)
171+
<a name="module_features/SelectionViewManager..schedulePreviewLayout"></a>
172+
173+
### features/SelectionViewManager.schedulePreviewLayout()
174+
Wait for layout events to settle when there is no explicit panel-resize lifecycle.
175+
176+
**Kind**: inner method of [<code>features/SelectionViewManager</code>](#module_features/SelectionViewManager)
177+
<a name="module_features/SelectionViewManager..onPanelResizeStart"></a>
178+
179+
### features/SelectionViewManager.onPanelResizeStart(event)
180+
Suspend positioning throughout a panel drag, including any forwarded resize events.
181+
182+
**Kind**: inner method of [<code>features/SelectionViewManager</code>](#module_features/SelectionViewManager)
183+
184+
| Param | Type | Description |
185+
| --- | --- | --- |
186+
| event | <code>jQuery.Event</code> | Resize-start event whose target identifies the resizing panel. |
187+
188+
<a name="module_features/SelectionViewManager..onPanelResizeEnd"></a>
189+
190+
### features/SelectionViewManager.onPanelResizeEnd(event)
191+
Restore the popup after all panels participating in the drag have finished resizing.
192+
193+
**Kind**: inner method of [<code>features/SelectionViewManager</code>](#module_features/SelectionViewManager)
194+
195+
| Param | Type | Description |
196+
| --- | --- | --- |
197+
| event | <code>jQuery.Event</code> | Resize-end event for the panel that finished resizing. |
198+
199+
<a name="module_features/SelectionViewManager..showPreview"></a>
200+
201+
### features/SelectionViewManager.showPreview(editor, selectionObj) ⇒ <code>Promise.&lt;void&gt;</code>
202+
Render only the latest provider result; dismissed requests cannot reopen the popup.
203+
204+
**Kind**: inner method of [<code>features/SelectionViewManager</code>](#module_features/SelectionViewManager)
205+
**Returns**: <code>Promise.&lt;void&gt;</code> - Resolves after the provider results have been considered.
206+
207+
| Param | Type | Description |
208+
| --- | --- | --- |
209+
| editor | <code>Editor</code> | Editor providing the selected text. |
210+
| selectionObj | <code>Array.&lt;Object&gt;</code> | Selected ranges supplied to providers. |
211+
212+
<a name="module_features/SelectionViewManager..onEditorScroll"></a>
213+
214+
### features/SelectionViewManager.onEditorScroll()
215+
Dismiss on editor viewport scrolling, except while workspace layout is being restored.
216+
217+
**Kind**: inner method of [<code>features/SelectionViewManager</code>](#module_features/SelectionViewManager)
121218
<a name="module_features/SelectionViewManager..isSelectionViewShown"></a>
122219

123220
### features/SelectionViewManager.isSelectionViewShown() ⇒ <code>boolean</code>
124-
If quickview is displayed and visible on screen
221+
Whether the selection popup is visible, excluding temporary suspension during layout changes.
125222

126223
**Kind**: inner method of [<code>features/SelectionViewManager</code>](#module_features/SelectionViewManager)

‎docs/API-Reference/language/CodeInspection.md‎

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,11 @@ Scrolls to the problem line
111111

112112
<a name="run"></a>
113113

114-
## run(providerName)
115-
Run inspector applicable to current document. Updates status bar indicator and refreshes error list in
116-
bottom panel. Does not run if inspection is disabled or if a providerName is given and does not
117-
match the current doc's provider name.
114+
## run()
115+
Run inspectors for the current document and publish results from the latest unchanged scan.
116+
Does not scan while inspection is disabled. Keeps valid fixes available until a current scan replaces them.
118117

119118
**Kind**: global function
120-
121-
| Param | Type | Description |
122-
| --- | --- | --- |
123-
| providerName | <code>string</code> | name of the provider that is requesting a run |
124-
125119
<a name="toggleEnabled"></a>
126120

127121
## toggleEnabled(enabled, doNotSave)
@@ -134,6 +128,23 @@ Enable or disable all inspection.
134128
| enabled | <code>boolean</code> | Enabled state. If omitted, the state is toggled. |
135129
| doNotSave | <code>boolean</code> | true if the preference should not be saved to user settings. This is generally for events triggered by project-level settings. |
136130

131+
<a name="_fixProblem"></a>
132+
133+
## \_fixProblem(fixID)
134+
Apply one fix if its document and text still match the displayed inspection results.
135+
136+
**Kind**: global function
137+
138+
| Param | Type | Description |
139+
| --- | --- | --- |
140+
| fixID | <code>string</code> | ID assigned to the displayed fix. |
141+
142+
<a name="_fixAllProblems"></a>
143+
144+
## \_fixAllProblems()
145+
Apply all displayed fixes only to the document version that was inspected.
146+
147+
**Kind**: global function
137148
<a name="Error"></a>
138149

139150
## Error : <code>Object</code>

‎docs/API-Reference/project/ProjectManager.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,20 @@ path lies outside the project, or if it doesn't exist.
235235
| --- | --- | --- |
236236
| entry | <code>File</code> \| <code>Directory</code> | File or Directory to show |
237237

238+
<a name="isInFileTree"></a>
239+
240+
## isInFileTree(fullPath) ⇒ <code>boolean</code>
241+
Whether the file tree currently has a node for the path. A file written outside the
242+
FileSystem API is not in the tree until the watcher or a refresh adds it, and a file in a
243+
folder that was never expanded is not in it either; `showInTree` expands the folders first.
244+
245+
**Kind**: global function
246+
**Returns**: <code>boolean</code> - true if the tree has the node
247+
248+
| Param | Type | Description |
249+
| --- | --- | --- |
250+
| fullPath | <code>string</code> | Absolute path of a file or folder |
251+
238252
<a name="openProject"></a>
239253

240254
## openProject([path]) ⇒ <code>$.Promise</code>

‎docs/API-Reference/utils/Async.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ Removes all pending promises from the queue.
4949
Value passed to fail() handlers that have been triggered due to withTimeout()'s timeout
5050

5151
**Kind**: global variable
52+
<a name="RETRY_DEFAULT_DELAYS_MS"></a>
53+
54+
## RETRY\_DEFAULT\_DELAYS\_MS
55+
The waits retry() puts between attempts when none are given: 5 s, 15 s, 30 s, 60 s.
56+
57+
**Kind**: global constant
5258
<a name="doInParallel"></a>
5359

5460
## doInParallel(items, beginProcessItem, failFast) ⇒ <code>$.Promise</code>
@@ -205,6 +211,35 @@ fail() (with Async.ERROR_TIMEOUT) is called based on value of resolveTimeout.
205211
| timeout | <code>number</code> | |
206212
| [resolveTimeout] | <code>boolean</code> | If true, then resolve deferred on timeout, otherwise reject. Default is false. |
207213

214+
<a name="retry"></a>
215+
216+
## retry(operation, [options]) ⇒ <code>Promise</code>
217+
Runs an operation again when it fails, waiting longer before each retry. Meant for calls
218+
that may hit a network blip or a service that is restarting: the first retry is quick and
219+
the later ones are spaced out, so a short outage is ridden out without hammering the other
220+
side. Each wait is jittered so many clients recovering at once do not retry in step.
221+
222+
The operation is called with the attempt number, starting at 1, and returns a Promise (a
223+
plain value or another thenable, such as a jQuery promise, is adopted with Promise.resolve).
224+
A thrown error or a rejection counts as a failure. Always returns a native Promise: it
225+
resolves with the first successful value and rejects with the last failure once the attempts
226+
are used up, or as soon as `shouldRetry` says a failure is not worth retrying, or when the
227+
signal aborts.
228+
229+
**Kind**: global function
230+
231+
| Param | Type | Default | Description |
232+
| --- | --- | --- | --- |
233+
| operation | <code>function</code> | | called with the attempt number (1-based) |
234+
| [options] | <code>Object</code> | | |
235+
| [options.attempts] | <code>number</code> | <code>5</code> | how many times to try in all, the first included |
236+
| [options.delaysMs] | <code>number</code> \| <code>Array.&lt;number&gt;</code> | <code>[5000, 15000, 30000, 60000]</code> | the wait before each retry. A number is a fixed wait; an array gives the waits in order, and its last value repeats when there are more retries than entries. |
237+
| [options.jitter] | <code>number</code> | <code>0.25</code> | each wait is varied at random by up to this fraction either way; 0 disables it |
238+
| [options.shouldRetry] | <code>function</code> | | given the failure and the attempt that failed; return false to stop at once. Every failure is retried by default. |
239+
| [options.onRetry] | <code>function</code> | | told the failure, the attempt that failed and the wait in ms before each retry, for logging |
240+
| [options.timeoutMs] | <code>number</code> | | a cap on each attempt; one that runs longer fails with Async.ERROR_TIMEOUT and is retried like any other failure |
241+
| [options.signal] | <code>AbortSignal</code> | | aborting it ends the waiting and rejects with the signal's reason |
242+
208243
<a name="waitForAll"></a>
209244

210245
## waitForAll(promises, [failOnReject], [timeout]) ⇒ <code>$.Promise</code>

‎docs/API-Reference/widgets/NotificationUI.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ let notification1 = NotificationUI.createFromTemplate(
119119
| title | <code>string</code> | The title for the notification. |
120120
| template | <code>string</code> \| <code>Element</code> | A string template or HTML Element to use as the dialog HTML. |
121121
| [elementID] | <code>String</code> | optional id string if provided will show the notification pointing to the element. If no element is specified, it will be managed as a generic notification. |
122-
| [options] | <code>Object</code> | optional, supported * options are: * `allowedPlacements` - Optional String array with values restricting where the notification will be shown. Values can be a mix of `['top', 'bottom', 'left', 'right']` * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never. * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss). * `toastStyle` - To style the toast notification for error, warning, info etc. Can be one of `NotificationUI.NOTIFICATION_STYLES_CSS_CLASS.*` or your own css class name. |
122+
| [options] | <code>Object</code> | optional, supported * options are: * `allowedPlacements` - Optional String array with values restricting where the notification will be shown. Values can be a mix of `['top', 'bottom', 'left', 'right']` * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never. The countdown pauses while the mouse is over the notification. * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss). * `toastStyle` - To style the toast notification for error, warning, info etc. Can be one of `NotificationUI.NOTIFICATION_STYLES_CSS_CLASS.*` or your own css class name. |
123123

124124
<a name="module_widgets/NotificationUI..createToastFromTemplate"></a>
125125

@@ -146,7 +146,7 @@ let notification1 = NotificationUI.createToastFromTemplate( "Title here",
146146
| --- | --- | --- |
147147
| title | <code>string</code> | The title for the notification. |
148148
| template | <code>string</code> \| <code>Element</code> | A string template or HTML Element to use as the dialog HTML. |
149-
| [options] | <code>Object</code> | optional, supported * options are: * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never. * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss). * `toastStyle` - To style the toast notification for error, warning, info etc. Can be one of `NotificationUI.NOTIFICATION_STYLES_CSS_CLASS.*` or your own css class name. * `instantOpen` - To instantly open the popup without any open animation delays |
149+
| [options] | <code>Object</code> | optional, supported * options are: * `autoCloseTimeS` - Time in seconds after which the notification should be auto closed. Default is never. The countdown pauses while the mouse is over the notification. * `dismissOnClick` - when clicked, the notification is closed. Default is true(dismiss). * `toastStyle` - To style the toast notification for error, warning, info etc. Can be one of `NotificationUI.NOTIFICATION_STYLES_CSS_CLASS.*` or your own css class name. * `instantOpen` - To instantly open the popup without any open animation delays |
150150

151151
<a name="module_widgets/NotificationUI..showToastOn"></a>
152152

@@ -168,7 +168,7 @@ NotificationUI.showToastOn(document.getElementById("my-panel"), "Hello!", {
168168
| --- | --- | --- |
169169
| containerOrSelector | <code>Element</code> \| <code>string</code> | A DOM element or CSS selector for the parent container. The container should have `position: relative` or `absolute` so the toast is positioned correctly. |
170170
| template | <code>string</code> \| <code>Element</code> | HTML string or DOM Element for the toast content. |
171-
| [options] | <code>Object</code> | optional, supported options: * `autoCloseTimeS` - Time in seconds after which the toast auto-closes. Default is 5. * `dismissOnClick` - If true, clicking the toast dismisses it. Default is true. |
171+
| [options] | <code>Object</code> | optional, supported options: * `autoCloseTimeS` - Time in seconds after which the toast auto-closes. Default is 5. The countdown pauses while the mouse is over the toast. * `dismissOnClick` - If true, clicking the toast dismisses it. Default is true. |
172172

173173
<a name="module_widgets/NotificationUI..showHUD"></a>
174174

@@ -188,7 +188,7 @@ NotificationUI.showHUD("fa-solid fa-magnifying-glass-plus", "110%");
188188
| --- | --- | --- |
189189
| iconClass | <code>string</code> | Font Awesome class string for the icon (e.g. "fa-solid fa-magnifying-glass-plus"). |
190190
| label | <code>string</code> | Text to display below the icon (e.g. "110%"). |
191-
| [options] | <code>Object</code> | optional, supported options: * `autoCloseTimeS` - Time in seconds after which the HUD auto-closes. Default is 1. |
191+
| [options] | <code>Object</code> | optional, supported options: * `autoCloseTimeS` - Time in seconds after which the HUD auto-closes. Default is 1. The countdown pauses while the mouse is over the HUD. |
192192

193193
<a name="module_widgets/NotificationUI..hideRichTooltip"></a>
194194

0 commit comments

Comments
 (0)