Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(622)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js

Issue 2281703002: DevTools: Create TextEditor Interface around CodeMirrorTextEditor (Closed)
Patch Set: Remove stray textEditorBracketMatching Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js b/third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js
new file mode 100644
index 0000000000000000000000000000000000000000..a82c295478a4b571b9934bcba3f89bb198e8d428
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TextEditor.js
@@ -0,0 +1,89 @@
+/**
+ * @interface
+ */
+WebInspector.TextEditorFactory = function() { }
+
+WebInspector.TextEditorFactory.prototype = {
+ /**
+ * @param {!WebInspector.TextEditor.Options} options
+ * @return {!WebInspector.TextEditor}
+ */
+ createEditor: function(options) { }
+}
+
+/**
+ * @interface
+ */
+WebInspector.TextEditor = function()
+{
+}
+WebInspector.TextEditor.prototype = {
+
+ /**
+ * @return {!WebInspector.Widget}
+ */
+ widget: function() { },
+
+ /**
+ * @return {!WebInspector.TextRange}
+ */
+ range: function(){ },
dgozman 2016/08/26 19:03:24 fullRange?
einbinder 2016/08/26 23:05:33 Done.
+
+ /**
+ * @return {!WebInspector.TextRange}
+ */
+ selection: function() { },
+
+ /**
+ * @param {!WebInspector.TextRange} selection
+ */
+ setSelection: function(selection) { },
+
+ /**
+ * @param {!WebInspector.TextRange=} textRange
+ * @return {string}
+ */
+ text: function(textRange) { },
+
+ /**
+ * @param {string} text
+ */
+ setText: function(text) { },
lushnikov 2016/08/26 23:11:52 nit: we can make this accept a range as a second o
einbinder 2016/08/27 02:20:04 The editRange and setText functions seem similar t
+
+ /**
+ * @param {number} lineNumber
+ * @return {string}
+ */
+ line: function(lineNumber) { },
+
+ /**
+ * @param {function(!KeyboardEvent)} handler
+ */
+ onKeyDown: function(handler) { },
dgozman 2016/08/26 19:03:24 addKeyDownHandler
einbinder 2016/08/26 23:05:33 Done.
+
+ /**
+ * @param {?WebInspector.AutocompleteConfig} config
+ */
+ configureAutocomplete: function(config) { },
+
+ clearAutocomplete: function() { }
dgozman 2016/08/26 19:03:25 What is this one?
einbinder 2016/08/26 23:05:33 It clears the autocomplete, renamed from finishAut
+}
+
+/**
+ * @typedef {{
+ * bracketMatchingFlag: (string|undefined),
dgozman 2016/08/26 19:03:24 What does this string mean? Is it actually an enum
einbinder 2016/08/26 23:05:33 Replaced above with WI.Setting.
+ * lineNumbers: boolean,
+ * lineWrapping: boolean,
+ * mimeType: (string|undefined),
+ * }}
+ **/
+WebInspector.TextEditor.Options;
+
+/**
+ * @typedef {{
+ * substituteRangeCallback: ((function(number, number):?WebInspector.TextRange)|undefined),
+ * suggestionsCallback: ((function(!WebInspector.TextRange, !WebInspector.TextRange):?Promise.<!Array.<{title: string, className: (string|undefined)}>>)|undefined),
dgozman 2016/08/26 19:03:24 Why not use SuggestBox.Suggestions (or how it's ca
einbinder 2016/08/26 23:05:33 Closure yelled at me a lot and I gave up trying to
+ * isWordChar: ((function(string):boolean)|undefined),
+ * }}
+ **/
+WebInspector.AutocompleteConfig;

Powered by Google App Engine
This is Rietveld 408576698