Brian Wilkerson
4b6d9fdf39
Fix NPE when there is no keyword (issue 26630)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2050463002 .
2016-06-07 14:14:02 -07:00
danrubel
2d310f1e67
improve completions in closures and switch statements
...
This addresses several situations where the parser interprets "as" as
part of an "as" expression, but the user is trying to enter the "async"
keyword or an identifier starting with "as".
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2034713004 .
2016-06-06 08:09:44 -04:00
Konstantin Shcheglov
a6b93661fd
Fix two build failures - for typeProvider and findElement.
...
TBR
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2032893002 .
2016-06-01 18:54:10 -07:00
Brian Wilkerson
3fbb349629
Update status pages to include newer properties
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2023273002 .
2016-06-01 08:26:30 -07:00
Brian Wilkerson
62eb45dc32
Display additional context information in status pages
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2030573002 .
2016-06-01 08:11:31 -07:00
Florian Schneider
2a6847de41
Make some pkg tests less timing-dependent.
...
Testing should not depend on how long it takes to get a response from the
analysis server.
Depending on how long an analysis step takes, these tests will randomly fail
e.g. when run in -mdebug mode, or with other VM flags that change (i.e. slow-down)
timing (--trace-compiler, --optimization-counter-threshold=5"
There are probably more problematic places like this. I just fixed the ones that
I saw failing when running with --optimization-counter-threshold=5.
BUG=#26556
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2016993004 .
2016-05-30 12:14:16 +02:00
pq
fba5cbc425
Analyzer 0.27.4-alpha.9 (API fixes) ( #26562 ).
...
Restores `EmbedderUriResolver` API.
Addresses breakages in `dartdoc` and any other downstream dependencies.
See: https://github.com/dart-lang/sdk/issues/26562 .
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2021453003 .
2016-05-29 06:57:42 -07:00
Brian Wilkerson
6b04e74aa0
Guard against unresolved code (issue 26545)
...
R=jwren@google.com
Review URL: https://codereview.chromium.org/2013123002 .
2016-05-27 12:14:04 -07:00
Brian Wilkerson
08ce826f3b
Gather and report stats on the number of times flushed results are recomputed
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2005403005 .
2016-05-26 10:58:32 -07:00
pq
53fe39137f
Embedder support refactoring (phase 1).
...
A bunch of changes to pave the way for emebdder SDK summary creation.
* Moves _embedder.yaml processing into the embedder SDK (out of the resolver).
* Changes EmbedderUriResolver to compose rather than extend a DartUriResolver.
* Fixes the wierd handling (dropping to add back) of `dart:` URIs.
* Fixes the incorrect overriding docs for `SDKLibraryImpl.shortName`.
* Updates embedder test to include a definition of `dart:core` in anticipation of adding some embedder SDK tests.
Some API work TODO in a follow-up CL (notably the way we check for the presence of embedders by querying the resolver is odd).
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2009303002 .
2016-05-25 10:52:53 -07:00
Jaime Wren
e3af3c8d76
Code completion improvement. Recommend all 'E.x' where E is an enum, also, filter out only the correct enum types in named arguments.
...
BUG=https://github.com/dart-lang/sdk/issues/24759
Review URL: https://codereview.chromium.org/1989393002 .
2016-05-18 12:08:17 -07:00
Konstantin Shcheglov
67a500e134
Issue 26460. Add Quick Fix for missing 'Function.call()' implementation.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26460
Review URL: https://codereview.chromium.org/1981353002 .
2016-05-17 09:00:53 -07:00
Harry Terkelsen
1745ba77f5
fix all instances of "the the"
...
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1980573003 .
2016-05-13 12:38:25 -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
pq
40b03d2261
Server and CLI pubspec updates [TBR].
...
Should address version constraint issues introduced by dep on new plugin API.
BUG=
Review URL: https://codereview.chromium.org/1972193002 .
2016-05-12 06:21:46 -07:00
Brian Wilkerson
d87f9c09de
Update to use the latest version of the plugin package
...
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/1965083002 .
2016-05-11 09:54:29 -07:00
Konstantin Shcheglov
27650456d1
Improve completion after IfStatement.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1968883002 .
2016-05-11 08:36:27 -07:00
Florian Loitsch
fe1fda0766
Make dart:convert strong mode clean.
...
Also removes the ChunkedConverter.
R=lrn@google.com
Review URL: https://codereview.chromium.org/1964953003 .
2016-05-11 16:15:31 +02:00
Konstantin Shcheglov
cd7b7fc018
More tweaks for 'for' completion.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1963323003 .
2016-05-10 20:22:12 -07:00
Brian Wilkerson
3bf8b18680
More strong mode clean-up in server
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1966453002 .
2016-05-09 13:24:56 -07:00
Konstantin Shcheglov
522eaa9a80
Don't suggest types, getters, etc in 'for (Type ^)'.
...
Variable names should be suggested there.
It does not work for the moment, I'll need to make changes into
VariableNameContributor. But NOT suggesting all the garbage - for me
thi is 90% of the full solution ;-)
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1960783002 .
2016-05-09 12:30:15 -07:00
Konstantin Shcheglov
cf71ab114b
Suggest 'is' in 'if (x is^)'.
...
So, we don't treat is as an expression start, and don't suggest
inappropriate 'while', 'await', etc or identifiers.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1958733002 .
2016-05-06 14:36:43 -07:00
Konstantin Shcheglov
3775d92000
Suggest 'var' and 'final' in intializer of 'for'.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1953893004 .
2016-05-06 13:49:48 -07:00
Konstantin Shcheglov
b73b82221e
Fixes for completing 'for (var v in^)' and 'if (v is^)'.
...
The 'if (v is)' will require more work - we somehow manage to suggest
'if', 'final', 'switch', 'while', but NOT 'is'. But at least identifiers
are now out.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1956813004 .
2016-05-06 13:17:15 -07:00
Konstantin Shcheglov
fef82ec1e8
Update mock SDK 'double'.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1956443003 .
2016-05-05 14:12:53 -07:00
Konstantin Shcheglov
ada9cf43db
Issue 26355. Don't overwrite full index with declarations-only one.
...
What happens in this case is that when we analyze this project with
many (very small) files, we successfully index first declarations
(on computing RESOLVED_UNIT3) and then RESOLVED_UNIT. But when we attempt
to search, we ask for RESOLVED_UNIT, which is flushed. So, we compute it.
In the process we compute RESOLVED_UNIT3, and the listener in
_setupIndexInvalidation() indexes declarations, and overwrites the full
index.
There are several possible solutions, the simplest one is to not
overwrite any existing index information while indexing declarations.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/26355
Review URL: https://codereview.chromium.org/1946353004 .
2016-05-05 07:10:14 -07:00
Brian Wilkerson
08241e9072
More strong mode clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1947813002 .
2016-05-04 07:42:46 -07:00
Konstantin Shcheglov
fcf97b6c3d
Keep directive annotations while sorting.
...
In one of the previous CLs I sorted unit members and removed the
required @MirrorsUsed annotation.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1938023002 .
2016-05-02 10:09:38 -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
Konstantin Shcheglov
0f0b38dab3
Implement stable resolution of generic types without type arguments to their bounds.
...
R=brianwilkerson@google.com , leafp@google.com
BUG= https://github.com/dart-lang/sdk/issues/26265
Review URL: https://codereview.chromium.org/1927323002 .
2016-04-29 08:25:55 -07:00
Konstantin Shcheglov
470c5de12e
If the expected 'returnType' is 'null', just do not check it.
...
The completion tests are fragile and too sensitive to task model
changes. I have a change that inserts a new analysis result between
RESOLVED_UNIT3 and RESOLVED_UNIT4, and by doing this the next task to
perform resolves types in imported libraries. But in CC test we
continue performing analysis tasks and incidentally resolve something
what the 'null' checks don't expect.
So, I think we need to stop doing these checks.
If needed, we can check something directly by asking the state of some
analysis results from AnalysisContext.
R=jwren@google.com , danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org/1932003002 .
2016-04-28 13:15:33 -07:00
pq
870aa5e4f4
Pubspec-specified analysis configuration ( #26359 ).
...
Provides support for pubspec-specified analysis configurations.
Context: https://github.com/dart-lang/sdk/issues/26359
TODO:
* docs
* CLI support
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1923973004 .
2016-04-28 13:10:45 -07:00
Brian Wilkerson
ee8bb2cea9
Add a (public) utility method to clean-up code
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1925173002 .
2016-04-28 10:07:32 -07:00
Jaime Wren
1aee4602bc
Code completion bug fix, https://github.com/dart-lang/sdk/issues/26342 , and test cleanup in variable_name_contributor_test.dart
...
BUG=https://github.com/dart-lang/sdk/issues/26342
R=danrubel@google.com
Review URL: https://codereview.chromium.org/1924683002 .
2016-04-27 09:26:49 -07:00
Konstantin Shcheglov
78ca9cc10b
Fixes for SingleContextManager after experiments with two big codebases.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1926763002 .
2016-04-27 08:46:18 -07:00
Konstantin Shcheglov
5318eca65c
Watch analysis roots separately.
...
The context folder sometimes includes way too much.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1919343002 .
2016-04-26 11:33:50 -07:00
Konstantin Shcheglov
c6257ba52b
Add Driver.useSingleContextManager to turn on single context manager.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1915833007 .
2016-04-26 10:29:48 -07:00
Konstantin Shcheglov
099f227c17
Add test for 'refresh()' and clean up other tests.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1922743002 .
2016-04-26 07:16:44 -07:00
Konstantin Shcheglov
4cd1d552e4
We don't use path filter in SingleContextManager.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1916063003 .
2016-04-25 14:31:03 -07:00
Jaime Wren
086026307b
Plug VariableNameContributor contributor into completion_plugin.dart
...
BUG=https://github.com/dart-lang/sdk/issues/24254
R=danrubel@google.com
Review URL: https://codereview.chromium.org/1916213002 .
2016-04-25 14:01:22 -07:00
Konstantin Shcheglov
c9068a8692
Listen for changes in the context folder.
...
I had to convert several static methods into instance ones becuse I'd
like to use PathContext from the ResourceProvider.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1921863002 .
2016-04-25 13:51:47 -07:00
Jaime Wren
e01634bd79
Code completion progress part two of fix to https://github.com/dart-lang/sdk/issues/24254 , addition of new contributor, variable_name_contributor.dart.
...
The completions are not yet showing up in either IDE, IntelliJ or Atom.
BUG=https://github.com/dart-lang/sdk/issues/24254
R=danrubel@google.com
Review URL: https://codereview.chromium.org/1916893002 .
2016-04-25 12:51:14 -07:00
Konstantin Shcheglov
f892af36d8
Only add files that are match an analyzed files glob.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1922643002 .
2016-04-25 11:44:04 -07:00
Konstantin Shcheglov
44cedebded
Support for replacing of the context folder.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1920993002 .
2016-04-25 11:24:43 -07:00
Konstantin Shcheglov
337862bca2
Initial version of SingleContextManager.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1918893002 .
2016-04-25 08:38:38 -07:00
Jaime Wren
58bf3075a8
Code completion progress part one of fix to https://github.com/dart-lang/sdk/issues/24254 , addition of optype.includeVarNameSuggestions
...
BUG=https://github.com/dart-lang/sdk/issues/24254
R=danrubel@google.com
Review URL: https://codereview.chromium.org/1910263004 .
2016-04-22 11:00:21 -07:00
Brian Wilkerson
166f23e13f
Code clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1907323002 .
2016-04-22 09:05:01 -07:00
Jaime Wren
9c1c7ed250
Code Completion refactoring, follow up on comment in https://codereview.chromium.org/1908703002/ to cleanup boilerplate.
...
Also, changed all filters to use one typedef making the all function filters consistent and type checked.
R=danrubel@google.com
Review URL: https://codereview.chromium.org/1911803004 .
2016-04-21 12:19:28 -07:00
Jaime Wren
bfb5849f44
Code completion bug fix, don't suggest optional field formal parameters that are already in the constructor
...
BUG=https://github.com/dart-lang/sdk/issues/26255
R=danrubel@google.com
Review URL: https://codereview.chromium.org/1907723002 .
2016-04-21 10:46:35 -07:00
Jaime Wren
cc065a3ad0
Code completion improvement, use type information when suggesting constructors, part 2.
...
This finishes the work started with https://codereview.chromium.org/1892823003/ , by also adding the filter into the local_library_contributor.dart.
BUG=https://github.com/dart-lang/sdk/issues/26254
R=danrubel@google.com
Review URL: https://codereview.chromium.org/1908703002 .
2016-04-21 10:16:06 -07:00