mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-10 13:44:39 +08:00
This should make the suggest box obscure eager eval less often. Change-Id: I60573ed142947daa005f648c13d1c3a32f8d492b Reviewed-on: https://chromium-review.googlesource.com/1048025 Commit-Queue: Joel Einbinder <einbinder@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#558097} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: a5f5f164294fd4d330f9b6f758d8b73056684838
126 lines
2.6 KiB
JavaScript
126 lines
2.6 KiB
JavaScript
// Copyright 2016 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
/**
|
|
* @interface
|
|
*/
|
|
UI.TextEditorFactory = function() {};
|
|
|
|
UI.TextEditorFactory.prototype = {
|
|
/**
|
|
* @param {!UI.TextEditor.Options} options
|
|
* @return {!UI.TextEditor}
|
|
*/
|
|
createEditor(options) {}
|
|
};
|
|
|
|
/**
|
|
* @interface
|
|
* @extends {Common.EventTarget}
|
|
*/
|
|
UI.TextEditor = function() {};
|
|
|
|
UI.TextEditor.prototype = {
|
|
|
|
/**
|
|
* @return {!UI.Widget}
|
|
*/
|
|
widget() {},
|
|
|
|
/**
|
|
* @return {!TextUtils.TextRange}
|
|
*/
|
|
fullRange() {},
|
|
|
|
/**
|
|
* @return {!TextUtils.TextRange}
|
|
*/
|
|
selection() {},
|
|
|
|
/**
|
|
* @param {!TextUtils.TextRange} selection
|
|
*/
|
|
setSelection(selection) {},
|
|
|
|
/**
|
|
* @param {!TextUtils.TextRange=} textRange
|
|
* @return {string}
|
|
*/
|
|
text(textRange) {},
|
|
|
|
/**
|
|
* @return {string}
|
|
*/
|
|
textWithCurrentSuggestion() {},
|
|
|
|
/**
|
|
* @param {string} text
|
|
*/
|
|
setText(text) {},
|
|
|
|
/**
|
|
* @param {number} lineNumber
|
|
* @return {string}
|
|
*/
|
|
line(lineNumber) {},
|
|
|
|
newlineAndIndent() {},
|
|
|
|
/**
|
|
* @param {function(!KeyboardEvent)} handler
|
|
*/
|
|
addKeyDownHandler(handler) {},
|
|
|
|
/**
|
|
* @param {?UI.AutocompleteConfig} config
|
|
*/
|
|
configureAutocomplete(config) {},
|
|
|
|
clearAutocomplete() {},
|
|
|
|
/**
|
|
* @param {number} lineNumber
|
|
* @param {number} columnNumber
|
|
* @return {!{x: number, y: number}}
|
|
*/
|
|
visualCoordinates(lineNumber, columnNumber) {},
|
|
|
|
/**
|
|
* @param {number} lineNumber
|
|
* @param {number} columnNumber
|
|
* @return {?{startColumn: number, endColumn: number, type: string}}
|
|
*/
|
|
tokenAtTextPosition(lineNumber, columnNumber) {}
|
|
};
|
|
|
|
/** @enum {symbol} */
|
|
UI.TextEditor.Events = {
|
|
TextChanged: Symbol('TextChanged'),
|
|
SuggestionChanged: Symbol('SuggestionChanged')
|
|
};
|
|
|
|
/**
|
|
* @typedef {{
|
|
* bracketMatchingSetting: (!Common.Setting|undefined),
|
|
* lineNumbers: boolean,
|
|
* lineWrapping: boolean,
|
|
* mimeType: (string|undefined),
|
|
* autoHeight: (boolean|undefined),
|
|
* padBottom: (boolean|undefined),
|
|
* maxHighlightLength: (number|undefined),
|
|
* placeholder: (string|undefined)
|
|
* }}
|
|
*/
|
|
UI.TextEditor.Options;
|
|
|
|
/**
|
|
* @typedef {{
|
|
* substituteRangeCallback: ((function(number, number):?TextUtils.TextRange)|undefined),
|
|
* tooltipCallback: ((function(number, number):?Element)|undefined),
|
|
* suggestionsCallback: ((function(!TextUtils.TextRange, !TextUtils.TextRange, boolean=):?Promise.<!UI.SuggestBox.Suggestions>)|undefined),
|
|
* isWordChar: ((function(string):boolean)|undefined),
|
|
* anchorBehavior: (UI.GlassPane.AnchorBehavior|undefined)
|
|
* }}
|
|
*/
|
|
UI.AutocompleteConfig;
|