Commit Graph

1474 Commits

Author SHA1 Message Date
Konstantin Shcheglov ea98b0db45 Fix the rest of Quick Assist tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2613123003 .
2017-01-06 14:08:51 -08:00
Konstantin Shcheglov 12bdc9eb95 Fix code for @failingTest refactoring tests.
We should have used 'super.name()'.
Some tests are now passing.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2619623002 .
2017-01-06 13:53:36 -08:00
Konstantin Shcheglov 188c087036 Run 'Inline Method' refactoring tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2619053002 .
2017-01-06 13:51:02 -08:00
Konstantin Shcheglov d6fdc65220 Run 'Rename Library' refactoring tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2614903006 .
2017-01-06 12:33:23 -08:00
Konstantin Shcheglov 429379045b Run rename-import tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2617213002 .
2017-01-06 11:35:29 -08:00
Konstantin Shcheglov 31c7cce275 Run refactoring tests with the new analysis driver.
There are some failures because of missing potential search results.

These tests are not updated yet because they have too many problems now.

inline_method_test.dart
move_file_test.dart
rename_import_test.dart
rename_library_test.dart

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2618993003 .
2017-01-06 10:49:34 -08:00
Konstantin Shcheglov c7380f5d14 Run Quick Fixes tests with the new analysis driver.
There is a handful of failing tests though.
I fill triage them in subsequent CLs.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2617833003 .
2017-01-06 09:27:04 -08:00
Konstantin Shcheglov 71fc176b9b Run class/member hierarchy tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2618033002 .
2017-01-06 09:24:31 -08:00
Konstantin Shcheglov 4e49205c61 Run AssistProcessor tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2617833002 .
2017-01-05 16:59:35 -08:00
Konstantin Shcheglov d2f48ccf58 Make subclasses of AbstractContextTest asynchronous.
As a preliminary step before duplicating them for the new analysis driver.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2614033003 .
2017-01-05 14:21:29 -08:00
Konstantin Shcheglov e870bc9872 Fix for summarizing triple slash documentation comments.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2615013003 .
2017-01-05 12:30:44 -08:00
Konstantin Shcheglov d8c426bb85 Fix for resynthesizing libraries with invalid part URIs.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2615903003 .
2017-01-05 12:26:47 -08:00
Konstantin Shcheglov 9a3b6a09e5 Issue 28261. Add support for implementing generic methods in Quick Fix.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/28261

Review-Url: https://codereview.chromium.org/2618653002 .
2017-01-05 08:32:03 -08:00
Konstantin Shcheglov 4f03cccf06 Fix part related completion tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2616493004 .
2017-01-04 15:06:10 -08:00
Konstantin Shcheglov 1e43b4f270 Replace using MockSdk with FolderBasedDartSdk + summaries in AbstractContextTest(s).
It has some performance penalty (about 2-3 seconds in 35 seconds total).

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

Review-Url: https://codereview.chromium.org/2610823004 .
2017-01-04 14:39:24 -08:00
Konstantin Shcheglov 20ca3e9b7e Enable several completion tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2612103002 .
2017-01-04 14:23:18 -08:00
Konstantin Shcheglov f0a0b1fc79 Fix some completion tests with parts.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2573233002 .
2016-12-14 16:28:02 -08:00
Konstantin Shcheglov 8dbfef1cf1 Fix completion tests that attempted to resolve a library.
We don't need this with the new analysis driver.
The library element will be resynthesized on demand.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2571333002 .
2016-12-14 12:33:06 -08:00
Konstantin Shcheglov 63d1c18f41 Add completion tests for the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2572203002 .
2016-12-14 12:05:20 -08:00
Konstantin Shcheglov 52c81e4a78 Fix for detecting lib/src. Sort fixes by relevance.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2572013002 .
2016-12-14 06:57:19 -08:00
Konstantin Shcheglov 3a422bceb7 Implement SearchEngine.searchMemberDeclarations() for the new driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2566393003 .
2016-12-13 14:06:15 -08:00
Konstantin Shcheglov 142473b8cb Implement SearchEngine.searchTopLevelDeclarations() for the new driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2572603003 .
2016-12-13 12:11:22 -08:00
Brian Wilkerson a01afcd1d1 Remove the options plugin
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2569603002 .
2016-12-11 08:38:29 -08:00
Konstantin Shcheglov 9ab69ab984 Implement SearchEngine.searchAllSubtypes() with the analysis driver.
Inline getSubClasses().

Add a couple of tests for SearchEngineImpl2 itself.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2564913002 .
2016-12-09 09:32:49 -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
Brian Wilkerson 20baedc660 Reapply "Move the linter core to the analyzer package"
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2559773002 .
2016-12-07 09:57:17 -08:00
Paul Berry 1a172e935b Revert "Move the linter core to the analyzer package"
This reverts commit 6d9d5f53a1, which
was causing analysis server unit tests to fail.

TBR=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2561573003 .
2016-12-07 05:36:46 -08:00
Konstantin Shcheglov 57c3002ede Implement 'Import Library' Quick Fix for project libraries using TopLevelDeclarationInSource.
Only the current implementation is done.

Implementation for the new analysis driver is not linked yet.

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

Review URL: https://codereview.chromium.org/2554113003 .
2016-12-06 14:24:22 -08:00
Brian Wilkerson 6d9d5f53a1 Move the linter core to the analyzer package
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2553203002 .
2016-12-06 09:42:26 -08:00
Konstantin Shcheglov 6a9edde070 Issue 27820. Add fix for CompileTimeErrorCode.UNDEFINED_CLASS.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27820

Review URL: https://codereview.chromium.org/2546993004 .
2016-12-03 14:15:41 -08:00
Konstantin Shcheglov 2368a59d60 Add libraries in corrections using SourceInfo instance of LibraryElement.
We are not going to have LibraryElement(s) for the new analysis driver.

The current approach: get known library sources, compute their elements,
import these elements does not work well when there is no analysis cache.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2532393008 .
2016-12-01 10:22:48 -08:00
Konstantin Shcheglov 666d4efce2 Issue 27903. Use shared logic for computing new method location.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27903

Review URL: https://codereview.chromium.org/2538143003 .
2016-11-30 12:15:07 -08:00
Konstantin Shcheglov 2537784f92 Stop using Element.unit directly.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2541873002 .
2016-11-30 09:37:55 -08:00
Konstantin Shcheglov 0f9a78ff53 Make 'Inline Method' refactoring work with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2540793003 .
2016-11-29 17:12:46 -08:00
Konstantin Shcheglov 73fccff8ea Make SearchMatch an interface, exclude 'context', move implementation.
Also, mostly drop 'fileStamp' in SourceFileEdit.
Only `-1` is kept when the file is a new one, in other cases it' `0`.
As I can see, IDEA cares only about `-1`.
We don't know modification stamps with the new analysis driver.
But we know content hashes.

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

Review URL: https://codereview.chromium.org/2518903002 .
2016-11-21 10:05:21 -08:00
Konstantin Shcheglov fc30904a39 Completion with the new analysis driver.
It works for top-levels, fields, locals, prefixed expressions.

Integration is not the most efficient - we resolve the full unit.
It works fine for files with about 1000 lines, about 50-70 ms.

We could slightly improve timing if we prioritize completion over
navigation and highlight notifications, which are currently prepared
and sent before completion.

In giant files like src/dart/element/element.dart, about 8500 lines,
it takes about 400 ms from typing to receiving completion. The theoretical
bottom bound for such files is about 70 ms - time that it required to
parse, create unlinked bundle, ensure that the API signature is the
same, load linked bundles and prepare to resynthesize. On top of this
goes any time required to resolve a single method and completion itself.

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

Review URL: https://codereview.chromium.org/2478963002 .
2016-11-06 10:45:46 -08:00
Konstantin Shcheglov 3319e6d0e3 Fix for inlining async methods/getters.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2463493002 .
2016-10-31 08:48:37 -07:00
Brian Wilkerson 99ce88f8bc (TBR) Fix more failing tests
Review URL: https://codereview.chromium.org/2426723002 .
2016-10-17 12:57:56 -07:00
Konstantin Shcheglov 56bde6da28 Issue 27542. Guard against CompilationUnitElement is null in SearchMatch.element getter.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27542

Review URL: https://codereview.chromium.org/2409403002 .
2016-10-11 14:09:09 -07:00
Konstantin Shcheglov 831d3119f2 Issue 27536. Quick Fix for 'Avoid using braces in interpolation when not needed'.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27536

Review URL: https://codereview.chromium.org/2397153004 .
2016-10-07 12:51:04 -07:00
Konstantin Shcheglov 05a86a7495 Remove 'initializeTestEnvironment' from 'analysis_server'.
Also fixes the server_options_test.dart:22 test broken in https://codereview.chromium.org/2394683006/

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

Review URL: https://codereview.chromium.org/2402483002 .
2016-10-06 10:26:17 -07:00
Konstantin Shcheglov de4d8b3a78 Switch analysis_server to use 'package:test'.
I'm changing DEPS in the corresponding analyzer CL.

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

Review URL: https://codereview.chromium.org/2394683006 .
2016-10-06 08:47:15 -07:00
Konstantin Shcheglov 5a4d7ebf61 Issue 27475. Discourage users from naming constructors the same as the enclosing classes.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27475

Review URL: https://codereview.chromium.org/2399533003 .
2016-10-05 12:07:40 -07:00
Konstantin Shcheglov 3647e7bac0 Order suggested Quick Fix imports: direct, export, non-API.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2377803002 .
2016-09-27 15:03:26 -07:00
Konstantin Shcheglov e82cbea8fe Issue 27386. Fix for 'use similar' Quick Fix for import-prefixed identifiers.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27386

Review URL: https://codereview.chromium.org/2361483002 .
2016-09-21 10:02:20 -07:00
Konstantin Shcheglov bdc024a303 Move PackageIndexAssembler into analysis_server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2357283002 .
2016-09-21 08:54:46 -07:00
Brian Wilkerson ab9ba20c04 Fix recently introduced strong-mode errors
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2344933002 .
2016-09-15 14:37:37 -07:00
Brian Wilkerson ecc84b26a4 Break up another large file
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2342733002 .
2016-09-15 07:49:27 -07:00
Dan Rubel 023295912a improve import URI completions at EOF
fixes https://github.com/dart-lang/sdk/issues/27020

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2342473002 .
2016-09-14 11:22:25 -04:00
Dan Rubel 4fce5e9022 reduce the relevance of completions starting with "$"
fixes https://github.com/dart-lang/sdk/issues/27303

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2330413004 .
2016-09-13 14:21:31 -04:00