danrubel@google.com
ddc3cae8bd
refactor duplicate code into single visitor
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//804323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42398 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 16:53:24 +00:00
scheglov@google.com
fef0e84293
Issue 21883. Add checks if type parameters can be used.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21883
Review URL: https://codereview.chromium.org//806933002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42377 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 00:29:22 +00:00
scheglov@google.com
a662ca1ea1
Disable 'Split && condition' if there is an 'else' statement.
...
R=danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//805053003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42374 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-15 20:36:13 +00:00
danrubel@google.com
438aa447d4
refine when suggestions are limited to types
...
BUG=dartbug.com/18860
R=paulberry@google.com
Review URL: https://codereview.chromium.org//802233002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42366 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-15 17:48:00 +00:00
danrubel@google.com
cd4ec28541
fix named constructor completion
...
BUG=dartbug.com/21799
R=paulberry@google.com
Review URL: https://codereview.chromium.org//803913003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42365 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-15 17:16:40 +00:00
danrubel@google.com
5599bc3a5b
fix invocation completion test
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//805683002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42364 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-15 17:14:36 +00:00
danrubel@google.com
7f1ac9a001
include local functions in completion suggestions
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//802163002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42363 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-15 17:11:38 +00:00
paulberry@google.com
0b9ed18603
Allow completions to wait for analysis without requiring a busy wait loop.
...
Two new methods are added to the AnalysisContext which return
Futures--the futures complete with the result of analysis once it's
available, avoiding the need for a busy wait loop in the completion engine.
The futures are guaranteed to complete eventually (provided that
analysis reaches quiescence). If it is determined that the requested
analysis will never become available (e.g. because analysis was
requested for a file or file/library combination that is not subject
to analysis), the future will be completed with an
AnalysisNotScheduledError, so that the client isn't stalled forever
waiting for analysis results.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//800723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42339 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-12 18:22:34 +00:00
scheglov@google.com
956e9e41ed
Fix for exchaning comparison operators arguments.
...
R=danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//800593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42299 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-11 21:07:14 +00:00
danrubel@google.com
45bebf8b76
filter imported element suggestions to reduce number of results sent to client
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//795633004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42289 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-11 17:18:13 +00:00
brianwilkerson@google.com
f58bf4dbc9
Remove old instrumentation
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//784623004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42267 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-10 21:53:08 +00:00
danrubel@google.com
6995092b9d
code completion for dynamic type elements
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//783383003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42261 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-10 19:09:29 +00:00
scheglov@google.com
495cb6d5bf
Issue 21801. Index redirecting constructor invocations.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21801
Review URL: https://codereview.chromium.org//783223003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42202 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-09 02:21:07 +00:00
scheglov@google.com
e30b2b313d
Ignore ButtonType when computing an extracted method return type.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//789543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42201 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-09 02:19:54 +00:00
scheglov@google.com
3b73b01511
Issue 21740. Allow inlining local variables declared in SwitchCase.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21740
Review URL: https://codereview.chromium.org//780653005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42191 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 22:33:07 +00:00
danrubel@google.com
f0bc442ea4
cache suggestions on change in priority sources
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//787663004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42189 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 22:00:16 +00:00
danrubel@google.com
8ef4de75cd
include lower relevance suggestions only if they are already cached
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//784853003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42172 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 18:56:43 +00:00
danrubel@google.com
cbbcadc423
remove unused cache arguments
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//787653002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42167 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 16:59:02 +00:00
danrubel@google.com
2d6a8357f3
make completion managers responsible for their own caches
...
- move cache out of CompletionDomainHandler into CompletionManager
- make CompletionManager longer lived
- move context and source fields out of DartCompletionManager and into superclass
- encapsulate information related to a specific request in new CompletionRequest rather than in the manager
- remove request specific information from CompletionManager creation
- use same ContextManager instance for consecutive requests on the same context/source pair
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//723263004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42157 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-07 19:31:59 +00:00
scheglov@google.com
0cd030eeb8
Issue 21613. Fix for renaming FieldFormalParameterElement.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21613
Review URL: https://codereview.chromium.org//749173002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41929 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 16:00:28 +00:00
scheglov@google.com
2996ef1754
Issue 21650. Fix linked positions added after insert code buffers.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21650
Review URL: https://codereview.chromium.org//750423002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41928 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 15:52:58 +00:00
scheglov@google.com
a255faf85c
Exchanging operands of a comparision operator should invert the operator.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//756483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41927 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 15:51:47 +00:00
scheglov@google.com
52d55e933d
Issue 21662. Fix 'Sort Members' when both directives and declarations are updated.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21662
Review URL: https://codereview.chromium.org//753883003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41926 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 15:50:19 +00:00
danrubel@google.com
be636515be
refactor import caching to exclude suggestions for inherited members
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//752833002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41925 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 12:28:07 +00:00
scheglov@google.com
703b744966
Issue 21655. Don't import self when add type declaration.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21655
Review URL: https://codereview.chromium.org//747613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41869 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 22:10:57 +00:00
danrubel@google.com
a714eb2faf
cache import suggestions
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//742163002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41865 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 19:31:31 +00:00
scheglov@google.com
91c02b4a8e
Issue 21618. Fix for empty code for 'dynamic' type.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21618
Review URL: https://codereview.chromium.org//731313004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41838 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 17:42:29 +00:00
scheglov@google.com
58587a470e
Rollback r41807.
...
As discussed, it is not compatible with the incremental analysis.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//736603005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41809 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-18 18:50:28 +00:00
scheglov@google.com
4032b4d86b
Use shorter DartElementLocation.
...
This improves analyzer + analysis_server analysis time from 21841 ms to 19839 ms.
I.e. about 9% faster.
However it is still 25% slower than without index at all - 15593 ms.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//738673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41807 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-18 16:21:01 +00:00
scheglov@google.com
b8da9bc651
Format and sort analyzer and analysis_server packages.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//725143004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41792 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 22:23:53 +00:00
danrubel@google.com
f60be24eb8
add code completion cache
...
- generic mechanism for use in a subsequent CL
- minor get_handler import cleanup
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//729193002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41778 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 15:13:38 +00:00
scheglov@google.com
30e11469c3
Use a better way to compute InterfaceTypes least upper bound.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//730803003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41761 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-15 16:52:58 +00:00
scheglov@google.com
0f0a275fc7
Issue 21612. Support for multiple returns in the 'Extract Method' refactoring.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21612
Review URL: https://codereview.chromium.org//725393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41758 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-15 01:40:46 +00:00
scheglov@google.com
6a03e08cca
Issue 21617. Replace explicit 'this' references and clean ups.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21617
Review URL: https://codereview.chromium.org//733663002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41753 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 23:16:13 +00:00
scheglov@google.com
9e4a3ec845
Report HintCode.UNUSED_FIELD
...
There are two positives in dart2js, valid as I can see.
There are several positives in analyzer and analysis_server.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//728503003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41727 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 23:12:40 +00:00
paulberry@google.com
9bc06fbf41
Workaround for ConstantVisitor dependency issues.
...
This restores proper test functionality on the buildbots. I plan to
follow up with a more permanent fix.
BUG=dartbug.com/21572
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//701583003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41676 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 22:55:58 +00:00
scheglov@google.com
7e71785a58
Issue 20827. Add imports as needed the 'Add type annotation' Quick Assist.
...
I left some TODOs, the CL is big enough already.
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20827
Review URL: https://codereview.chromium.org//706263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41620 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 23:21:35 +00:00
danrubel@google.com
7e7f3ce68c
display completion performance in new server status page
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//691853006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41612 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 18:10:51 +00:00
danrubel@google.com
d3646956e8
first cut argument list completion suggestions
...
- first cut simplistic insertion of params
- required params only for now
- move cursor after ) if no params
- don't insert () if identifier suggestion
- does not cover all method/function invocations yet
- updated comments in Server API
- extracted new declaration visitor
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//711533003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41586 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 21:42:31 +00:00
scheglov@google.com
772a0c6b22
Fix 'Unused local variable' hints in analyzer and analysis_server.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//709493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41576 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 18:32:54 +00:00
scheglov@google.com
ca91f9f770
Report HintCode.UNUSED_LOCAL_VARIABLE for local variables whose value is never used.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//686113007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41568 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 17:00:28 +00:00
scheglov@google.com
df6233ae4a
Use Element's source paths instead of URIs as a key in the index.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//703963002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41530 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 21:02:37 +00:00
scheglov@google.com
1d69da9c39
Issue 21496. Fix for inlining negate/decrement into negate.
...
R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21496
Review URL: https://codereview.chromium.org//695383002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41466 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 20:29:57 +00:00
scheglov@google.com
15743f701e
Support for inlining methods when some arguments are missing.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//694373002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41464 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 18:35:58 +00:00
scheglov@google.com
47532a7ba5
Tweak test for the new resolved/parsed AST management and restore it.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//695923003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41454 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-01 05:28:46 +00:00
scheglov@google.com
8bd5c75f0c
Fix for 'Replace if-else with conditional expression' in case of mixed expression/return branches.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//690353002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41446 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 19:22:22 +00:00
scheglov@google.com
b7c685bbe2
Support for 'Add Type Annotation' when selection if right after ';'.
...
R=brianwilkerson@google.com , danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//693193002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41445 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 19:09:03 +00:00
brianwilkerson@google.com
e9696e5f67
Clean up logging uses
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//685993004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41443 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 19:05:19 +00:00
danrubel@google.com
58b915ffea
move import combinator suggestions into a separate computer
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//695773003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41442 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 18:31:18 +00:00
brianwilkerson@google.com
9dad99f92c
Disable a test until I can fix it
...
Review URL: https://codereview.chromium.org//655353005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41428 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 21:47:58 +00:00