Commit Graph

64 Commits

Author SHA1 Message Date
Konstantin Shcheglov 8fa5567edb API for search.getElementDeclarations.
The goal is to provide clients (specifically VS Code) with API that
is fast, and can search top-level and class member declarations.

I'm not sure whether we want ElementKind, it has kinds that we will
not use, e.g. I don't think we will return local variables or
parameters.

It would be probably still a lot of information, maybe we should use
single string table in response?

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/29510
Change-Id: Ie31bb398a08d462c1cb08c7d82c4443c0c09932a
Reviewed-on: https://dart-review.googlesource.com/42105
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-17 04:27:52 +00:00
pq ad11e5d615 Re-generate Server APIs.
Previous change only updated the plugin; this catches up server.

Follow-up from: https://github.com/dart-lang/sdk/commit/bea00e5bb346918cb316febf2434c70176edf649



Change-Id: Iae2ec340ffe528d76c53198322d691320f507852
Reviewed-on: https://dart-review.googlesource.com/40501
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-11 18:28:27 +00:00
Konstantin Shcheglov ffd67154f7 Add a new optional field - 'id' to SourceChange.
R=brianwilkerson@google.com

Change-Id: Ibe85415be35982327593ffd1187ec74b1d037463
Reviewed-on: https://dart-review.googlesource.com/40102
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-02-08 20:13:11 +00:00
Konstantin Shcheglov 8fbcf977e5 Replace license in generated files.
R=devoncarew@google.com

Change-Id: I7511c8da329eba760698a48abc0f8db16038b9ea
Reviewed-on: https://dart-review.googlesource.com/37127
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-27 03:18:18 +00:00
Konstantin Shcheglov 402af4db46 Add a new experimental 'flutter' domain and move FLUTTER_OUTLINE there.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I8f829f10a630e38c5a3f1638d077e37832a08daa
Reviewed-on: https://dart-review.googlesource.com/36320
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-01-23 00:57:55 +00:00
Konstantin Shcheglov a971aa8472 Add basic Flutter outline subscription/notification to the protocol.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I50d7e4507c58854b4f2afc6048285c68ee873b8b
Reviewed-on: https://dart-review.googlesource.com/36024
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-19 23:22:17 +00:00
Devon Carew 47a861ca85 Add two new element types to the protocol.
Bug:
Change-Id: I5a60081d7c8500590bbabb9ee6dce74fa611b0a3
Reviewed-on: https://dart-review.googlesource.com/14883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-18 19:02:47 +00:00
Devon Carew a5c2256455 Send test element kinds for test outline items.
Bug:
Change-Id: Iebea8d4b9705c726e297722ef1678e1a2cd1ea96
Reviewed-on: https://dart-review.googlesource.com/12841
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-11 17:00:41 +00:00
Brian Wilkerson 37042bb59b Add an integration test for kythe support with bug fixes
R=jwren@google.com

Review-Url: https://codereview.chromium.org/3006693002 .
2017-08-28 10:07:04 -07:00
Brian Wilkerson 8c8969db4c Forward Kythe requests to plugins and merge in the results
R=jwren@google.com

Review-Url: https://codereview.chromium.org/3000823002 .
2017-08-12 08:16:34 -07:00
Jaime Wren 8a426f3d67 Initial experimental Kythe Dart Analysis Server protocol
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2995683002 .
2017-08-09 12:44:59 -07:00
Danny Tuppeny c4420a8943 Add "closing labels" to API spec. (#30332)
* Add "closing labels" to API spec.

See #30285

* Re-generate spec after adding "closing labels".

See 30285
2017-08-08 11:54:37 -07:00
Brian Wilkerson c618032a69 Remove the uri from the ImportedElements object in the experimental spec API
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2991893002 .
2017-07-27 12:52:38 -07:00
Brian Wilkerson fe445e079e Add a generated file that was missed
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2966223004 .
2017-07-06 09:55:29 -07:00
Brian Wilkerson d9754a58e9 Initial implementation of copy/paste support
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2972833002 .
2017-07-05 14:02:07 -07:00
Brian Wilkerson 0ee29eadf1 Run the generator after updates to spec
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2972473002 .
2017-07-02 07:49:05 -07:00
Steve Messick c26c2774ca This defines some postfix completion templates for use in the IntelliJ editor.
R=brianwilkerson@google.com

To use it, you'll need a version of the Dart plugin with this PR patched in:
https://github.com/JetBrains/intellij-plugins/pull/534
Review-Url: https://codereview.chromium.org/2917943002 .
2017-06-26 09:53:02 -07:00
Devon Carew 511963d715 Add an analytics domain to the analysis server.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2922603002 .
2017-06-02 14:38:53 -07:00
Brian Wilkerson fb982f5476 Make server use the common protocol classes
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2879273002 .
2017-05-15 09:35:46 -07:00
Devon Carew f6f98576ef Misc fixes to the analysis server spec.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2878273002 .
2017-05-13 14:10:28 -07:00
Brian Wilkerson a3ac4253b1 Remove an obsolete error from the spec and an obsolete command-line flag
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2865403005 .
2017-05-10 09:33:43 -07:00
Devon Carew eb1839b8fd Minor changes to the generated spec, and display deprecated methods better.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2800283002 .
2017-04-15 13:43:36 -07:00
Steve Messick 4a2cca3a52 Add getStatementCompletion to the API spec
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2784673003 .
2017-03-30 10:13:21 -07:00
pq b17f4b2b5d CompletionSuggestion API for arg list text ranges.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2726923003 .
2017-03-01 16:10:46 -08:00
pq 8e6817f1da New Completion defaultArgumentListString protocol.
BUG=
R=brianwilkerson@google.com

See: https://github.com/flutter/flutter-intellij/issues/553.
Review-Url: https://codereview.chromium.org/2719083003 .
2017-02-27 11:36:30 -08:00
Brian Wilkerson c416aabed1 Deprecate the analysis.updateOptions request
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2719853004 .
2017-02-27 10:37:02 -08:00
Devon Carew 25dfd0fa80 Deprecate execution.setSubscriptions.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2713513007 .
2017-02-24 11:01:00 -08:00
Devon Carew 9dd2a6d452 Revert "Tweaks to the analyzer_cli."
This reverts commit a7ac08d0e7.

BUG=

Review-Url: https://codereview.chromium.org/2709163005 .
2017-02-23 09:39:25 -08:00
Devon Carew a7ac08d0e7 Tweaks to the analyzer_cli.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2709013005 .
2017-02-23 09:02:49 -08:00
Devon Carew 7f83d9d173 Add a diagnostic.getServerPort analysis server request.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2703033002 .
2017-02-19 15:19:40 -08:00
Brian Wilkerson fb5e367ca5 Update server generator
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2668733002 .
2017-01-31 08:26:10 -08:00
Brian Wilkerson 685e4ff9e1 Revert "Remove unused option in server API"
Review URL: https://codereview.chromium.org/2382033003 .
2016-09-30 10:14:12 -07:00
Brian Wilkerson 2972bd0d6b Remove unused option in server API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2382053002 .
2016-09-30 09:04:38 -07:00
Konstantin Shcheglov 7343da76ba Issue 27078. Describe RefactoringProblemSeverity values.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27078

Review URL: https://codereview.chromium.org/2312073003 .
2016-09-06 17:46:24 -07:00
Konstantin Shcheglov f4186fb463 Issue 27244. Add 'isDeprecated' to HoverInformation.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27244

Review URL: https://codereview.chromium.org/2310153002 .
2016-09-06 11:31:11 -07:00
pq e7e205f00b Add error codes to server protocol (#25958).
See: https://github.com/dart-lang/sdk/issues/25958

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1774913006 .
2016-03-09 10:44:03 -08:00
Dan Rubel 9fe92127e5 update setAnalysisRoots to accept package spec file
As part of addressing https://github.com/dartino/atom-dartino/issues/13,
this CL updates the setAnalysisRoots API to allow package spec files
in the packageRoots map.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1711353003 .
2016-02-19 10:57:16 -05:00
Konstantin Shcheglov 7c5e03435b Deprecate UNIT_TEST_GROUP and UNIT_TEST_TEST.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1570003002 .
2016-01-07 20:03:39 -08:00
Konstantin Shcheglov 1f5973e24e Explicitly specify that FilePath is not just absolute, but also a normalized path.
It was implied, and every client I know of uses absolute and normalized paths.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1506323002 .
2015-12-09 11:30:54 -08:00
pq 2fdcb1bd74 Promote diagnostic.getDiagnostics() (#25061).
* removes rolling average support
* removes "experimental" tag
* bumps API version

Fixes #25061.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1509033003 .
2015-12-09 09:29:26 -08:00
pq 43f027fc05 Analysis request getReachableSources (#24893).
Implements a new request to get reachable sources.

This solves a specific issue for flutter (e.g., inferring execution type by checking the transitive closure of reachabe sources for `dart:flutter`) but can be more generallly useful for other client-side smarts (e.g., "is this a web entry point?" or "is this a test?").

More context here: https://github.com/dart-lang/sdk/issues/24893

R=brianwilkerson@google.com, devoncarew@google.com

Review URL: https://codereview.chromium.org/1491013002 .
2015-12-02 13:26:35 -08:00
pq c0466f28f5 Rolling average work queue diagnostic (#24933).
Background: https://github.com/dart-lang/sdk/issues/24933

Salient bits:

* sampling will only start if a client registers interest in diagnostics.
* sampling will stop if clients stop requesting diagnostics.
* sample results are coming back as a string (but a double would be better).
* the mapping of context folders to averages in not garbage collected; since it's only potentially leaking `_Average` objects (and not contexts) when folders are deleted, I think that's fairly benign.

BUG=24933
R=brianwilkerson@google.com, devoncarew@google.com

Review URL: https://codereview.chromium.org/1463923003 .
2015-11-20 14:24:47 -08:00
pq 6d9cb5e48a Move diagnostics to diagnostics domain (#24931).
Still flagged `experimental` so no docs created.

See: https://github.com/dart-lang/sdk/issues/24931

BUG=24931
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1453433002 .
2015-11-16 14:10:10 -08:00
pq 82e83bb34d Experimental getDiagnostics request (#24480).
* Adds `getDiagnostics` request with *very* provisional diagnostics payload (primary goal here is to plumb this fully through and iterate).
* Updates codegenerator to skip doc generation for experimental APIs.

Additional context here: https://github.com/dart-lang/sdk/issues/24480.

BUG=24480
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1416093007 .
2015-11-05 15:05:21 -08:00
Konstantin Shcheglov 069ba985de Fix protocol for EXTRACT_LOCAL_VARIABLE and coveringExpressionOffsets/lengths.
Unfortunately we have to make coveringExpressionOffsets and coveringExpressionLengths optional.
Otherwise new clients cannot correctly parse responses from old servers.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1407333006 .
2015-11-03 10:19:41 -08:00
Konstantin Shcheglov c0d68a5437 DAS specification changes - spelling and ElementKind.FILE addition.
ElementKind.FILE will be used in search.findElementReferences

1. In the 'element' field of responce when a URI is at the given offset.

2. In the only element of the 'path' field of SearchResult(s) for URI references to a URI or a library identifier.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1409333002 .
2015-10-17 10:03:03 -07:00
Konstantin Shcheglov b107dec41a Spec change: include covering expressions into Extract Local protocol.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1388783003 .
2015-10-05 14:44:32 -07:00
pq 8697392367 AnalysisError hasFix attr (Implements #23874).
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1385523002 .
2015-10-05 09:46:17 -07:00
Konstantin Shcheglov 9d48af9ee3 Specification change for the 'libraryName' and 'partOfLibraryName' fields in Outline.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org//1375163003 .
2015-10-01 09:53:20 -07:00
Konstantin Shcheglov da29a447c4 New analysis.implemented notification specification.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1372623004 .
2015-09-25 09:57:29 -07:00