Commit Graph

123 Commits

Author SHA1 Message Date
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
Brian Wilkerson e55812a3f2 Unify the server and plugin versions of the generators
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2844273003 .
2017-04-28 07:46:29 -07:00
Brian Wilkerson 5bb9fb5f96 Guard against NPE caused by invalid code (issue 28829)
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2704933002 .
2017-02-20 09:29:14 -08:00
Konstantin Shcheglov 663b7f665e Analysis.getHover should return the field's documentation for field formal parameters.
Also return the parameter's element with completion suggestion.

R=brianwilkerson@google.com
BUG= https://github.com/flutter/flutter-intellij/issues/385

Review-Url: https://codereview.chromium.org/2681233005 .
2017-02-10 08:49:40 -08:00
Brian Wilkerson 22f561e914 Reapply "Add support for generic function type syntax, part 1"
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2622303006 .
2017-01-11 14:10:05 -08:00
Brian Wilkerson 85b1e7abbe Revert "Add support for generic function type syntax, part 1"
Review-Url: https://codereview.chromium.org/2624283003 .
2017-01-11 13:30:52 -08:00
Brian Wilkerson 1cd918533d Add support for generic function type syntax, part 1
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2613383003 .
2017-01-11 13:12:10 -08:00
Konstantin Shcheglov eaca15cd4d Fix analysis.getNavigation with the new analysis driver.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/28125

Review-Url: https://codereview.chromium.org/2582753003 .
2016-12-16 10:52:47 -08:00
Brian Wilkerson 8c946a6b9b Apply error processors in the new driver
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2577913002 .
2016-12-14 16:07:06 -08:00
Konstantin Shcheglov 2a7612f103 Implement 'analysis.occurrences' for the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2566223002 .
2016-12-12 10:07:19 -08:00
Paul Berry ae6fd961a1 Prepare for decoupling analyzer ASTs from element model.
This CL creates top level accessor functions which may be used to map from AST data structures to their corresponding elements and types, and begins using those accessor functions throughout the SDK.  It also adds empty interfaces ResolutionTarget and ResolutionType, which are implemented by Element and DartType respectively.

In a future CL, I will change the types stored in the AST to ResolutionTarget and ResolutionType, rather than specific element types; this will decouple the ASTs from the element model.  The presence of the accessor functions will allow clients to continue accessing elements and types in a type-safe way.

R=asgerf@google.com, brianwilkerson@google.com, scheglov@google.com, vsm@google.com

Review URL: https://codereview.chromium.org/2551023005 .
2016-12-07 11:08:14 -08:00
Konstantin Shcheglov f059523037 Highlight FieldFormalParameterElement as a field only in declaration.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27478

Review URL: https://codereview.chromium.org/2484883002 .
2016-11-07 12:03:06 -08:00
Konstantin Shcheglov fd3d6047fb Send notifications in the scheduled futures.
Doing this allows code completion to run before notifications, so
we get completions faster.

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

Review URL: https://codereview.chromium.org/2481323002 .
2016-11-07 12:01:10 -08:00
Konstantin Shcheglov f55a9760fc Include LineInfo into AnalysisResult to allow reporting errors with lines/columns.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2468223003 .
2016-11-03 08:39:37 -07:00
Konstantin Shcheglov 6826e267b9 Integration of the new analysis driver, behind a flag.
The flag is --enable-new-analysis-driver, disabled by default.

WIP, only error notifications for now.

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

Review URL: https://codereview.chromium.org/2465923002 .
2016-10-31 09:54:31 -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
Brian Wilkerson 7a9b2a3133 Use null aware operators to clean up code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1941793002 .
2016-05-02 08:38:46 -07:00
Brian Wilkerson 338c95be8c Sort the files in analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1834423002 .
2016-03-28 18:25:29 -07:00
Konstantin Shcheglov c0d40223bf Issue 25945. Include static/propagateInvokeType for MethodInvocation names into hover.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25945

Review URL: https://codereview.chromium.org/1814893002 .
2016-03-17 10:29:10 -07:00
Brian Wilkerson 93aa6f1ecf Deprecate the generated element library and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1789233002 .
2016-03-12 09:13:44 -08:00
Brian Wilkerson 7d72c6e1f5 Deprecate the generated AST library and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1788223002 .
2016-03-12 08:50:48 -08:00
Brian Wilkerson ec08de7df8 Get more data to track down issue 25884
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1775913005 .
2016-03-10 08:21:40 -08:00
Brian Wilkerson 71e7ed86c0 Move scanner out of generated and clean up imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1693083004 .
2016-02-14 07:48:44 -08:00
Konstantin Shcheglov e7e52ae2c0 Issue 25542. If an element does not have its own documentation, use the documentation from the overridden superclass member or an implemented interface.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25542

Review URL: https://codereview.chromium.org/1632033002 .
2016-01-25 17:09:48 -08:00
Konstantin Shcheglov 5dc34340a1 Issue 25538. Fix for notification and private methods.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25538

Review URL: https://codereview.chromium.org/1610773003 .
2016-01-21 08:01:51 -08:00
pq 1f8eddcc21 Cache element docs (and add to completions) [#23694].
This does away with the expensive call to `computeDocumentationComment` in favor of cached comments.  Notably this makes adding doc content to code completion proposals performant (and so is done here).  It should also make `dartdoc` *much* faster for doc generation since there are no more trips to disk to fetch comments  for elements (still needed for source though).

For more on the desire for docs in completions see here: https://github.com/dart-lang/sdk/issues/23694

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

Review URL: https://codereview.chromium.org/1534043002 .
2015-12-17 21:07:42 -08:00
Brian Wilkerson 56fe38f0ab Clean up imports in analysis_server and analyzer_cli (and one missed in analyzer)
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1527793003 .
2015-12-14 19:31:46 -08:00
Konstantin Shcheglov 38a4193b5f Issue 25244. Disable invalid overrides.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25244

Review URL: https://codereview.chromium.org/1519413002 .
2015-12-13 15:50:12 -08:00
Konstantin Shcheglov 2f0f398c73 Fix lints: unnecessary_brace_in_string_interp
Also fixes two cases of empty_constructor_bodies.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1521883002 .
2015-12-13 13:05:00 -08:00
Konstantin Shcheglov 168556a3e4 Tweaks for hover.
1. Include full signature of classes - extends, with and implements clauses.

2. Provide statis type only for variables - for all other elements the static type is always the same as in the signature.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1513943005 .
2015-12-11 14:25:46 -08:00
Brian Wilkerson 9ad256cf18 Move the wire protocol support into the public API
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1398293002 .
2015-10-11 07:34:28 -07:00
Konstantin Shcheglov 0e7f4b5717 Fix hover documentation for parameters.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/1384583007 .
2015-10-05 07:04:20 -07:00
Konstantin Shcheglov e6053aa135 Rollback https://codereview.chromium.org/1380223003
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1390463002 .
2015-10-04 17:07:10 -07:00
Konstantin Shcheglov 1af7b154af Issue 23694. Include 'docSummary' and 'docComplete' into CompletionSuggestion.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23694

Review URL: https://codereview.chromium.org/1380223003 .
2015-10-04 16:16:45 -07:00
Konstantin Shcheglov 3924b15d85 Remove ElementLocator.locateWithOffset altogether.
It was needed only for the old Angular implementation support, which
overlayed its own Element subclasses into normal Dart AST, for example
for string literals - names of components.

As we don't support this anymore, there is no need for the method.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1370833002 .
2015-09-25 14:57:15 -07:00
Konstantin Shcheglov 75600fc162 Report UNRESOLVED_INSTANCE_MEMBER_REFERENCE for dynamicVar.member references.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1345943006 .
2015-09-17 10:37:04 -07:00
Konstantin Shcheglov a01281370b Fix for dynamic instance field reference highlighting.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1349223002 .
2015-09-17 09:25:22 -07:00
Konstantin Shcheglov d71bda7c05 Highlight library identifiers as LIBRARY_NAME.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1352843002 .
2015-09-17 09:24:14 -07:00
Konstantin Shcheglov ef2fc0d778 Add OCCURRENCES_CONTRIBUTOR_EXTENSION_POINT_ID.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1337143002 .
2015-09-11 13:59:28 -07:00
Konstantin Shcheglov e090ff872e Issue 24277. Use node's offset as the source range start for the first unit node in Outline.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/24277

Review URL: https://codereview.chromium.org//1325143003 .
2015-09-02 17:55:15 -07:00
Konstantin Shcheglov b15a031276 Navigation extension point.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1303033010 .
2015-09-01 13:06:25 -07:00
Konstantin Shcheglov 089f84f6cd Keep only unique overridden elements.
If the implemented interfaces don't declare an element, keep only a single copy of the element - from the superclass.

In Dart Editor we use any element, but in in IDEA we show all of them, and we don't want to have duplicates.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1273003005 .
2015-08-10 16:13:43 -07:00
Konstantin Shcheglov d5d0017e21 Tweak for navigation for URIs.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1246833002 .
2015-07-20 15:07:00 -07:00
Konstantin Shcheglov 55cb93b422 Add '--useAnalysisHighlight2' option to generate version 2 of semantic highlight.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1241193002 .
2015-07-20 10:37:46 -07:00
Brian Wilkerson 10b7db100f Revert "Update Analysis Server highlight API and implementation."
This reverts commit 739847402b.

Rolling the wire protocol API version forward caused existing clients to break, so we're rolling it back until we can find a backward compatible way of adding the new functionality.

R=paulberry@google.com

Review URL: https://codereview.chromium.org//1236433003 .
2015-07-13 09:49:55 -07:00
Konstantin Shcheglov d7c2f4550b Issue 23640. Implement 'analysis.getNavigation' request.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23640

Review URL: https://codereview.chromium.org//1232683003 .
2015-07-10 15:31:25 -07:00
Konstantin Shcheglov 739847402b Update Analysis Server highlight API and implementation.
I think this is a good enough compromise between the existing and IDEA granilarity.

Eclipse plugin CL will follow.

(IN)VALID_STRING_ESCAPE are not implemented yet.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1227143003 .
2015-07-09 11:19:44 -07:00
Konstantin Shcheglov 7e194d8fb5 Change navigation regions generation for constructors.
In IDEA we use navigation regions for resolution.
And so far all navigation regions are for separate identifiers.
This CL splits single regions like "new A.named()" into separate "A" and "named" regions.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1218183007.
2015-07-06 11:27:19 -07:00
Konstantin Shcheglov f3c28ef449 Don't create navigation regions for not existing sources.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1180883003.
2015-06-11 13:21:12 -07:00
Konstantin Shcheglov f118546d06 Issue 23332. Don't compute overrides for static members.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23332

Review URL: https://codereview.chromium.org//1151573011
2015-06-01 10:42:22 -07:00