Commit Graph

2342 Commits

Author SHA1 Message Date
scheglov@google.com dd94c27671 Always ignore 'packages' folders.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39052 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-08 21:09:52 +00:00
scheglov@google.com 4392cc42a0 Support for excluded files/folders.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39046 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-08 19:42:07 +00:00
paulberry@google.com 1a773207c5 Integration test search.getTypeHierarchy and make some minor fixes.
R=brianwilkerson@google.com, scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39045 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-08 19:39:50 +00:00
scheglov@google.com 575e80711f Fixes for adding/removing pubspecs to/from roots.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39043 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-08 17:19:46 +00:00
scheglov@google.com d18d41fb37 Fixes for review comments.
Was in https://codereview.chromium.org/450103002/

R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39040 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-08 16:36:34 +00:00
scheglov@google.com eda90c0529 Support for pubspec based contexts in subfolders.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39036 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-08 15:55:06 +00:00
paulberry@google.com 320cbbf865 Rework "analysis.updateContent" analysis server request.
R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39034 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-08 13:15:26 +00:00
scheglov@google.com 25dd28dbf2 Churn-only CL for ContextDirectoryManager.
1. Sort and format implementation.

2. Convert tests into reflective.

3. Write comments for tests.

R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39000 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-07 18:04:21 +00:00
scheglov@google.com 63b0d11e1b Fixes for the 'pub' bot and 'analysis_server' on Windows.
TBR

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38962 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-07 02:01:58 +00:00
scheglov@google.com 8b247578f1 Add Folder.contains(path) and use it in ContextDirectoryManager.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38958 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-06 22:25:04 +00:00
scheglov@google.com 0f041852a6 Fix for opening SDK sources.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38955 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-06 22:13:28 +00:00
scheglov@google.com c5263aae9f Breaking changes in 'analyzer' package.
1. Source.uri added.

2. DartSdk.fromEncoding() replaced with fromFileUri().

  This CL cannot be committed as is until pkg/code_transformers is fixed.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38949 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-06 20:41:42 +00:00
scheglov@google.com 95cc1e5b14 Send 'analysis.errors' notification only for files in analysis roots.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38944 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-06 19:58:00 +00:00
danrubel@google.com a5c9375c30 incremental improvement to top level code completion results
BUG=
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38942 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-06 19:14:55 +00:00
paulberry@google.com 5353760386 Change the type of Error.code from int to String.
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38940 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-06 18:44:13 +00:00
scheglov@google.com 41c4564935 Make Change implementation consistent with the server spec.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38908 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-05 21:39:05 +00:00
scheglov@google.com e1697e7488 Remove 'analysis.updateSdks' from server.
R=jwren@google.com, brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38887 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-04 23:42:55 +00:00
scheglov@google.com ab7701a740 Update 'search.getTypeHierarchy' to the latest spec.
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38885 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-04 23:27:25 +00:00
scheglov@google.com cef6c26a95 Update 'analysis.override' notification to the latest spec.
R=brianwilkerson@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38882 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-04 21:21:22 +00:00
danrubel@google.com ec0633a5ec incremental progress reworking code completion manager / computers
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38871 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-04 17:37:06 +00:00
danrubel@google.com 9714894e8e incremental progress aligning code completion api to spec
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38835 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-01 16:23:43 +00:00
scheglov@google.com f974128b01 Ignore 'dynamic' and 'void' elements in the occurrences computer too.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38809 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 23:48:30 +00:00
scheglov@google.com e9719d8fcd Ignore 'dynamic' in the navigation computer.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38797 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 20:54:20 +00:00
danrubel@google.com 4c868034b5 refactor code completion to allow for multiple suggestion computers
BUG=
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38787 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 16:11:14 +00:00
scheglov@google.com c8ae5e3b57 Make any exception in the operations loop fatal.
Note, that with the latest analyzer snapshot the NPE we saw does not leak anymore,
so this code does not work. But the result is not much better - context continues
analyzing the same file again and again.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38785 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 15:57:18 +00:00
paulberry@google.com 6c74d75f6d Make "server.shutdown" exit the analysis server.
Also update integration tests so that they use "server.shutdown" to
terminate each test.  This ensures that repeatedly running integration
tests does not cause an accumulation of analysis server temporary
files.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38739 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 17:38:40 +00:00
danrubel@google.com 5a35fd7262 incremental step moving completion into services and adding tests
BUG=
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38728 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 12:37:47 +00:00
scheglov@google.com a8da65016a Send 'server.error' notification in case of an exception during performing an operation.
R=paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38688 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 18:12:37 +00:00
scheglov@google.com 08a248283e Issue 20240. Use a FileManager that manages its own temporary directory.
So, we can have more than one index and server running.
And we know when it is time to delete or recreate this temporary directory.

R=paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20240

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38652 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 22:13:58 +00:00
scheglov@google.com 4a47ef63f5 Move PackageMapUriResolver into analyzer.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38650 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 21:09:58 +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
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 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
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
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
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
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
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 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