Commit Graph

3160 Commits

Author SHA1 Message Date
scheglov@google.com a38a503d86 Replace @ReflectiveTestCase() with @reflectiveTest.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//849863002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42821 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 17:11:24 +00:00
danrubel@google.com 0974f8b1ea insert parameters when completing imported functions and inherited methods
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//811933007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42808 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 14:10:47 +00:00
paulberry@google.com cebcc398f6 Add support for completion of case labels.
This change addresses completions like the following:

  switch (...) {
    foo: case 1:
      ...
    bar: case 2:
      continue ^;
    baz: case 3:
      ...
  }

Completion at the point marked "^" will show "foo", "bar", and "baz"
as possible completions.

R=danrubel@google.com

Review URL: https://codereview.chromium.org//806473007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42799 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 03:11:46 +00:00
scheglov@google.com 1c24293cb1 Reset compilation unit in notification, as it might be damaged.
This should fix the navigation computer crash.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//846973002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42792 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 23:07:32 +00:00
paulberry@google.com adcffd8bf5 Fix checking of generated directory contents.
R=jwren@google.com

Review URL: https://codereview.chromium.org//811973010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42789 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 22:19:58 +00:00
jwren@google.com 473438f940 Addition of AnalysisServer.isSocketOpen for clients to know if the server is still running.
Execution of generate_all for recent changes to the analyzer spec input, and resulting changes to have editor and the java server layer compile.

R=paulberry@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//845973006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42787 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 21:46:59 +00:00
danrubel@google.com 14a97cafed suggest fields rather than synthetic getters
and return dynamic returnType rather than null

BUG=dartbug.com/21679
R=paulberry@google.com

Review URL: https://codereview.chromium.org//791553007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42786 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 19:02:47 +00:00
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
brianwilkerson@google.com 4a8c341ecf Server clean-up
R=scheglov@google.com

Review URL: https://codereview.chromium.org//795833005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42780 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 17:34:14 +00:00
scheglov@google.com 214a2380ca Fix for NPE in the index store.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//823223003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42777 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 16:38:52 +00:00
brianwilkerson@google.com b161853940 Minor clean-ups and rename
R=scheglov@google.com

Review URL: https://codereview.chromium.org//840473007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42776 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 16:36:14 +00:00
scheglov@google.com 82d7224537 Style changes in assist and fix.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//825363003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42760 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 23:18:03 +00:00
scheglov@google.com e84aa1aa54 Fixes for linked and exit positions offsets.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//843163002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42757 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 22:31:42 +00:00
brianwilkerson@google.com 11c0e607a0 Make domains plugable
R=scheglov@google.com

Review URL: https://codereview.chromium.org//846723002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42756 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 22:15:20 +00:00
paulberry@google.com db4c9543ac Remove computation with no effect from local completion computer.
The computation performed by _computeExcludeVoidReturn was always
being overwritten by the caller right after construction, so it had no
effect.

R=danrubel@google.com

Review URL: https://codereview.chromium.org//830153004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42752 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 19:28:52 +00:00
pquitslund@google.com f781ec6675 Add generateLints analysis option to the Server protocol API.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//806943004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42745 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 17:38:43 +00:00
brianwilkerson@google.com 9fb54ea3db Capture log messages via instrumentation
R=scheglov@google.com

Review URL: https://codereview.chromium.org//840553004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42741 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 17:06:44 +00:00
paulberry@google.com c35a4acd9c Fix order of operations dependencies in element_references_test
It's not safe for a single test to have two overlapping calls to
findElementReferences() because fields in the test class are used to
hold the search results and to keep track of whether more results are
pending.

Fixes a bogus test failure that arose after the relative ordering of
futures and microtasks was changed.

BUG=dartbug.com/22014
R=scheglov@google.com

Review URL: https://codereview.chromium.org//842803003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42738 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 16:36:42 +00:00
brianwilkerson@google.com b7de258068 Initial plugin API
R=danrubel@google.com, pquitslund@google.com

Review URL: https://codereview.chromium.org//839833002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42736 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 15:57:51 +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
scheglov@google.com 05ac43c3ea Issue 22027. When parameters has function type alias type, use its name.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22027

Review URL: https://codereview.chromium.org//836413006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42720 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 22:10:36 +00:00
scheglov@google.com 3f6fc86c14 Remove remaining references to Angular and Polymer from the analysis server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//842753004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42713 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 19:37:19 +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
pquitslund@google.com e259b02b92 Adds LINTs to the server's generated protocol.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//838283002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42711 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 19:05:48 +00:00
scheglov@google.com 11b1c09a10 Remove the Polymer support from the analyzer and analysis_server packages.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//830893003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42709 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 18:43:13 +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
pquitslund@google.com faba1283b6 Lint error type for server.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//846493002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42703 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 17:42:45 +00:00
scheglov@google.com 4fe7a9dd3e Remove Angular support from the analyzer and analysis_server packages.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//844593003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42697 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 16:04:17 +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
brianwilkerson@google.com 54df418597 Enable async support
R=danrubel@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//842503003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42666 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 16:51:14 +00:00
brianwilkerson@google.com ee26309ffb Add format API
R=pquitslund@google.com, rnystrom@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//809213003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42648 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 22:45:41 +00:00
paulberry@google.com 6d83e207b2 Fix comment on ArgListComputer.
R=danrubel@google.com

Review URL: https://codereview.chromium.org//809883003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42641 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 18:49:13 +00:00
scheglov@google.com 603ca51eec Add a flag/options for enabling incremental resolution validation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//839553005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42640 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 18:17:17 +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
scheglov@google.com 9f64a926e6 Issue 21959. Check that type of parameters in 'Extract Method' occurrences are exactly the same.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21959

Review URL: https://codereview.chromium.org//832343004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42615 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 23:12:27 +00:00
scheglov@google.com 409fcc9d44 Fix for 'await' highlighting in for-each.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//835953002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42610 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 20:01:05 +00:00
scheglov@google.com 712cd7cc87 Check if assists are requested on a invalid offset.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//823103003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42609 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 19:58:20 +00:00
scheglov@google.com dca42cafab Check if the method / accessor being inlined is synthetic.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//835093005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42606 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 19:36:39 +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
scheglov@google.com f6d7bd629f Improve tests for refactoring exceptions. Catch initial exceptions.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//816133002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42574 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-30 18:50:57 +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
scheglov@google.com d139fbfaa2 Add InstrumentationService.logPriorityException() and use logException() in refactorings.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//816103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42530 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 23:00:19 +00:00
scheglov@google.com 97f90d4acc Fix for extracting from interpolated string.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21907

Review URL: https://codereview.chromium.org//820763002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42528 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 22:11:13 +00:00
scheglov@google.com 11bdb14559 Catch exceptions in refactorings and return them as a SERVER_ERROR.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21907

Review URL: https://codereview.chromium.org//815233002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42526 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 21:51:02 +00:00
brianwilkerson@google.com a49d0f02c9 Instrument top-level exceptions
R=paulberry@google.com

Review URL: https://codereview.chromium.org//797503004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42513 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 17:11:02 +00:00