Commit Graph

4090 Commits

Author SHA1 Message Date
paulberry@google.com 099b8ba634 Add placeholder test for completion domain.
R=jwren@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38642 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 19:05:25 +00:00
scheglov@google.com e24d5aacfc Implementation of the 'search.getTypeHierarchy' API.
R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38626 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 15:52:28 +00:00
scheglov@google.com 33e44b90b0 Implement more fixes.
R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38571 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-25 03:21:09 +00:00
paulberry@google.com b598db2dcc Start writing analysis server integration test for 'completion.getSuggestions'.
The test is currently incomplete (and hence disabled) due to
dartbug.com/20188.

R=jwren@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38559 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-24 22:08:10 +00:00
scheglov@google.com f96087b9c1 Drop 'errorToJson', use server's AnalysisError.
R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38550 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-24 20:21:12 +00:00
scheglov@google.com aba0cfa4e6 Remove any 'group' invocations enclosing 'runReflectiveTests'.
R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38547 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-24 18:08:45 +00:00
paulberry@google.com 61d702cc89 Handle bad data in analysis server integration tests.
If bad data is received from the analysis server (e.g. a stacktrace),
switch on debugging output, let the integration test run for 1 more
second (to collect the entire stacktrace), and then fail the
integration test.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38545 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-24 17:39:25 +00:00
scheglov@google.com b3054315da Send responses for any pending 'analysis.getErrors' requests during context removal.
R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38544 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-24 17:34:06 +00:00
paulberry@google.com 9861f6e1d0 Use package root in analysis server integration tests.
R=jwren@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38527 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 23:59:32 +00:00
paulberry@google.com 01d0779b85 Allow an analysis server response to have both "error" and "result" fields.
Usually this won't happen, but there are rare cases where it might
(e.g. an unexpected exception occurs while analyzing a file in
response to analysis.getErrors, and some error information has already
been successfully computed).

So it seems best to allow it in the integration tests.

R=jwren@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38516 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 18:10:10 +00:00
scheglov@google.com 6b7184ba97 Implementation of the 'analysis.getErrors' API.
R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38476 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-22 21:24:11 +00:00
scheglov@google.com 4a722c5958 Implementation of the 'edit.getFixes' API in server.
R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38473 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-22 20:45:51 +00:00
paulberry@google.com 9f49af72fc As a temporary measure, allow SDK to be specified on analysis server cmd line.
Once the 'analysis.updateSdks' request is functional, this should be
unnecessary.  But for now, allow the default SDK to be set via the
command line so that we don't block development of editor plugins.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38443 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-21 21:50:59 +00:00
danrubel@google.com 256e11dd57 more progress implementing analysis server code completion
- add more properties returned by completion suggestion
- move completion suggestion into services
- move property constants into services for use by completion services
- move HasToJson into services for completion
- remove duplicate completion test

BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38418 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-21 02:04:49 +00:00
scheglov@google.com fc6ce5cce6 Use futures uniformly rather than a mix of futures and CPS in tests.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38397 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 16:22:29 +00:00
paulberry@google.com 05e4acbc0d Fix analysis server 'analysis.getHover' when there is no hover information.
Previously we returned {'hovers': [null]}.  We now return {'hovers': []}.

Also, tweak the analysis.getHover unit tests to use futures uniformly
rather than a mix of futures and CPS.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38366 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 03:30:19 +00:00
paulberry@google.com b660abdcc6 Three new analysis server integration tests
1. server.setSubscriptions (invalid service)
2. analysis.getHover (normal operation)
3. analysis.getHover (no hover information available)

Test 3 is disabled because it currently fails due to an analysis
server bug.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38364 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 02:20:53 +00:00
danrubel@google.com d6497d280c denote completion offset using special character
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38349 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 21:41:01 +00:00
danrubel@google.com 2bd9f4ec92 first cut simple code completion results
- not all CompletionSuggestions implemented yet
- results valid in only a few situations
- more to come

BUG=
R=brianwilkerson@google.com, scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38347 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 21:11:39 +00:00
scheglov@google.com 514ca3d6b4 Revert using relative paths because of the problems with the Pub bots.
R=brianwilkerson@google.com, nweiz@google.com, paulberry@google.com, danrubel@google.com, rnystrom@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38345 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 20:42:07 +00:00
paulberry@google.com 44a7ca5254 Remove 'errorCode' field from AnalysisError in the analysis server API.
R=brianwilkerson@google.com, scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38331 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 15:05:21 +00:00
paulberry@google.com 045aa3e5bd More integration tests for analysis server.
This covers everything in the "server" domain except for server.error
(which is difficult to test since it should only occur in the event of
a server bug).

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38319 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 23:46:36 +00:00
scheglov@google.com bd010c2cd3 Improve occurrences calculation - merge accessors, members.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38314 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 22:20:44 +00:00
scheglov@google.com 3317e79eed Search only for potential name references to Class members.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38309 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 20:40:34 +00:00
scheglov@google.com d82723de9d Fix for name declaration indexing in for-in statement.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38306 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 20:18:32 +00:00
paulberry@google.com 6ab7a41e1f Start writing integration tests for the analysis server.
R=brianwilkerson@google.com, jwren@google.com, scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38288 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 16:02:24 +00:00
scheglov@google.com 907d89258a Implementation of the 'search.findMemberDeclarations' API.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38286 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 15:42:33 +00:00
scheglov@google.com 7dafd0a143 Implementation for the 'search.findMemberReferences' API.
It seems that implementation if very simple, so I will put it inline instead of a separate file.
The previous 'search.findMemberDeclarations' CL will be updated before commit.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38285 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 15:33:35 +00:00
scheglov@google.com 9a0e356bc4 Implementation for 'search.findTopLevelDeclarations' API.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38269 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 00:25:08 +00:00
scheglov@google.com 9903444d04 Include 'element' into 'search.findElementReferences' response.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38268 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 00:19:27 +00:00
scheglov@google.com d59f0bc80f Add hierarchy utils and use them in search.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38259 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 21:12:42 +00:00
scheglov@google.com ad10f83b2d Use AnalysisServer.getResolvedCompilationUnits() helper in hovers.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38252 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 19:57:54 +00:00
scheglov@google.com 1037608fed Fix for NPE if subscribing for errors in a not analyzed file.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38238 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 15:50:49 +00:00
scheglov@google.com 08184a879d Use relative paths to the packages from 'pkg' folder.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38217 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 22:08:20 +00:00
paulberry@google.com 30be07745a Handle context == null in the analysis.getHover request.
This could happen due to a race condition: the client might request
hover information for a file that the server has not established a
context for yet (e.g. during startup).

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38207 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 19:56:28 +00:00
scheglov@google.com 1de8ecb571 Use HasToJson when set Reponse/Notification parameters.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38206 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 19:54:04 +00:00
scheglov@google.com db4916434b Remove variable reference in combinator workaround.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38204 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 19:29:13 +00:00
scheglov@google.com acd4145f62 Initial implementation for 'search.findElementReferences'.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38201 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 17:45:28 +00:00
scheglov@google.com d51cfd6c70 Fix build after Index changes.
TBR

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38179 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-12 02:02:22 +00:00
scheglov@google.com 6d5773dc5e Tests for LocalIndex and Dart index contributor.
Pub spec files will be updated before commit.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38071 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-08 20:53:10 +00:00
scheglov@google.com 0597e61ba3 Move index/search to services.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38045 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 22:24:59 +00:00
scheglov@google.com bf61f59c82 Extract testing utilities into a separate package.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38039 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 20:50:59 +00:00
scheglov@google.com 9e33b85c31 Move file_system libraries into 'analyzer'.
I still end up including memory FS into 'analyzer' because tests for ResourceUriResolver use it.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38034 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 18:57:42 +00:00
scheglov@google.com 570d537b0f Update HoverInformation to include offset, length, kind.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37995 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 22:06:13 +00:00
scheglov@google.com 1f45100688 Move Index and IndexStore implementations into Engine.
Also move most of the related tests.

LocalIndex test is commented out, because relies on the infrastucture existing only in Server - virtual file system, mocks.
We need to move it into Engine or extract into a separate package.

This CL also removes Dart implementation of BTree.
We now use a different approach to implementing the index.

Bots are red after the previous CL, I hope that this one will fix at least some redness.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37993 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 21:30:25 +00:00
scheglov@google.com 82d67d0d87 Add highlight regions for comments.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37992 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 20:49:50 +00:00
brianwilkerson@google.com 13b10de8db Add failing test
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37989 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 17:55:35 +00:00
scheglov@google.com 64f238ba34 Implemention of the 'analysis.overrides' notification.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37971 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 03:24:27 +00:00
scheglov@google.com 179c102d78 Implementation for 'analysis.occurrences' notification.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37954 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-02 18:38:01 +00:00
scheglov@google.com 7f70e3186f Implementation for 'analysis.getHover'.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37952 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-02 17:33:22 +00:00