Konstantin Shcheglov
6790cc30ef
Highlight class names in instance creations as constructors.
...
This is needed for better highlighting optional new/const. I think the
main reason is that 'new' is highlighed and we knew that this is a
new instance creation. Constructors are also highlighed in the default
color scheme. But class names are not. So, to make code look colorful
again, we need to highlight class names in instance creations.
R=brianwilkerson@google.com , devoncarew@google.com
Change-Id: I8fde0b4aa5243e94d7ba575a74d52d31d3b665bb
Reviewed-on: https://dart-review.googlesource.com/42021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-02-16 17:50:27 +00:00
Brian Wilkerson
b44989cd57
Fix exception (issue 31922)
...
Change-Id: Id2d64ec1f92611e44b3c6e22c94efd1711b1a30e
Reviewed-on: https://dart-review.googlesource.com/37083
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-01-27 15:58:20 +00:00
Konstantin Shcheglov
07367d05cd
Basic implementation of FlutterOutlineComputer.
...
R=brianwilkerson@google.com , devoncarew@google.com
Change-Id: I22c96c2a35c086814aace13f0121cc0361f3386f
Reviewed-on: https://dart-review.googlesource.com/36140
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-01-21 18:12:58 +00:00
Brian Wilkerson
c40d9821dc
Prepare for optional new/const
...
Change-Id: I138fffc3f03f2925d5b33cd7f340543789d4b6e6
Reviewed-on: https://dart-review.googlesource.com/31960
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-01-02 16:33:24 +00:00
Devon Carew
38df6ea1f4
Only show closing labels that have nesting.
...
Bug:
Change-Id: Ifc9177973961f2a74be3e2871aa2d58c28007478
Reviewed-on: https://dart-review.googlesource.com/29540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-12-14 15:54:50 +00:00
Konstantin Shcheglov
6b1658906e
Support for Flutter is not limited to code correction. Move to utilities.
...
R=brianwilkerson@google.com
Bug:
Change-Id: Idaa90946710fcbec2a35a91eb35b5ead68cf4170
Reviewed-on: https://dart-review.googlesource.com/16621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-10-25 19:11:38 +00:00
Konstantin Shcheglov
4c86f98d7a
Drop the 'Flutter' word from names, expect that clients will use the 'flutter' import prefix.
...
R=brianwilkerson@google.com
Bug:
Change-Id: I0275557bad66f03ed0d1b8388119b168d70bfad4
Reviewed-on: https://dart-review.googlesource.com/16600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-10-25 17:14:01 +00:00
Konstantin Shcheglov
c2f1af6378
First steps for computing Flutter outlines.
...
R=brianwilkerson@google.com , devoncarew@google.com
Bug:
Change-Id: Ib8151df40439a28da536d467a5c0e7354fcfba51
Reviewed-on: https://dart-review.googlesource.com/16338
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-10-25 17:00:56 +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
Devon Carew
6a19e794b1
Don't create single line closing labels.
...
Bug:
Change-Id: I1ced51a7b5e5aee6db03a77a788c0eeaef101469
Reviewed-on: https://dart-review.googlesource.com/10820
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2017-10-05 05:23:20 +00:00
Konstantin Shcheglov
8ce5c45fff
Fix for copying constructor return types.
...
R=brianwilkerson@google.com
Bug:
Change-Id: Iaa1039b85549fb2daa3d90ea11f4756363c6c358
Reviewed-on: https://dart-review.googlesource.com/10163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2017-10-02 21:37:47 +00:00
Devon Carew
fd4528fffb
Make closing labels slightly less noisy.
...
Bug:
Change-Id: If916adb1cceab14c9260f288bf59878c6955f3ce
Reviewed-on: https://dart-review.googlesource.com/9000
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-27 18:52:25 +00:00
Brian Wilkerson
f6e3e1f549
Add outline support for the test package
...
Change-Id: Iff938d55082b3b222cf801ea53d4eaf5feb1e094
Reviewed-on: https://dart-review.googlesource.com/6980
Reviewed-by: Devon Carew <devoncarew@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-09-19 18:59:54 +00:00
Brian Wilkerson
c38c97def3
Reduce duplicated code
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/3002303002 .
2017-08-25 08:18:39 -07:00
Brian Wilkerson
23bcc17a61
Use the NavigationCollector from analyzer_plugin to avoid duplication
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/3002253002 .
2017-08-25 07:25:16 -07:00
Brian Wilkerson
eaf779ba1e
Fix insertion of imports when there are no existing directives (issue 30430)
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/3002643002 .
2017-08-14 13:32:57 -07:00
Danny Tuppeny
0647d9a228
Improvements to analysis server closing labels ( #30411 )
...
* Tweak comment that was based on integration test verison.
See #30285
* Include additional 1/2-line spans that end on same lines as >2 line spans.
See #30285
* Add tests to ensure no unwanted closing labels from multiline expressions.
See #30285
* Don't show closing labels for code inside interpolated strings.
See #30285
* Remove unwanted @soloTest.
See #30285
* Make casing of test names consistent.
See #30285
* Add a constructor and make fields final.
See #30285
* Use putIfAbsent for adding to map.
See #30285
* Shorten closing labels constructor.
See #30285
* Run "Sort members" on closing labels files.
See #30285
* Remove unnecessary type annotations.
See #30285
2017-08-11 11:04:34 -07:00
Danny Tuppeny
619f2995ab
Implement analysis server closing labels (work-in-progress) ( #30372 )
...
* Add empty closing labels computer/visitor and tests.
See #30285
* Add initial implementation and test for closing labels.
See #30285
* Add various tests for analyzer closing labels.
See #30285
* Fail tests if errors occur.
Without this the notifications will never come through and the test will time out. This causes them to fail right away on errors.
See #30285
* Add test and fix for crash that occurred during testing.
See #30285
* Remove unnecessary abs().
See #30285
* Remove question that has been answered (yes).
See #30285
* Remove unnecessary .argumentList on spansManyLines check.
See #30285
* Add test for prefixed import and constructor names.
The behaviour seems like what we want, though need to confirm if this is the best way to do it.
See #30285
* Add additional prefixed tests and another TODO.
See #30285
* Fix method invocations to show full target/name.
See #30285
* Fix constructor invocations to not use toString().
See #30285
* Convert most closing label tests to unit tests.
See #30285
2017-08-09 14:13:47 -07:00
Brian Wilkerson
ae69313731
Initial implementation of the import-aware copy support
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2988183002 .
2017-08-01 08:32:12 -07:00
Brian Wilkerson
de0b7a2f40
Add sourceFactory getter to AnalysisSession
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2989883002 .
2017-07-28 06:18:53 -07:00
Brian Wilkerson
9591a9449f
Partial support for intelligent paste operation
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2986073002 .
2017-07-27 13:55:59 -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
a6214b3129
Remove more libraries directives from server
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2894883002 .
2017-05-19 08:42:30 -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
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