Commit Graph

4182 Commits

Author SHA1 Message Date
Brian Wilkerson 841f8e6cf2 Move shouldFileBeAnalyzed into ContextManager
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1748763002 .
2016-03-01 12:40:56 -08:00
Konstantin Shcheglov e225e619cd Issue 25827. Don't propose to remove the type of an incomplete variable declaration.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25827

Review URL: https://codereview.chromium.org/1753893002 .
2016-03-01 12:20:24 -08:00
Brian Wilkerson 954d61f363 Partially revert notification of package map computation
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1750763002 .
2016-02-29 14:37:00 -08:00
Brian Wilkerson c4d7f41650 Move folderMap from AnalysisContext to ContextManager
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1750683002 .
2016-02-29 14:04:46 -08:00
pq 549a7a4d00 Quick-fix for annotate_overrides lint (#25416).
An interim approach to shoe lint-awareness into the dart FixProcessor.  Once we have a a shareable processor base class we can migrate these bits into a dedicated LintFixProcessor contributed by the LintServerPlugin.

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

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1736383002 .
2016-02-26 14:23:05 -08:00
Brian Wilkerson 5c2afc8d09 Start work to remove the context manager callbacks
R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1739913003 .
2016-02-26 13:11:46 -08:00
Konstantin Shcheglov 44fc8ec8f3 Make add/remove type Quick Assists less obtrusive.
It is nice to have them until after the variable name, but not OK to
have them on initializers, especially when the initializer has a
closure.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1737563002 .
2016-02-25 08:20:23 -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 026748533f Add @override when implement missing overrides for fields.
This makes the code generated by DAS closer to the code generated by
the IDEA plugin.

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

Review URL: https://codereview.chromium.org/1705283002 .
2016-02-17 13:30:23 -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
danrubel 6188d18eec rework completion request resolve imports
* rename resolveDirectives --> resolveImports
* rework resolveImports to return list of ImportElement rather than Directive
* new resolveDirectives test
* set priority source during completion tests

This and https://codereview.chromium.org/1685653002/ fixes https://github.com/dart-lang/sdk/issues/25690

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1693933002 .
2016-02-13 23:15:52 -05:00
danrubel 3fc06a4aa7 abort completion request - fixes #24271
This CL aborts completion requests (returns empty list of completions)
if either a newer completion request is received
or the source changes after the completion request was received.

In addition, I wrapped calls to AnalysisFutureHelper computeAsync
in exception handlers so that it will be easier to track async exceptions
back to the code that requested the computations.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1685653002 .
2016-02-10 12:45:53 -05:00
Brian Wilkerson bdd0d637fe We need to perform analysis differently based on some option settings (such as strong mode), but there is currently a single SDK that is shared across all contexts no matter which option values are being used. This causes us to inconsistently analyze different portions of the SDK depending on which outer context was the first to request the analysis.
This is at least a first step toward solving this problem by allowing multiple SDKs to be created, one for each unique set of options.

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

Review URL: https://codereview.chromium.org/1686613002 .
2016-02-09 11:05:34 -08:00
pq fa08150ca6 Support for embedder dependency changes (#25606).
Adds logic to detect when a library embedder is added as a dependency and reconfigures the `SourceFactory` appropriately.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1653733002 .
2016-02-09 09:39:59 -08:00
Konstantin Shcheglov 20d31ea8c3 Compute ElementImpl.hashCode using location.
We need this to ensure that Impl and Handle have the same hash.

This reduces number of shared test failures from 267 to 67 when using
SDK summaries.

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

Review URL: https://codereview.chromium.org/1677213003 .
2016-02-09 07:06:22 -08:00
Konstantin Shcheglov 960b9c3409 Issue 25650. Generate unique parameter names when create a method or function.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25650

Review URL: https://codereview.chromium.org/1664423002 .
2016-02-04 13:59:27 -08:00
Konstantin Shcheglov fb520065b8 Issue 25686. Add 'var' for untyped unimplemented fields.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25686

Review URL: https://codereview.chromium.org/1668273002 .
2016-02-04 13:32:49 -08:00
Paul Berry bc551cb308 Beef up analysis server integration test messages.
When an integration test fails, in can be difficult to figure out why,
especially if the test had to forcibly terminate the analysis server
process.  These messages should help debug the problem.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1669473004 .
2016-02-04 12:48:21 -08:00
pq 37767eff86 Hooks for injecting embedder resolver providers.
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1666573006 .
2016-02-04 11:03:43 -08:00
Konstantin Shcheglov 4239eadd74 WEB-20151. Include type arguments into type proposals.
R=brianwilkerson@google.com
BUG= https://youtrack.jetbrains.com/issue/WEB-20151

Review URL: https://codereview.chromium.org/1661763002 .
2016-02-02 18:36:11 -08:00
Konstantin Shcheglov b0c06a5827 Issue 25616. Support for extracting methods with function-typed parameters.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25616

Review URL: https://codereview.chromium.org/1655353002 .
2016-02-02 14:32:02 -08:00
Konstantin Shcheglov 86106d7a6d Issue 25623. When adding the 'async' modifier, change the return type.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25623

Review URL: https://codereview.chromium.org/1652963003 .
2016-02-01 10:35:47 -08:00
Konstantin Shcheglov 3f7a21bc0e Issue 25622. Quick fix for 'async-for'.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25622

Review URL: https://codereview.chromium.org/1650853002 .
2016-02-01 08:03:55 -08:00
pq 9b1fa223a8 Embedded libs key rename to defuse server landmine.
1.13 stable builds of the SDK contain a version of server that fails catastrophically when analyzing source that imports packages that define embedded libraries. Since we can't pragmatically require more recent SDKs for flutter development we have been prevented from landing embedded libs in the flutter engine.  By renaming the key we use to identify contributed libraries, this change avoids the issue.  Old versions of server will simply ignore the new key and new ones will process it properly.  Win-win!

BUG=
R=danrubel@google.com

Review URL: https://codereview.chromium.org/1643023002 .
2016-01-29 09:52:04 -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 205a2a9c28 Don't add sources to DartSdk contexts.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1625273003 .
2016-01-24 15:49:18 -08:00
Konstantin Shcheglov fe7a48d6c7 Isse 25404. When remove a method during inlining, remove also leading empty lines.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25404

Review URL: https://codereview.chromium.org/1628623002 .
2016-01-22 19:40:38 -08:00
Konstantin Shcheglov 5237561075 Issue 25404. 'Inline Method' should update implicit 'this' and class references.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25404

Review URL: https://codereview.chromium.org/1629533003 .
2016-01-22 17:21:57 -08:00
Konstantin Shcheglov 9f451cb0dc Issue 25538. Fix for type hierarchy and private class members.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25538

Review URL: https://codereview.chromium.org/1615093002 .
2016-01-21 10:56:05 -08:00
Konstantin Shcheglov cba8d0d7c3 Issue 25538. Fix for 'analysis.implemented' notification and private members.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25538

Review URL: https://codereview.chromium.org/1615023002 .
2016-01-21 09:49:18 -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
danrubel b37e3b7ec1 (TBR) fix embedder tests on Windows
Review URL: https://codereview.chromium.org/1609003003 .
2016-01-19 16:24:01 -05:00
Konstantin Shcheglov 53b2815ad8 Ignore 'expr is' outside of a statement.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1609883002 .
2016-01-19 13:20:38 -08:00
danrubel 2ae3026c43 add enableAsync to analysis option file flags
integrate enableAsync into analysis server
include enableAsync on context status page
update api spec to indicate that enableAsync is no longer deprecated

relys on landing https://codereview.chromium.org/1570183002/

fixes #25373

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1574523002 .
2016-01-08 20:48:07 -05:00
Konstantin Shcheglov e1c6faceb5 Issue 25316. Quick Fix for removing 'final' keyword.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25316

Review URL: https://codereview.chromium.org/1545323002 .
2015-12-27 13:19:41 -08:00
Konstantin Shcheglov 78ae012d2d Issue 25313. Skip constructor names and named expressions.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25313

Review URL: https://codereview.chromium.org/1547113002 .
2015-12-27 12:05:05 -08:00
danrubel e13a49fdfa (TBR) "fix" test_no_duplicate_notifications
Review URL: https://codereview.chromium.org/1542433002 .
2015-12-19 11:41:32 -05:00
Dan Rubel e5bbeddf4d completion performance measurement for local status page
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1536083002 .
2015-12-19 11:12:45 -05:00
Dan Rubel 43ee7b5bc9 move OpType into dart folder
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1523243006 .
2015-12-19 11:11:04 -05:00
Dan Rubel 99c3be6331 remove old completion API
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1536073002 .
2015-12-19 11:09:48 -05:00
Dan Rubel 39d5abb662 remove internal streaming of results, remove obsolete test, cleanup unused code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1538883003 .
2015-12-18 10:52:21 -05:00
Dan Rubel 1adabf4abc remove extraneous classes and cleanup code
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1535643004 .
2015-12-18 08:53:39 -05: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
Dan Rubel fbaba56375 move DartCompletionSorter to dart specific contributor
consolidate common test code
remove duplicate test

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1539693002 .
2015-12-17 17:54:29 -05:00
Dan Rubel 4ee5173f42 move ReplacementRange into dart specific contributor
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1531383002 .
2015-12-17 16:24:49 -05:00
Dan Rubel baf03ebdfe merge completion suggestions based upon relevance
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1536823002 .
2015-12-17 16:22:40 -05:00
Ivan Posva a3f816e75b - Fix usage of Platform.packageRoot.
BUG=

Review URL: https://codereview.chromium.org/1533693003 .
2015-12-17 13:08:19 -08:00
Dan Rubel b3fa2629bf remove CompletionCache and obsolete tests, and cleanup imports
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1533973002 .
2015-12-17 16:00:34 -05:00
Dan Rubel 661cd4e9b9 report invalid param if offset is out of bounds
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1531353002 .
2015-12-17 14:58:14 -05:00
Dan Rubel 5e128e2544 suggest IDENTIFIER not INVOCATION for dartdoc refs
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1530393004 .
2015-12-17 11:00:15 -05:00