Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* A view zone is a full horizontal rectangle that 'pushes' text down.
* The editor reserves space for view zones when rendering.
*/
export
interface
IViewZone
{
/**
* The line number after which this zone should appear.
* Use 0 to place a view zone before the first line number.
*/
:
number
;
/**
* The column after which this zone should appear.
* If not set, the maxLineColumn of `afterLineNumber` will be used.
* This is relevant for wrapped lines.
*/
?
:
number
;
/**
* If the `afterColumn` has multiple view columns, the affinity specifies which one to use. Defaults to `none`.
*/
?
:
;
/**
* Render the zone even when its line is hidden.
*/
?
:
boolean
;
/**
* Tiebreaker that is used when multiple view zones want to be after the same line.
* Defaults to `afterColumn` otherwise 10000;
*/
?
:
number
;
/**
* Suppress mouse down events.
* If set, the editor will attach a mouse down listener to the view zone and .preventDefault on it.
* Defaults to false
*/
?
:
boolean
;
/**
* The height in lines of the view zone.
* If specified, `heightInPx` will be used instead of this.
* If neither `heightInPx` nor `heightInLines` is specified, a default of `heightInLines` = 1 will be chosen.
*/
?
:
number
;
/**
* The height in px of the view zone.
* If this is set, the editor will give preference to it rather than `heightInLines` above.
* If neither `heightInPx` nor `heightInLines` is specified, a default of `heightInLines` = 1 will be chosen.
*/
?
:
number
;
/**
* The minimum width in px of the view zone.
* If this is set, the editor will ensure that the scroll width is >= than this value.
*/
?
:
number
;
/**
* The dom node of the view zone
*/
:
;
/**
* An optional dom node for the view zone that will be placed in the margin area.
*/
?
:
|
null
;
/**
* Callback which gives the relative top of the view zone as it appears (taking scrolling into account).
*/
?
:
(
:
number
)
=>
void
;
/**
* Callback which gives the height in pixels of the view zone.
*/
?
:
(
:
number
)
=>
void
;
}
/**
* An accessor that allows for zones to be added or removed.
*/
export
interface
IViewZoneChangeAccessor
{
/**
* Create a new view zone.
* @paramzone Zone to create
* @return A unique identifier to the view zone.
*/
addZone
(
:
)
:
string
;
/**
* Remove a zone
* @paramid A unique identifier to the view zone, as returned by the `addZone` call.
*/
removeZone
(
:
string
)
:
void
;
/**
* Change a zone's position.
* The editor will rescan the `afterLineNumber` and `afterColumn` properties of a view zone.
*/
layoutZone
(
:
string
)
:
void
;
}
/**
* A positioning preference for rendering content widgets.
*/
export
const
enum
{
/**
* Place the content widget exactly at a position
*/
EXACT
,
/**
* Place the content widget above a position
*/
ABOVE
,
/**
* Place the content widget below a position
*/
BELOW
}
/**
* A position for rendering content widgets.
*/
export
interface
IContentWidgetPosition
{
/**
* Desired position which serves as an anchor for placing the content widget.
* The widget will be placed above, at, or below the specified position, based on the
* provided preference. The widget will always touch this position.
*
* Given sufficient horizontal space, the widget will be placed to the right of the
* passed in position. This can be tweaked by providing a `secondaryPosition`.
*
* @see preference
* @see secondaryPosition
*/
:
|
null
;
/**
* Optionally, a secondary position can be provided to further define the placing of
* the content widget. The secondary position must have the same line number as the
* primary position. If possible, the widget will be placed such that it also touches
* the secondary position.
*/
?
:
|
null
;
/**
* Placement preference for position, in order of preference.
*/
:
[
]
;
/**
* Placement preference when multiple view positions refer to the same (model) position.
* This plays a role when injected text is involved.
*/
?
:
;
}
/**
* A content widget renders inline with the text and can be easily placed 'near' an editor position.
*/
export
interface
IContentWidget
{
/**
* Render this content widget in a location where it could overflow the editor's view dom node.
*/
?
:
boolean
;
/**
* If true, this widget doesn't have a visual representation.
* The element will have display set to 'none'.
*/
?
:
boolean
;
/**
* Call preventDefault() on mousedown events that target the content widget.
*/
?
:
boolean
;
/**
* Get a unique identifier of the content widget.
*/
getId
(
)
:
string
;
/**
* Get the dom node of the content widget.
*/
getDomNode
(
)
:
;
/**
* Get the placement of the content widget.
* If null is returned, the content widget will be placed off screen.
*/
getPosition
(
)
:
|
null
;
/**
* Optional function that is invoked before rendering
* the content widget. If a dimension is returned the editor will
* attempt to use it.
*/
?
(
)
:
|
null
;
/**
* Optional function that is invoked after rendering the content
* widget. Is being invoked with the selected position preference
* or `null` if not rendered.
*/
?
(
:
|
null
,
:
|
null
)
:
void
;
}
/**
* Coordinatees passed in {@link IContentWidget.afterRender}
*/
export
interface
IContentWidgetRenderedCoordinate
{
/**
* Top position relative to the editor content.
*/
readonly
:
number
;
/**
* Left position relative to the editor content.
*/
readonly
:
number
;
}
/**
* A positioning preference for rendering overlay widgets.
*/
export
const
enum
{
/**
* Position the overlay widget in the top right corner
*/
TOP_RIGHT_CORNER
,
/**
* Position the overlay widget in the bottom right corner
*/
BOTTOM_RIGHT_CORNER
,
/**
* Position the overlay widget in the top center
*/
TOP_CENTER
}
/**
* Represents editor-relative coordinates of an overlay widget.
*/
export
interface
IOverlayWidgetPositionCoordinates
{
/**
* The top position for the overlay widget, relative to the editor.
*/
:
number
;
/**
* The left position for the overlay widget, relative to the editor.
*/
:
number
;
}
/**
* A position for rendering overlay widgets.
*/
export
interface
IOverlayWidgetPosition
{
/**
* The position preference for the overlay widget.
*/
:
|
|
null
;
/**
* When set, stacks with other overlay widgets with the same preference,
* in an order determined by the ordinal value.
*/
?
:
number
;
}
/**
* An overlay widgets renders on top of the text.
*/
export
interface
IOverlayWidget
{
/**
* Event fired when the widget layout changes.
*/
readonly
?
:
<
void
>
;
/**
* Render this overlay widget in a location where it could overflow the editor's view dom node.
*/
?
:
boolean
;
/**
* Get a unique identifier of the overlay widget.
*/
getId
(
)
:
string
;
/**
* Get the dom node of the overlay widget.
*/
getDomNode
(
)
:
;
/**
* Get the placement of the overlay widget.
* If null is returned, the overlay widget is responsible to place itself.
*/
getPosition
(
)
:
|
null
;
/**
* The editor will ensure that the scroll width is >= than this value.
*/
?
(
)
:
number
;
}
/**
* A glyph margin widget renders in the editor glyph margin.
*/
export
interface
IGlyphMarginWidget
{
/**
* Get a unique identifier of the glyph widget.
*/
getId
(
)
:
string
;
/**
* Get the dom node of the glyph widget.
*/
getDomNode
(
)
:
;
/**
* Get the placement of the glyph widget.
*/
getPosition
(
)
:
;
}
/**
* A position for rendering glyph margin widgets.
*/
export
interface
IGlyphMarginWidgetPosition
{
/**
* The glyph margin lane where the widget should be shown.
*/
:
;
/**
* The priority order of the widget, used for determining which widget
* to render when there are multiple.
*/
:
number
;
/**
* The editor range that this widget applies to.
*/
:
;
}
/**
* Type of hit element with the mouse in the editor.
*/
export
const
enum
{
/**
* Mouse is on top of an unknown element.
*/
UNKNOWN
,
/**
* Mouse is on top of the textarea used for input.
*/
TEXTAREA
,
/**
* Mouse is on top of the glyph margin
*/
GUTTER_GLYPH_MARGIN
,
/**
* Mouse is on top of the line numbers
*/
GUTTER_LINE_NUMBERS
,
/**
* Mouse is on top of the line decorations
*/
GUTTER_LINE_DECORATIONS
,
/**
* Mouse is on top of the whitespace left in the gutter by a view zone.
*/
GUTTER_VIEW_ZONE
,
/**
* Mouse is on top of text in the content.
*/
CONTENT_TEXT
,
/**
* Mouse is on top of empty space in the content (e.g. after line text or below last line)
*/
CONTENT_EMPTY
,
/**
* Mouse is on top of a view zone in the content.
*/
CONTENT_VIEW_ZONE
,
/**
* Mouse is on top of a content widget.
*/
CONTENT_WIDGET
,
/**
* Mouse is on top of the decorations overview ruler.
*/
OVERVIEW_RULER
,
/**
* Mouse is on top of a scrollbar.
*/
SCROLLBAR
,
/**
* Mouse is on top of an overlay widget.
*/
OVERLAY_WIDGET
,
/**
* Mouse is outside of the editor.
*/
OUTSIDE_EDITOR
,
}
export
interface
IBaseMouseTarget
{
/**
* The target element
*/
readonly
:
|
null
;
/**
* The 'approximate' editor position
*/
readonly
:
|
null
;
/**
* Desired mouse column (e.g. when position.column gets clamped to text length -- clicking after text on a line).
*/
readonly
:
number
;
/**
* The 'approximate' editor range
*/
readonly
:
|
null
;
}
export
interface
IMouseTargetUnknown
extends
IBaseMouseTarget
{
readonly
:
.
UNKNOWN
;
}
export
interface
IMouseTargetTextarea
extends
IBaseMouseTarget
{
readonly
:
.
TEXTAREA
;
readonly
:
null
;
readonly
:
null
;
}
export
interface
IMouseTargetMarginData
{
readonly
:
boolean
;
readonly
:
number
;
readonly
:
number
;
readonly
?
:
;
readonly
:
number
;
readonly
:
number
;
}
export
interface
IMouseTargetMargin
extends
IBaseMouseTarget
{
readonly
:
.
GUTTER_GLYPH_MARGIN
|
.
GUTTER_LINE_NUMBERS
|
.
GUTTER_LINE_DECORATIONS
;
readonly
:
;
readonly
:
;
readonly
:
;
}
export
interface
IMouseTargetViewZoneData
{
readonly
:
string
;
readonly
:
|
null
;
readonly
:
|
null
;
readonly
:
;
readonly
:
number
;
}
export
interface
IMouseTargetViewZone
extends
IBaseMouseTarget
{
readonly
:
.
GUTTER_VIEW_ZONE
|
.
CONTENT_VIEW_ZONE
;
readonly
:
;
readonly
:
;
readonly
:
;
}
export
interface
IMouseTargetContentTextData
{
readonly
:
boolean
;
/**
* @internal
*/
readonly
:
|
null
;
}
export
interface
IMouseTargetContentText
extends
IBaseMouseTarget
{
readonly
:
.
CONTENT_TEXT
;
readonly
:
;
readonly
:
;
readonly
:
;
}
export
interface
IMouseTargetContentEmptyData
{
readonly
:
boolean
;
readonly
?
:
number
;
}
export
interface
IMouseTargetContentEmpty
extends
IBaseMouseTarget
{
readonly
:
.
CONTENT_EMPTY
;
readonly
:
;
readonly
:
;
readonly
:
;
}
export
interface
IMouseTargetContentWidget
extends
IBaseMouseTarget
{
readonly
:
.
CONTENT_WIDGET
;
readonly
:
null
;
readonly
:
null
;
readonly
:
string
;
}
export
interface
IMouseTargetOverlayWidget
extends
IBaseMouseTarget
{
readonly
:
.
OVERLAY_WIDGET
;
readonly
:
null
;
readonly
:
null
;
readonly
:
string
;
}
export
interface
IMouseTargetScrollbar
extends
IBaseMouseTarget
{
readonly
:
.
SCROLLBAR
;
readonly
:
;
readonly
:
;
}
export
interface
IMouseTargetOverviewRuler
extends
IBaseMouseTarget
{
readonly
:
.
OVERVIEW_RULER
;
}
export
interface
IMouseTargetOutsideEditor
extends
IBaseMouseTarget
{
readonly
:
.
OUTSIDE_EDITOR
;
readonly
:
'above'
|
'below'
|
'left'
|
'right'
;
readonly
:
number
;
}
/**
* Target hit with the mouse in the editor.
*/
export
type
IMouseTarget
=
(
|
|
|
|
|
|
|
|
|
|
)
;
/**
* A mouse event originating from the editor.
*/
export
interface
IEditorMouseEvent
{
readonly
:
;
readonly
:
;
}
export
interface
IPartialEditorMouseEvent
{
readonly
:
;
readonly
:
|
null
;
}
/**
* A paste event originating from the editor.
*/
export
interface
IPasteEvent
{
readonly
:
;
readonly
:
string
|
null
;
readonly
?
:
;
}
/**
* @internal
*/
export
interface
PastePayload
{
:
string
;
:
boolean
;
:
string
[
]
|
null
;
:
string
|
null
;
?
:
;
}
/**
* An overview ruler
* @internal
*/
export
interface
IOverviewRuler
{
getDomNode
(
)
:
;
dispose
(
)
:
void
;
setZones
(
:
[
]
)
:
void
;
setLayout
(
:
)
:
void
;
}
/**
* Editor aria options.
* @internal
*/
export
interface
IEditorAriaOptions
{
:
string
|
undefined
;
?
:
string
;
}
export
interface
IDiffEditorConstructionOptions
extends
IDiffEditorOptions
,
{
/**
* Place overflow widgets inside an external DOM node.
* Defaults to an internal DOM node.
*/
?
:
;
/**
* Aria label for original editor.
*/
?
:
string
;
/**
* Aria label for modified editor.
*/
?
:
string
;
}
/**
* A rich code editor.
*/
export
interface
ICodeEditor
extends
editorCommon
.
{
/**
* This editor is used as an alternative to an <input> box, i.e. as a simple widget.
* @internal
*/
readonly
:
boolean
;
/**
* The context menu ID that should be used to lookup context menu actions.
* @internal
*/
/**
* An event emitted when the content of the current model has changed.
* @event
*/
readonly
:
<
>
;
/**
* An event emitted when the language of the current model has changed.
* @event
*/
readonly
:
<
>
;
/**
* An event emitted when the language configuration of the current model has changed.
* @event
*/
readonly
:
<
>
;
/**
* An event emitted when the options of the current model has changed.
* @event
*/
readonly
:
<
>
;
/**
* An event emitted when the configuration of the editor has changed. (e.g. `editor.updateOptions()`)
* @event
*/
readonly
:
<
>
;
/**
* An event emitted when the cursor position has changed.
* @event
*/
readonly
:
<
>
;
/**
* An event emitted when the cursor selection has changed.
* @event
*/
readonly
:
<
>
;
/**
* An event emitted when the model of this editor is about to change (e.g. from `editor.setModel()`).
* @event
*/
readonly
:
<
.
>
;
/**
* An event emitted when the model of this editor has changed (e.g. `editor.setModel()`).
* @event
*/
readonly
:
<
.
>
;
/**
* An event emitted when the decorations of the current model have changed.
* @event
*/
readonly
:
<
>
;
/**
* An event emitted when the tokens of the current model have changed.
* @internal
*/
readonly
:
<
>
;
/**
* An event emitted when the text inside this editor gained focus (i.e. cursor starts blinking).
* @event
*/
readonly
:
<
void
>
;
/**
* An event emitted when the text inside this editor lost focus (i.e. cursor stops blinking).
* @event
*/
readonly
:
<
void
>
;
/**
* An event emitted when the text inside this editor or an editor widget gained focus.
* @event
*/
readonly
:
<
void
>
;
/**
* An event emitted when the text inside this editor or an editor widget lost focus.
* @event
*/
readonly
:
<
void
>
;
/**
* An event emitted before interpreting typed characters (on the keyboard).
* @event
* @internal
*/
readonly
:
<
string
>
;
/**
* An event emitted after interpreting typed characters (on the keyboard).
* @event
* @internal
*/
readonly
:
<
string
>
;
/**
* Boolean indicating whether input is in composition
*/
readonly
:
boolean
;
/**
* An event emitted after composition has started.
*/
readonly
:
<
void
>
;
/**
* An event emitted after composition has ended.
*/
readonly
:
<
void
>
;
/**
* An event emitted when editing failed because the editor is read-only.
* @event
*/
readonly
:
<
void
>
;
/**
* An event emitted when users paste text in the editor.
* @event
*/
readonly
:
<
>
;
/**
* An event emitted before clipboard copy operation starts.
* @internal
* @event
*/
readonly
:
<
>
;
/**
* An event emitted before clipboard cut operation starts.
* @internal
* @event
*/
readonly
:
<
>
;
/**
* An event emitted before clipboard paste operation starts.
* @internal
* @event
*/
readonly
:
<
>
;
/**
* An event emitted on a "mouseup".
* @event
*/
readonly
:
<
>
;
/**
* An event emitted on a "mousedown".
* @event
*/
readonly
:
<
>
;
/**
* An event emitted on a "mousedrag".
* @internal
* @event
*/
readonly
:
<
>
;
/**
* An event emitted on a "mousedrop".
* @internal
* @event
*/
readonly
:
<
>
;
/**
* An event emitted on a "mousedropcanceled".
* @internal
* @event
*/
readonly
:
<
void
>
;
/**
* An event emitted when content is dropped into the editor.
* @internal
* @event
*/
readonly
:
<
{
readonly
:
;
readonly
:
}
>
;
/**
* An event emitted on a "contextmenu".
* @event
*/
readonly
:
<
>
;
/**
* An event emitted on a "mousemove".
* @event
*/
readonly
:
<
>
;
/**
* An event emitted on a "mouseleave".
* @event
*/
readonly
:
<
>
;
/**
* An event emitted on a "mousewheel"
* @event
* @internal
*/
readonly
:
<
>
;
/**
* An event emitted on a "keyup".
* @event
*/
readonly
:
<
>
;
/**
* An event emitted on a "keydown".
* @event
*/
readonly
:
<
>
;
/**
* An event emitted when the layout of the editor has changed.
* @event
*/
readonly
:
<
>
;
/**
* An event emitted when the content width or content height in the editor has changed.
* @event
*/
readonly
:
<
.
>
;
/**
* An event emitted when the scroll in the editor has changed.
* @event
*/
readonly
:
<
.
>
;
/**
* An event emitted when hidden areas change in the editor (e.g. due to folding).
* @event
*/
readonly
:
<
void
>
;
/**
* An event emitted before an editor
* @internal
*/
readonly
:
<
.
>
;
/**
* Some editor operations fire multiple events at once.
* To allow users to react to multiple events fired by a single operation,
* the editor fires a begin update before the operation and an end update after the operation.
* Whenever the editor fires `onBeginUpdate`, it will also fire `onEndUpdate` once the operation finishes.
* Note that not all operations are bracketed by `onBeginUpdate` and `onEndUpdate`.
*/
readonly
:
<
void
>
;
/**
* Fires after the editor completes the operation it fired `onBeginUpdate` for.
*/
readonly
:
<
void
>
;
readonly
:
<
void
>
;
/**
* Saves current view state of the editor in a serializable object.
*/
saveViewState
(
)
:
.
|
null
;
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState
(
:
.
|
null
)
:
void
;
/**
* Returns true if the text inside this editor or an editor widget has focus.
*/
hasWidgetFocus
(
)
:
boolean
;
/**
* Get a contribution of this editor.
* @id Unique identifier of the contribution.
* @return The contribution or null if contribution not found.
*/
/**
* Execute `fn` with the editor's services.
* @internal
*/
invokeWithinContext<T>
(
fn
:
(
:
)
=>
T
)
:
T
;
/**
* Type the getModel() of IEditor.
*/
getModel
(
)
:
|
null
;
/**
* Sets the current model attached to this editor.
* If the previous model was created by the editor via the value key in the options
* literal object, it will be destroyed. Otherwise, if the previous model was set
* via setModel, or the model key in the options literal object, the previous model
* will not be destroyed.
* It is safe to call setModel(null) to simply detach the current model from the editor.
*/
setModel
(
:
|
null
)
:
void
;
/**
* Gets all the editor computed options.
*/
getOptions
(
)
:
;
/**
* Gets a specific editor option.
*/
getOption<Textends EditorOption>
(
:
T
)
:
<
T
>
;
/**
* Returns the editor's configuration (without any validation or defaults).
*/
getRawOptions
(
)
:
;
/**
* @internal
*/
getOverflowWidgetsDomNode
(
)
:
|
undefined
;
/**
* @internal
*/
getConfiguredWordAtPosition
(
:
)
:
|
null
;
/**
* An event emitted when line heights from decorations change
* @internal
* @event
*/
readonly
:
<
>
;
/**
* An event emitted when the font of the editor has changed.
* @internal
* @event
*/
readonly
:
<
>
;
/**
* Get value of the current model attached to this editor.
* @see{@link ITextModel.getValue}
*/
getValue
(
?
:
{
:
boolean
;
:
string
}
)
:
string
;
/**
* Set the value of the current model attached to this editor.
* @see{@link ITextModel.setValue}
*/
setValue
(
:
string
)
:
void
;
/**
* Get the width of the editor's content.
* This is information that is "erased" when computing `scrollWidth = Math.max(contentWidth, width)`
*/
getContentWidth
(
)
:
number
;
/**
* Get the scrollWidth of the editor's viewport.
*/
getScrollWidth
(
)
:
number
;
/**
* Get the scrollLeft of the editor's viewport.
*/
getScrollLeft
(
)
:
number
;
/**
* Get the height of the editor's content.
* This is information that is "erased" when computing `scrollHeight = Math.max(contentHeight, height)`
*/
getContentHeight
(
)
:
number
;
/**
* Get the scrollHeight of the editor's viewport.
*/
getScrollHeight
(
)
:
number
;
/**
* Get the scrollTop of the editor's viewport.
*/
getScrollTop
(
)
:
number
;
/**
* Change the scrollLeft of the editor's viewport.
*/
setScrollLeft
(
:
number
,
?
:
.
)
:
void
;
/**
* Change the scrollTop of the editor's viewport.
*/
setScrollTop
(
:
number
,
?
:
.
)
:
void
;
/**
* Change the scroll position of the editor's viewport.
*/
setScrollPosition
(
:
.
,
?
:
.
)
:
void
;
/**
* Check if the editor is currently scrolling towards a different scroll position.
*/
hasPendingScrollAnimation
(
)
:
boolean
;
/**
* Get an action that is a contribution to this editor.
* @id Unique identifier of the contribution.
* @return The action or null if action not found.
*/
getAction
(
:
string
)
:
.
|
null
;
/**
* Execute a command on the editor.
* The edits will land on the undo-redo stack, but no "undo stop" will be pushed.
* @paramsource The source of the call.
* @paramcommand The command to execute
*/
executeCommand
(
:
string
|
null
|
undefined
,
:
.
)
:
void
;
/**
* Create an "undo stop" in the undo-redo stack.
*/
pushUndoStop
(
)
:
boolean
;
/**
* Remove the "undo stop" in the undo-redo stack.
*/
popUndoStop
(
)
:
boolean
;
/**
* Execute edits on the editor.
* The edits will land on the undo-redo stack, but no "undo stop" will be pushed.
* @paramsource The source of the call.
* @paramedits The edits to execute.
* @paramendCursorState Cursor state after the edits were applied.
*/
executeEdits
(
:
string
|
null
|
undefined
,
:
[
]
,
?
:
|
[
]
)
:
boolean
;
/** @internal */
executeEdits
(
:
|
undefined
,
:
[
]
,
?
:
|
[
]
)
:
boolean
;
/**
* @internal
*/
edit
(
:
,
:
)
:
void
;
/**
* Execute multiple (concomitant) commands on the editor.
* @paramsource The source of the call.
* @paramcommand The commands to execute
*/
executeCommands
(
:
string
|
null
|
undefined
,
:
(
.
|
null
)
[
]
)
:
void
;
/**
* Scroll vertically or horizontally as necessary and reveal the current cursors.
*/
revealAllCursors
(
:
boolean
,
?
:
boolean
)
:
void
;
/**
* @internal
*/
_getViewModel
(
)
:
|
null
;
/**
* Get all the decorations on a line (filtering out decorations from other editors).
*/
getLineDecorations
(
:
number
)
:
[
]
|
null
;
/**
* Get all the decorations for a range (filtering out decorations from other editors).
*/
getDecorationsInRange
(
:
)
:
[
]
|
null
;
/**
* Get the font size at a given position
* @paramposition the position for which to fetch the font size
*/
getFontSizeAtPosition
(
:
)
:
string
|
null
;
/**
* All decorations added through this call will get the ownerId of this editor.
* @deprecated Use `createDecorationsCollection`
* @see createDecorationsCollection
*/
deltaDecorations
(
:
string
[
]
,
:
[
]
)
:
string
[
]
;
/**
* Remove previously added decorations.
*/
removeDecorations
(
:
string
[
]
)
:
void
;
/**
* @internal
*/
setDecorationsByType
(
:
string
,
:
string
,
:
.
[
]
)
:
readonly
string
[
]
;
/**
* @internal
*/
setDecorationsByTypeFast
(
:
string
,
:
[
]
)
:
void
;
/**
* @internal
*/
removeDecorationsByType
(
:
string
)
:
void
;
/**
* Get the layout info for the editor.
*/
getLayoutInfo
(
)
:
;
/**
* Returns the ranges that are currently visible.
* Does not account for horizontal scrolling.
*/
getVisibleRanges
(
)
:
[
]
;
/**
* @internal
*/
getVisibleRangesPlusViewportAboveBelow
(
)
:
[
]
;
/**
* Get the view zones.
* @internal
*/
getWhitespaces
(
)
:
[
]
;
/**
* Get the vertical position (top offset) for the line's top w.r.t. to the first line.
*/
getTopForLineNumber
(
:
number
,
?
:
boolean
)
:
number
;
/**
* Get the vertical position (top offset) for the line's bottom w.r.t. to the first line.
*/
getBottomForLineNumber
(
:
number
)
:
number
;
/**
* Get the vertical position (top offset) for the position w.r.t. to the first line.
*/
getTopForPosition
(
:
number
,
:
number
)
:
number
;
/**
* Get the line height for a model position.
*/
getLineHeightForPosition
(
:
)
:
number
;
/**
* Set the model ranges that will be hidden in the view.
* Hidden areas are stored per source.
* @internal
*/
setHiddenAreas
(
:
[
]
,
?
:
unknown
)
:
void
;
/**
* Sets the editor aria options, primarily the active descendent.
* @internal
*/
setAriaOptions
(
:
)
:
void
;
/**
* Write the screen reader content to be the current selection
*/
writeScreenReaderContent
(
:
string
)
:
void
;
/**
* @internal
*/
getTelemetryData
(
)
:
|
undefined
;
/**
* Returns the editor's container dom node
*/
getContainerDomNode
(
)
:
;
/**
* Returns the editor's dom node
*/
getDomNode
(
)
:
|
null
;
/**
* Add a content widget. Widgets must have unique ids, otherwise they will be overwritten.
*/
addContentWidget
(
:
)
:
void
;
/**
* Layout/Reposition a content widget. This is a ping to the editor to call widget.getPosition()
* and update appropriately.
*/
layoutContentWidget
(
:
)
:
void
;
/**
* Remove a content widget.
*/
removeContentWidget
(
:
)
:
void
;
/**
* Add an overlay widget. Widgets must have unique ids, otherwise they will be overwritten.
*/
addOverlayWidget
(
:
)
:
void
;
/**
* Layout/Reposition an overlay widget. This is a ping to the editor to call widget.getPosition()
* and update appropriately.
*/
layoutOverlayWidget
(
:
)
:
void
;
/**
* Remove an overlay widget.
*/
removeOverlayWidget
(
:
)
:
void
;
/**
* Add a glyph margin widget. Widgets must have unique ids, otherwise they will be overwritten.
*/
addGlyphMarginWidget
(
:
)
:
void
;
/**
* Layout/Reposition a glyph margin widget. This is a ping to the editor to call widget.getPosition()
* and update appropriately.
*/
layoutGlyphMarginWidget
(
:
)
:
void
;
/**
* Remove a glyph margin widget.
*/
removeGlyphMarginWidget
(
:
)
:
void
;
/**
* Change the view zones. View zones are lost when a new model is attached to the editor.
*/
changeViewZones
(
callback
:
(
:
)
=>
void
)
:
void
;
/**
* Get the horizontal position (left offset) for the column w.r.t to the beginning of the line.
* This method works only if the line `lineNumber` is currently rendered (in the editor's viewport).
* Use this method with caution.
*/
getOffsetForColumn
(
:
number
,
:
number
)
:
number
;
getWidthOfLine
(
:
number
)
:
number
;
/**
* Reset cached line widths. Call this when the editor becomes visible after being hidden.
* @internal
*/
resetLineWidthCaches
(
)
:
void
;
/**
* Force an editor render now.
*/
render
(
?
:
boolean
)
:
void
;
/**
* Render the editor at the next animation frame.
*/
renderAsync
(
?
:
boolean
)
:
void
;
/**
* Get the hit test target at coordinates `clientX` and `clientY`.
* The coordinates are relative to the top-left of the viewport.
*
* @returns Hit test target or null if the coordinates fall outside the editor or the editor has no model.
*/
getTargetAtClientPoint
(
:
number
,
:
number
)
:
|
null
;
/**
* Get the visible position for `position`.
* The result position takes scrolling into account and is relative to the top left corner of the editor.
* Explanation 1: the results of this method will change for the same `position` if the user scrolls the editor.
* Explanation 2: the results of this method will not change if the container of the editor gets repositioned.
* Warning: the results of this method are inaccurate for positions that are outside the current editor viewport.
*/
getScrolledVisiblePosition
(
:
)
:
{
:
number
;
:
number
;
:
number
}
|
null
;
/**
* Apply the same font settings as the editor to `target`.
*/
applyFontInfo
(
:
)
:
void
;
/**
* Check if the current instance has a model attached.
* @internal
*/
hasModel
(
)
:
this
is
;
setBanner
(
:
|
null
,
:
number
)
:
void
;
/**
* Is called when the model has been set, view state was restored and options are updated.
* This is the best place to compute data for the viewport (such as tokens).
*/
?
(
)
:
void
;
}
/**
* @internal
*/
export
interface
IActiveCodeEditor
extends
ICodeEditor
{
/**
* Returns the primary position of the cursor.
*/
getPosition
(
)
:
;
/**
* Returns the primary selection of the editor.
*/
getSelection
(
)
:
;
/**
* Returns all the selections of the editor.
*/
getSelections
(
)
:
[
]
;
/**
* Saves current view state of the editor in a serializable object.
*/
saveViewState
(
)
:
.
;
/**
* Type the getModel() of IEditor.
*/
getModel
(
)
:
;
/**
* @internal
*/
_getViewModel
(
)
:
;
/**
* Get all the decorations on a line (filtering out decorations from other editors).
*/
getLineDecorations
(
:
number
)
:
[
]
;
/**
* Returns the editor's dom node
*/
getDomNode
(
)
:
;
/**
* Get the visible position for `position`.
* The result position takes scrolling into account and is relative to the top left corner of the editor.
* Explanation 1: the results of this method will change for the same `position` if the user scrolls the editor.
* Explanation 2: the results of this method will not change if the container of the editor gets repositioned.
* Warning: the results of this method are inaccurate for positions that are outside the current editor viewport.
*/
getScrolledVisiblePosition
(
:
)
:
{
:
number
;
:
number
;
:
number
}
;
/**
* Change the decorations. All decorations added through this changeAccessor
* will get the ownerId of the editor (meaning they will not show up in other
* editors).
* @see{@link ITextModel.changeDecorations}
* @internal
*/
changeDecorations<T>
(
callback
:
(
:
)
=>
T
)
:
T
;
}
/**
* @internal
*/
export
const
enum
{
,
,
}
/**
* A rich diff editor.
*/
export
interface
IDiffEditor
extends
editorCommon
.
{
/**
* Returns whether the diff editor is ignoring trim whitespace or not.
* @internal
*/
readonly
:
boolean
;
/**
* Returns whether the diff editor is rendering side by side or inline.
* @internal
*/
readonly
:
boolean
;
/**
* Timeout in milliseconds after which diff computation is cancelled.
* @internal
*/
/**
* An event emitted when the diff information computed by this diff editor has been updated.
* @event
*/
readonly
:
<
void
>
;
/**
* An event emitted when the diff model is changed (i.e. the diff editor shows new content).
* @event
*/
readonly
:
<
void
>
;
/**
* Saves current view state of the editor in a serializable object.
*/
saveViewState
(
)
:
.
|
null
;
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState
(
:
.
|
null
)
:
void
;
/**
* Type the getModel() of IEditor.
*/
getModel
(
)
:
.
|
null
;
createViewModel
(
:
.
)
:
.
;
/**
* Sets the current model attached to this editor.
* If the previous model was created by the editor via the value key in the options
* literal object, it will be destroyed. Otherwise, if the previous model was set
* via setModel, or the model key in the options literal object, the previous model
* will not be destroyed.
* It is safe to call setModel(null) to simply detach the current model from the editor.
*/
setModel
(
:
.
|
.
|
null
)
:
void
;
/**
* Get the `original` editor.
*/
getOriginalEditor
(
)
:
;
/**
* Get the `modified` editor.
*/
getModifiedEditor
(
)
:
;
/**
* Get the computed diff information.
*/
getLineChanges
(
)
:
[
]
|
null
;
/**
* Get the computed diff information.
* @internal
*/
getDiffComputationResult
(
)
:
|
null
;
/**
* Update the editor's options after the editor has been created.
*/
updateOptions
(
:
)
:
void
;
/**
* @internal
*/
setBoundarySashes
(
:
)
:
void
;
/**
* Jumps to the next or previous diff.
*/
goToDiff
(
:
'next'
|
'previous'
)
:
void
;
/**
* Scrolls to the first diff.
* (Waits until the diff computation finished.)
*/