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
pq
8cd8d219ca
Handle incomplete rule options gracefully.
...
Net-net: this fixes the case where we get storms of UNDEFINED_LINT_WARNINGs when parsed yaml nodes have null values.
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1752183003 .
2016-03-03 09:58:30 -08:00
Konstantin Shcheglov
80531d974d
Make SearchMatch usable for the new index - remove the element field.
...
The 'element' is still accessible, but as a computed property.
In many cases we don't need to know the containing element, and need
only the unit source, or the LibraryElement. So, by computing it on
demand we may save some time and make SearchMatch usable with the
new index - where we don't know the Element.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1764553002 .
2016-03-03 08:40:57 -08:00
Leaf Petersen
7d2976c7d5
Add instantiate method on ParameterizedType and InterfaceType,
...
and deprecate the old substitute4 in favor of instantiate.
BUG=
R=brianwilkerson@google.com , jmesserly@google.com
Review URL: https://codereview.chromium.org/1758913002 .
2016-03-02 15:06:38 -08:00
Konstantin Shcheglov
c9e82c7e67
Fill the new index in Analysis Server.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1749333004 .
2016-03-02 14:00:17 -08:00
Konstantin Shcheglov
faf59757c8
Optimize ElementId search, rename the test file.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1755313002 .
2016-03-02 13:02:52 -08:00
Konstantin Shcheglov
6d1bf8b0fa
Initial new index implementation.
...
Only getRelations() is implemented, and maybe not the most performant
implementation yet.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1755263002 .
2016-03-02 12:05:05 -08:00
pq
d223676c7f
Fix @override quick-fix to respect doc comments.
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1751163002 .
2016-03-01 13:01:57 -08:00
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
pq
6a75757e47
Updated hasFix(...).
...
Follow-up to: https://codereview.chromium.org/1736383002/
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1741133002 .
2016-03-01 08:32:48 -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
Brian Wilkerson
4d9aa3edf4
Remove more methods from context manager callbacks
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1741663003 .
2016-02-29 10:43:55 -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
Paul Berry
12a7ccaa52
Don't call deprecated "isPotentiallyMutated..." API from analysis server.
...
Analysis server's use of this API was just for generating debug status
anyhow.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1711003002 .
2016-02-18 10:20:48 -08: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 Slesinsky
c578120504
Throw a better exception for a modified analysis cache key
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1698093004 .
2016-02-16 16:26:05 -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
748ad91b64
rework LocalLibraryContributor to resolve referenced units
...
This is similar reworking code completion import resolution
https://codereview.chromium.org/1693933002/
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1692273003 .
2016-02-13 23:07:51 -05:00
Brian Wilkerson
bcaedf2b7f
The exception occurs because the type can be set to null if the element is either a parameter or local variable element. This might be a change since the time this code was originally written.
...
R=danrubel@google.com
Review URL: https://codereview.chromium.org/1688493002 .
2016-02-10 10:49:47 -08: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
Paul Berry
c43622e897
Use ElementAnnotation as the ConstantEvaluationTarget for annotations.
...
Previously, we had a special class,
ConstantEvaluationTarget_Annotation, for this purpose. It held on to
a the AST node for the annotation. This was bad because it meant that
the presence of any ConstantEvaluationTarget_Annotation referring to a
given compilation unit would keep the entire compilation unit's AST in
memory.
Now we copy just the portions of the AST we need into
ElementAnnotation, just as we do for all other constant evaluation
targets. In addition to saving memory, this paves the way for
supporting annotations in summaries, by making it possible to compute
the constant value of an annotation without having to consult the full
AST.
Fixes #25285 .
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1665353002 .
2016-02-04 15:22:40 -08:00
pq
9bec38cca9
Enumerate resolvers on context status page.
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1665343002 .
2016-02-04 14:29:31 -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
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
Brian Wilkerson
3ef79232ad
Add indication of resolver provider to the status page
...
R=jwren@google.com
Review URL: https://codereview.chromium.org/1653093002 .
2016-02-01 11:36:07 -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
bb73ff38bc
Fix build: _addFix_addAsync_asyncFor() does not return.
...
TBR
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1656693003 .
2016-02-01 08:49:25 -08:00
Brian Wilkerson
5b95009a6b
Move ResolverProvider to analyzer so that it can be shared
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1658663002 .
2016-02-01 08:12:29 -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
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
Paul Berry
201e980fd2
Rework recent changes to LineInfo to be backward compatible.
...
Commit 1ecd06d39c introduced a new getter
to the LineInfo class, breaking clients such as linter that use
LineInfo in an `implements` clause.
This CL reworks the change to be backward compatible. It may be
reverted once we are ready to roll to a new major version of analyzer.
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1625783002 .
2016-01-23 17:33:20 -05: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
Brian Wilkerson
1ecd06d39c
Add a count of total lines to status performance page
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1622713002 .
2016-01-22 14:37:29 -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
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
Brian Wilkerson
d8df717622
Add list length information to the status pages
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1588083003 .
2016-01-14 13:53:53 -08:00