Commit Graph

151 Commits

Author SHA1 Message Date
Brian Wilkerson 61d5c85b48 Allow navigation from var when there is an inferred type (issue 29091)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2769813005 .
2017-03-23 10:34:09 -07:00
Konstantin Shcheglov 6d79ee2602 Issue 27214. Get any AnalysisDriver for getNavigation().
This means that we will able to analyze any file, even outside all
analysis roots.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27214

Review-Url: https://codereview.chromium.org/2689213016 .
2017-02-17 09:13:59 -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
Konstantin Shcheglov 44bab19cb3 Implement 'analysis.analyzedFiles' notification with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2612723002 .
2017-01-04 07:12:47 -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
Brian Wilkerson c99adefae7 Get some tests running using the analysis driver
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2562083002 .
2016-12-09 08:32:39 -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
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 61183b2be9 Remove @failingTest for the now passing test.
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2554633002 .
2016-12-05 13:41:03 -08:00
Brian Wilkerson b81564b623 Add support for generating lints when using the new driver
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2545553007 .
2016-12-03 07:25:42 -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 9723a28457 Support for hover with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2477193002 .
2016-11-07 09:09:14 -08: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 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 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 44836f8538 Support the name analysis_options.yaml for analysis options files
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1975963002 .
2016-05-13 07:33:06 -07:00
Brian Wilkerson 97c613aad4 More strong mode changes in analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1852113002 .
2016-04-03 17:56:30 -07:00
Brian Wilkerson 8c22a5f807 Format code in analysis_server
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1838933003 .
2016-03-29 08:27:14 -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
Bob Nystrom cf3b9b9548 Fix analysis_server test to not expect redundant error.
R=brianwilkerson@google.com, pquitslund@google.com

Review URL: https://codereview.chromium.org/1803203002 .
2016-03-15 14:17:09 -07:00
Konstantin Shcheglov bd76934452 Remove old index and search implementations.
Also rename the new implementation files and classes to remove the
'2' suffix.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1801883002 .
2016-03-14 12:19:40 -07: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 Slesinsky 5831cfb1bb Fix issue where errors aren't reported for a new overlay
A new overlay was not being marked as an explicitly added
source, even if it's within the directory of an analysis
context. As a result, errors were not being reported.

I believe this only happens if there's no underlying file.
Therefore it seems difficult to reproduce in an IDE, but
it comes up in a stress test.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1753083003 .
2016-03-03 10:42:45 -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
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
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 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
Konstantin Shcheglov 6824bd9b32 Fix for enum signatures.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1529593002 .
2015-12-14 10:53:08 -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
pq 62656833d4 Wraps up the server-side of the 'Allow a user to configure which hints are "fatal"' ask (#24452).
* migrates error filtering from a predicate to a process that can customize severities.
* moves filtering/processing from the `dart` task into the `getErrors` request and the errors notification.

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

(Pending a thumbs-up, support for CLI to follow.)

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1517723002 .
2015-12-10 13:35:11 -08:00
Konstantin Shcheglov 72cf3cbe91 Remove unnecessary 'noSuchMethod' declarations.
Also format these file.
I don't like how the new formatter changed the code :-(

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1507813004 .
2015-12-08 11:39:37 -08:00
Paul Berry 4f654473ff Merge remote-tracking branch 'origin/master' into analyzer-breaking-0.27 2015-12-06 08:41:24 -08:00
Konstantin Shcheglov 2be2c5e55c Fix for navigation reginos for instance creations with import prefixes.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1498163003 .
2015-12-04 14:24:09 -08:00
Brian Wilkerson b9644af695 Remove the old task model
Review URL: https://codereview.chromium.org/1490233007 .
2015-12-03 10:14:06 -08:00
Konstantin Shcheglov 1933891bad Issue 25057. A static member cannot be implemented.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25057

Review URL: https://codereview.chromium.org/1488443002 .
2015-11-29 19:20:25 -08:00
Konstantin Shcheglov c302b65584 Use async/await in all analysis domain tests.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1478513002 .
2015-11-24 14:18:37 -08:00
Konstantin Shcheglov cfb7d61a9c Issue 25034. Record only the target source's errors.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25034

Review URL: https://codereview.chromium.org/1477553002 .
2015-11-24 14:00:00 -08:00
Konstantin Shcheglov 670db50707 Generate separate navigation regions for 'super' and optional 'name'.
Also support for navigation regions for RedirectingConstructorInvocation.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1465303003 .
2015-11-23 14:27:03 -08:00
Konstantin Shcheglov a689bf4180 Report error for ignored priority file. Ignore subscription for ignored files.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1462693002 .
2015-11-18 17:31:58 -08:00
Konstantin Shcheglov abe8d87e0e Implement AnalysisServer.getContainingContext() using ContextManager.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1455163005 .
2015-11-18 14:10:35 -08:00
Konstantin Shcheglov 03eed1c3c9 Fix for duplicate priority sources.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1408163008 .
2015-10-29 17:46:00 -07:00
Konstantin Shcheglov 7b75a53fef Fix for regions reported with multiple targets.
We should merge them into single NavigationRegion(s) with multiple targets.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1403373018 .
2015-10-28 16:38:12 -07:00
pq 2f9c4af993 Error Suppression FTW.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1420363005 .
2015-10-28 09:59:05 -07:00