paulberry@google.com
531c591460
Completion support for loop labels.
...
Break and continue statements inside loops now have their targets
properly completed. Continue statements inside switch statements will
be addressed in a future CL.
R=danrubel@google.com
Review URL: https://codereview.chromium.org//812593008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42781 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 17:37:46 +00:00
danrubel@google.com
2005b07aea
Change code completion relevance from CompletionRelevance.LOW/DEFAULT/HIGH to int
...
This allows the sever to return a more graduated relevance
and facilitates moving client side prioritization over to the server.
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//845553005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42735 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 15:30:59 +00:00
danrubel@google.com
46df250c5a
suggest fields rather than synthetic getters
...
BUG=dartbug.com/21679
R=paulberry@google.com
Review URL: https://codereview.chromium.org//838053003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42712 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 19:35:52 +00:00
brianwilkerson@google.com
dd306dc9eb
Enable enum and deferred import support
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//829133007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42704 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 17:51:49 +00:00
danrubel@google.com
8393c92e89
exclude suggestions from other contexts
...
BUG=dartbug.com/21853
R=paulberry@google.com
Review URL: https://codereview.chromium.org//839713002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42668 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 17:16:37 +00:00
paulberry@google.com
94993d5cc1
Include required parameter names when completing a method call.
...
When a method such as "void m(int i, int j)" is completed, instead of
simply inserting "m()", we insert "m(i, j)", we highlight "i", and we
set up linked position groups for "i" and "j" so that the user can
press tab to move from one parameter to the next.
Optional parameters (both named and positional) are not handled by
this logic--the user must still enter them manually.
R=danrubel@google.com
Review URL: https://codereview.chromium.org//837793003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42667 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 16:57:39 +00:00
scheglov@google.com
138572182c
Getter elements should not have parameters.
...
R=danrubel@google.com
BUG=
Review URL: https://codereview.chromium.org//831263007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42617 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 23:22:20 +00:00
danrubel@google.com
bc9c340ec5
fix local setter suggestions
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//831273002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42599 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 17:26:51 +00:00
danrubel@google.com
d645d2dce2
fix top level getter suggestions
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//832343002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42597 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 15:55:15 +00:00
danrubel@google.com
78a3bfe9c2
refactor/cleanup dart completion cache
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//816233002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42556 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-22 22:09:46 +00:00
paulberry@google.com
6d7155de63
Introduce CompletionTarget to take the place of the Node being completed.
...
Instead of locating the node containing the cursor offset using a
NodeLocator, identify the edge in the parse tree which will be
displaced or modified by the completion proposal. This reduces the
number of cases that need to be handled in the _OpTypeAstVisitor, and
avoids the need for the _OpTypeAstVisitor to consider character
offsets in nearly all cases.
R=danrubel@google.com
Review URL: https://codereview.chromium.org//820773002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42543 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-20 15:47:25 +00:00
danrubel@google.com
d06e291c52
update completion cache key to include part directives
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//812233003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42542 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-20 05:17:58 +00:00
danrubel@google.com
e95dcac840
support part file completions
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//815683002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42541 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-20 05:15:50 +00:00
danrubel@google.com
049adb2777
refactor optype to be computed once per refactoring request
...
and hide optype computation internals
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//807743003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42412 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-16 22:15:38 +00:00
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
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
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
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
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
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
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
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
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
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
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
danrubel@google.com
d22c027e0a
add suggestions in format parameter list
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//693573003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41420 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 15:13:57 +00:00
danrubel@google.com
b7aeaab3f7
make deprecated elements have low suggestion relevance
...
BUG=dartbug.com/19615
R=scheglov@google.com
Review URL: https://codereview.chromium.org//690793004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41414 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 01:08:32 +00:00
danrubel@google.com
67071bd861
Refactor CompletionSuggestionKind
...
- Remove many CompletionSuggestionKinds that duplicate ElementKind
- Add two new CompletionSuggestionKinds: INVOCATION and IDENTIFIER
- regenerate Analysis Server Dart and Java API and docs
- rework Dart and Java tests
- remove/rename unused Dart and Java classes and methods
- remove unnecessary reference to SDK
BUG=
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//684183002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41396 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 16:09:56 +00:00
danrubel@google.com
e4b90d4cee
add class type alias suggestions
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//689433003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41388 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 02:48:31 +00:00
danrubel@google.com
98d9096892
add functional type alias suggestions
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//682953003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41376 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 22:03:16 +00:00
danrubel@google.com
2e5f738ad9
add type static constants suggestions
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//686843003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41369 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 21:03:36 +00:00
danrubel@google.com
1a68218c36
suggest imported functions in argument list
...
BUG=dartbug.com/21446
R=scheglov@google.com
Review URL: https://codereview.chromium.org//683133003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41368 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 19:03:37 +00:00
danrubel@google.com
b41bc7b57e
add property accessor suggestions
...
BUG=dartbug.com/21380
R=paulberry@google.com
Review URL: https://codereview.chromium.org//666863003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41344 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 22:56:26 +00:00
danrubel@google.com
946d40e8ac
improve element parameter string returned by local suggestion computer
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//664523003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41178 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-17 17:37:37 +00:00
danrubel@google.com
8da06376d3
update keyword suggestion priorities
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//666473002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41177 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-17 17:35:41 +00:00
danrubel@google.com
582b276b6f
filter invalid method invocation suggestions
...
and filter _ from local suggestions
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//651443006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41159 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-16 21:25:46 +00:00
danrubel@google.com
8d47e699d9
filter void methods when suggesting expression
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//658053002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41153 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-16 16:46:45 +00:00
danrubel@google.com
7c9dc9695b
add imported inherited member suggestions
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//643153003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41137 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-16 01:55:30 +00:00
danrubel@google.com
8465275f69
include locally inherited members in suggestions
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//657593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41114 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-15 03:25:20 +00:00
danrubel@google.com
be3cc6897b
exclude operators from "." suggestions
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//655733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41100 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-14 15:35:46 +00:00
danrubel@google.com
1766795d5f
improve method invocation and string interpolation suggestions
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//651953006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41091 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-14 06:07:58 +00:00
danrubel@google.com
db9357f408
(TBR) fix the build
...
BUG=
Review URL: https://codereview.chromium.org//643923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41040 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 13:12:52 +00:00
danrubel@google.com
eb0e7f5c0c
suppress suggestions in string literals
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//643803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41039 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 12:52:20 +00:00