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

Issue 1264133002: Devtools: [WIP] Implement enhanced devtools extension language APIs

Created:
5 years, 4 months ago by wes
Modified:
4 years, 5 months ago
Reviewers:
paulirish, caseq
CC:
apavlov+blink_chromium.org, blink-reviews, caseq+blink_chromium.org, devtools-reviews_chromium.org, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, sergeyv+blink_chromium.org, yurys+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Devtools: [WIP] Implement enhanced devtools extension language APIs I've been hoping to get some feedback on the APIs I've been prototyping here: https://gist.github.com/weswigham/5508b3532325d86c14bb These extend the devtools to add support for a number of IDE-esque features, the specific use cases I'm looking to fulfill with this are "Go to definition" and "Find all references" context menu actions, completions based on a language-specific service, live feedback on code correctness (a la red squiggles), and support for using the console and watch expressions in the source language which is being edited/debugged. (And, because it's on theme, specifying a new syntax highlighter for a language. I actually have a simple example of what I've been enabling in that regard here: https://gist.github.com/weswigham/722ae531865fe29e5e3b) I haven't gotten much feedback on the exact shape of the APIs yet, but what I have at present I've prototyped (most) out so we know what's needed and what's possible, and hope that seeing it will get people interested: http://ham.io/files/dt.mp4 (I've been writing a TypeScript extension in parallel with the API.) Context menu actions, completions, live code feedback, transpilation and completion support for the console and watch window, and custom syntax highlighters should all be possible with these changes. All if it could still use some work/cleaning/testing but it should do what it says on the tin. Notably: I have a _TON_ of TODOs/FIXMEs related to displaying search results (and a few others) - the internal API of the search pane was not meant for this use case and I've thus far shoehorned it into its new multipurpose role. I also need to write tests. :3 Still, it would be _really_ nice to get feedback on both the shape of the public API and what I should/shouldn't be mucking with internally. BUG=484261

Patch Set 1 #

Patch Set 2 : Implement the remainder of the proposed API #

Patch Set 3 : Modify override dropdown to apply to console completions & transpile #

Total comments: 91

Patch Set 4 : Still more refactoring to be done, but all suppress annotations are gone. Remaining refactoring inc… #

Patch Set 5 : Small cleanups - prefer URIs to contentURLs, revert protocol unifications, remove lambdas #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1890 lines, -90 lines) Patch
M Source/devtools/devtools.gypi View 1 2 3 5 chunks +8 lines, -0 lines 0 comments Download
M Source/devtools/front_end/Runtime.js View 1 1 chunk +8 lines, -0 lines 0 comments Download
M Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
A Source/devtools/front_end/cm/simple.js View 1 1 chunk +213 lines, -0 lines 0 comments Download
M Source/devtools/front_end/common/ResourceType.js View 1 2 3 4 3 chunks +53 lines, -1 line 0 comments Download
M Source/devtools/front_end/common/TextUtils.js View 1 2 3 1 chunk +28 lines, -0 lines 0 comments Download
M Source/devtools/front_end/components/ExecutionContextSelector.js View 1 2 chunks +4 lines, -2 lines 0 comments Download
A Source/devtools/front_end/components/SearchData.js View 1 2 3 1 chunk +62 lines, -0 lines 0 comments Download
M Source/devtools/front_end/components/module.json View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/devtools/front_end/console/ConsoleView.js View 1 2 3 3 chunks +6 lines, -1 line 0 comments Download
M Source/devtools/front_end/console/module.json View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/devtools/front_end/elements/StylesSidebarPane.js View 1 1 chunk +3 lines, -1 line 0 comments Download
M Source/devtools/front_end/es6.js View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/devtools/front_end/extensions/ExtensionAPI.js View 1 2 3 4 8 chunks +190 lines, -0 lines 0 comments Download
M Source/devtools/front_end/extensions/ExtensionServer.js View 1 2 3 4 13 chunks +255 lines, -3 lines 0 comments Download
M Source/devtools/front_end/extensions/module.json View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/devtools/front_end/externs.js View 1 1 chunk +6 lines, -0 lines 0 comments Download
M Source/devtools/front_end/inspector.json View 1 chunk +1 line, -0 lines 0 comments Download
A Source/devtools/front_end/languages/LanguageService.js View 1 2 3 4 1 chunk +373 lines, -0 lines 0 comments Download
A Source/devtools/front_end/languages/MultiLingualExecutionContext.js View 1 2 3 4 1 chunk +98 lines, -0 lines 0 comments Download
A Source/devtools/front_end/languages/module.json View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M Source/devtools/front_end/main/Main.js View 1 2 3 2 chunks +22 lines, -1 line 0 comments Download
M Source/devtools/front_end/resources/DatabaseQueryView.js View 1 1 chunk +3 lines, -1 line 0 comments Download
M Source/devtools/front_end/sdk/ConsoleModel.js View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/devtools/front_end/sdk/RuntimeModel.js View 1 2 3 1 chunk +14 lines, -1 line 0 comments Download
M Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js View 1 2 3 5 chunks +28 lines, -4 lines 0 comments Download
M Source/devtools/front_end/source_frame/ResourceSourceFrame.js View 1 chunk +8 lines, -0 lines 0 comments Download
M Source/devtools/front_end/source_frame/SourceFrame.js View 1 2 3 8 chunks +63 lines, -11 lines 0 comments Download
M Source/devtools/front_end/source_frame/TextEditorAutocompleteController.js View 1 2 3 5 chunks +53 lines, -6 lines 0 comments Download
M Source/devtools/front_end/source_frame/module.json View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M Source/devtools/front_end/sources/AdvancedSearchView.js View 1 2 3 4 1 chunk +57 lines, -0 lines 0 comments Download
M Source/devtools/front_end/sources/JavaScriptCompiler.js View 1 chunk +2 lines, -1 line 0 comments Download
M Source/devtools/front_end/sources/JavaScriptSourceFrame.js View 1 3 chunks +38 lines, -26 lines 0 comments Download
M Source/devtools/front_end/sources/SourcesPanel.js View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
M Source/devtools/front_end/sources/SourcesView.js View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M Source/devtools/front_end/sources/UISourceCodeFrame.js View 1 2 3 4 2 chunks +36 lines, -4 lines 0 comments Download
M Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M Source/devtools/front_end/sources/module.json View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M Source/devtools/front_end/ui/SuggestBox.js View 1 10 chunks +56 lines, -9 lines 0 comments Download
M Source/devtools/front_end/ui/TextPrompt.js View 1 3 chunks +3 lines, -3 lines 0 comments Download
M Source/devtools/front_end/ui/suggestBox.css View 2 chunks +39 lines, -0 lines 0 comments Download
M Source/devtools/front_end/workspace/UISourceCode.js View 1 2 3 2 chunks +63 lines, -6 lines 0 comments Download
M Source/devtools/front_end/workspace/Workspace.js View 2 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
wes
I would love to get some feedback on what's acceptable here. I'd really like to ...
5 years, 4 months ago (2015-08-12 19:29:41 UTC) #2
paulirish
This is great, Wes. Thank you. Pavel likes the shape of this so far. On ...
5 years, 4 months ago (2015-08-12 21:01:39 UTC) #3
pfeldman
This looks like a great start. Please find random comments below! https://codereview.chromium.org/1264133002/diff/40001/Source/devtools/front_end/Runtime.js File Source/devtools/front_end/Runtime.js (right): ...
5 years, 4 months ago (2015-08-13 21:15:47 UTC) #5
wes
I think I've commented regarding my questions/feelings/action items on most of your comments. I've also ...
5 years, 4 months ago (2015-08-14 00:55:06 UTC) #7
wes
more assorted comments https://codereview.chromium.org/1264133002/diff/40001/Source/devtools/front_end/bindings/NetworkMapping.js File Source/devtools/front_end/bindings/NetworkMapping.js (right): https://codereview.chromium.org/1264133002/diff/40001/Source/devtools/front_end/bindings/NetworkMapping.js#newcode99 Source/devtools/front_end/bindings/NetworkMapping.js:99: return this.uiSourceCodeForURLForAnyTarget(url) || this._workspace.uiSourceCodeForFilePath(url); On 2015/08/13 ...
5 years, 4 months ago (2015-08-14 01:13:32 UTC) #8
wes
misc comments https://codereview.chromium.org/1264133002/diff/40001/Source/devtools/front_end/Runtime.js File Source/devtools/front_end/Runtime.js (right): https://codereview.chromium.org/1264133002/diff/40001/Source/devtools/front_end/Runtime.js#newcode399 Source/devtools/front_end/Runtime.js:399: return this._modulesMap[moduleName] ? this._modulesMap[moduleName]._loaded : false; On ...
5 years, 4 months ago (2015-08-14 01:25:51 UTC) #9
pfeldman
Made a round of reviews. Since the change is large, lets try to extract the ...
5 years, 4 months ago (2015-08-17 21:15:52 UTC) #10
wes
Was out for a week, came back with more comments. Noticed nobody's looked at the ...
5 years, 4 months ago (2015-08-25 18:13:18 UTC) #11
pfeldman
5 years, 4 months ago (2015-08-25 21:30:21 UTC) #12
I think it makes sense to split this into a number of small CLs that we can
formally review and start landing. In the meanwhile, I'll go over the replies.

Powered by Google App Engine
This is Rietveld 408576698