danrubel@google.com
47128e2603
completions in map literals
...
BUG=dartbug.com/22784
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1002713003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44432 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 15:24:57 +00:00
danrubel@google.com
8a04710a47
add completion in type argument list
...
BUG=dartbug.com/22584
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1005483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44431 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 15:20:08 +00:00
danrubel@google.com
fcc0559acd
completions for function return type
...
BUG=dartbug.com/22686
R=scheglov@google.com
Review URL: https://codereview.chromium.org//999923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44415 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 21:19:57 +00:00
danrubel@google.com
fc4de72889
completion for method return type after comment
...
BUG=dartbug.com/22686
R=scheglov@google.com
Review URL: https://codereview.chromium.org//996263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44409 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 17:44:25 +00:00
danrubel@google.com
6c1a40377c
fix completion target handling of comments
...
The intent is to normalize the completion target returned given different comment arrangements.
This is a precursor to the fix for code completions given preceeding comments.
BUG=dartbug.com/22686
R=paulberry@google.com
Review URL: https://codereview.chromium.org//985183003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44408 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 17:38:53 +00:00
paulberry@google.com
29c0fb7cd6
Add an analyzer option to properly check ".call" methods.
...
Enabling this option fixes issue 21938. For now the option is
disabled by default, since there is a lot of code in the dart SDK (and
in third_party) that isn't warning clean with this option enabled.
Once the SDK and third_party code have been cleaned up, we should be
able to turn this option on permanently.
BUG=dartbug.com/21938
R=scheglov@google.com
Review URL: https://codereview.chromium.org//994253002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44390 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 00:35:31 +00:00
brianwilkerson@google.com
50dfd3c1ff
Handle IO exception in ContextManager
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//995873002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44377 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 16:15:05 +00:00
brianwilkerson@google.com
3f2c48008f
Fix NPE in ContextManager
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//996773002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44376 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 16:13:43 +00:00
jwren@google.com
dbcce3568e
Fix for dartbug.com/22656- analysis.flushedResults implementation.
...
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//987143002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44373 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 14:54:00 +00:00
scheglov@google.com
51870ff901
Quick Fix for using similarly named field/getter/setter instead of undefined.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//991133003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44357 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 03:09:00 +00:00
scheglov@google.com
2e77fcdd11
Add an optional 'typeParameters' to Element.
...
Also use it in Editor, e.g. in Outline.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//990343002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44349 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 22:02:44 +00:00
scheglov@google.com
7a8603736d
Quick Fix for returning Future from 'async' functions.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//987173002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44348 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 21:35:31 +00:00
scheglov@google.com
faab2d3863
Don't schedule indexing operations if index is null.
...
R=jwren@google.com
BUG=
Review URL: https://codereview.chromium.org//993723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44347 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 21:27:36 +00:00
brianwilkerson@google.com
ea3790c960
Fix for issue 22733
...
R=danrubel@google.com
Review URL: https://codereview.chromium.org//994723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44336 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 19:12:55 +00:00
brianwilkerson@google.com
d954183441
Change all sources associated with changed files (issue 22680)
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//981283003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44335 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 18:28:21 +00:00
scheglov@google.com
9df7bc68b5
Allow sending duplicate notifications.
...
This will "unfix" dartbug.com/22210 , but at the same time it will
remove most of of expensive AnalysisContext calculations introduced
in https://code.google.com/p/dart/source/detail?r=44305
It reduces "notices" tag percentage from 15 to a little above 3.
Also, we don't produce errors for external sources, which was the
main problem in dartbug.com/22210.
There is also the same expensive computation in execution domain.
I will address it in a separate CL.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//986663004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44330 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 16:57:28 +00:00
scheglov@google.com
60d4a29500
Fix for subscribing for notifications for files in packages.
...
Unfortunately this fix makes the server about 20% slower.
This is mostly because of the check in scheduleNotificationOperations(),
as required to fix dartbug.com/22210. I think it is much cheaper to send
duplicate notifications, like outline or navigation, than to check if
they should not be sent.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//987663002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44305 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 22:55:20 +00:00
brianwilkerson@google.com
fafa5d79c7
Convert content cache to use file paths
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//983183003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44300 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 19:22:44 +00:00
danrubel@google.com
b9baf4be94
add completions after final keyword
...
BUG=dartbug.com/22683
R=scheglov@google.com
Review URL: https://codereview.chromium.org//978923006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44277 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 02:02:28 +00:00
danrubel@google.com
45118de875
remove type suggestion when interpolation completion
...
BUG=dartbug.com/21518
R=scheglov@google.com
Review URL: https://codereview.chromium.org//982983003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44276 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 01:58:42 +00:00
paulberry@google.com
e3d272c1dd
Don't send notifications for disposed contexts.
...
This ensures that once analysis.flushResults is implemented, we won't
accidentally send a stale notification for a file after flushing its
results.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//988593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44275 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 01:15:13 +00:00
brianwilkerson@google.com
0b6be85434
Guard against exception when accessing folder
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//988533002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44272 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 22:38:37 +00:00
danrubel@google.com
f8b6da83c6
When target requires a function, propose a function reference, not an invocation
...
BUG=dartbug.com/22360
R=scheglov@google.com
Review URL: https://codereview.chromium.org//977223003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44271 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 21:25:58 +00:00
brianwilkerson@google.com
9004e91fec
No errors in third-party packages (issue 22170)
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//983733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44270 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 20:17:24 +00:00
danrubel@google.com
b820aef91c
fix constructor suggestion element names
...
BUG=dartbug.com/22158
R=scheglov@google.com
Review URL: https://codereview.chromium.org//962243003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44183 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 17:03:24 +00:00
scheglov@google.com
75fc8fd45c
Some clean-ups for Index / SearchEngine.
...
1. Remove the TODO, it is better to keep searchTopLevelDeclarations() returning Future,
for consistency and possible future changes.
2. Rename IndexStore.recordTopDeclaration() to recordTopLevelDeclaration().
Sorry, I missed it initially.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//975753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44182 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 16:54:56 +00:00
danrubel@google.com
7c9de023c2
include library prefix suggestions when suggesting constructors
...
BUG=dartbug.com/22158
R=scheglov@google.com
Review URL: https://codereview.chromium.org//972193002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44179 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 16:51:18 +00:00
scheglov@google.com
1183b3b35a
When a closure is extracted as a method, it does not have any return type.
...
But it should not be returned as 'void'.
It should be an empty string, as any other method with unknown return type.
I guess we could improve this in the future, e.g. promote type of a returned expression into the signature.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//970063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44177 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 16:17:33 +00:00
scheglov@google.com
d69f9043cd
Don't allow to extract a closure as a getter.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//971203002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44176 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 16:15:47 +00:00
danrubel@google.com
7e9557cb39
add arguments to constructor completions
...
BUG=dartbug.com/22158
R=scheglov@google.com
Review URL: https://codereview.chromium.org//972933002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44174 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 15:58:50 +00:00
lukechurch@google.com
fc38d660ee
Static SPPM-n1 model for Dart Core API usage
...
R=danrubel@google.com
Review URL: https://codereview.chromium.org//968283003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44158 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 01:15:52 +00:00
brianwilkerson@google.com
cd58e290c4
Reformat
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//969113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44151 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 22:43:12 +00:00
scheglov@google.com
253658afa8
Optimize top-level element declarations search.
...
No limits on the number of returned matches yet.
With this CL it takes about 20 ms for one-character regexp, vs. 200+ ms before.
The Editor UI is still not quite fast, we need to set some limits there too.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//971833003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44145 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 19:56:13 +00:00
brianwilkerson@google.com
268cd8bab2
API clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//970913002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44134 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 17:28:37 +00:00
danrubel@google.com
2a88570c8f
update comments for http diagnostic port
...
BUG=
R=lukechurch@google.com
Review URL: https://codereview.chromium.org//957263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44131 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 15:17:56 +00:00
scheglov@google.com
fde14c072a
Issue 22593. Quick fix 'import library' for typedefs.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22593
Review URL: https://codereview.chromium.org//965013002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44112 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-28 01:40:34 +00:00
scheglov@google.com
1a7ac64ae2
Don't remove indexing operations on potential source changes.
...
This covers the following scenario:
1. User performs an undo operation in a save editor.
2. Editor updates the file buffer, so sends 'add overlay'.
Server performs an incremental analysis and schedules an 'analyze' operation.
3. The 'analyze' operation runs and schedules 'index' operation.
4. Editor saves the file buffer.
Editor sends 'remove overlay command'.
Server removes all the scheduled notification and index operations for the file.
Server notices that there is no real change for the file, so the is nothing to do.
But it still reschedules notifications, because the client might have lost some information.
5. Notifications are resent, but indexing is not performed.
So, the solution is to reschedule indexing operation.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//958373003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44111 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-28 01:34:56 +00:00
danrubel@google.com
f54675b398
throw exception to stop visiting
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//967643002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44105 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-27 21:41:30 +00:00
danrubel@google.com
a2baa0f2ba
remove unused imports
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//962323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44104 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-27 21:09:29 +00:00
danrubel@google.com
d91099d6cb
fix invocation completion with trailing stmt
...
BUG=dartbug.com/22365
R=scheglov@google.com
Review URL: https://codereview.chromium.org//965753003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44100 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-27 18:42:41 +00:00
scheglov@google.com
d3ceb5ce50
Use String.replaceRange() instead of concatenation.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//960653003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44079 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 22:25:07 +00:00
scheglov@google.com
944fd2ccdd
Issue 22575. Fix for type hierarchy from FieldElement.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22575
Review URL: https://codereview.chromium.org//962743003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44077 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 22:22:31 +00:00
brianwilkerson@google.com
5a4919c270
Add instrumentation (issue 22572)
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//956103002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44071 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 19:54:36 +00:00
danrubel@google.com
6a90488fc8
cache pub list results
...
BUG=
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//941883002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44062 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 17:24:08 +00:00
scheglov@google.com
98c9558a23
Issue 20827. Import required type in 'Extract Method' refactoring.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20827
Review URL: https://codereview.chromium.org//956393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44059 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 17:08:13 +00:00
scheglov@google.com
ec8ab11a9d
Issue 20827. Extract library importing helper and use it fox Quick Fixes.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20827
Review URL: https://codereview.chromium.org//961583002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44052 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 15:57:10 +00:00
scheglov@google.com
08cff379ca
Don't propose 'Assign to local variable' when in arguments list.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//943053005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44036 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 01:34:25 +00:00
scheglov@google.com
7c257183de
Issue 21804. Type hierarchy should show overrides in mixins.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21804
Review URL: https://codereview.chromium.org//956023003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44033 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-25 22:53:19 +00:00
scheglov@google.com
d7672348a1
Issue 21978. Put function 'main' first when sorting members.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21978
Review URL: https://codereview.chromium.org//961443004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44032 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-25 22:40:26 +00:00
brianwilkerson@google.com
49a2b92b29
Measure time spent running pub
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//959543005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44031 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-25 21:37:15 +00:00