paulberry@google.com
570b2f115e
Change analysis.updateOptions to use generated classes.
...
Note that there is a small change in behavior: unrecognized options
are now silently ignored; they no longer generate an error.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//492483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39380 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 19:57:43 +00:00
paulberry@google.com
d291be1c9a
Do proper JSON conversion when returning search results.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//480823005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39377 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 18:32:56 +00:00
paulberry@google.com
34699f46d5
Start using code-generated protocol classes in analysis server.
...
This updates the handlers for analysis.getErrors,
server.setSubscriptions, and analysis.setSubscriptions with simpler
versions that make use of the code-generated protocol classes, and
replaces the classes AnalysisError and AnalysisService with their
code-generated versions.
It also removes some dead code.
R=jwren@google.com
Review URL: https://codereview.chromium.org//486003003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39376 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 18:29:41 +00:00
paulberry@google.com
81e274fccb
Analysis server code generation improvements
...
- Make generated code implement the HasToJson interface.
- Add toRequest() convenience methods to classes representing request
parameters.
- Fix toJson() for objects containing lists (forgot to call toList()).
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//483393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39375 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 18:26:42 +00:00
danrubel@google.com
8a46d7ed3f
more invocation code completion improvements
...
and pull common suggestion builders into new library
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//480413003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39370 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 14:08:54 +00:00
danrubel@google.com
46fbd54548
improve keyword suggestions
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//483803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39362 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 03:27:17 +00:00
paulberry@google.com
64b53a4b5c
Code generate Dart classes representing the analysis server API.
...
These classes support:
- Conversion to JSON
- Conversion from JSON, with error handling via the Request object.
- operator== and hashCode
In addition, convenience functions are generated which extract and
convert the variant contents of a Request, Response, Notification,
EditGetRefactoringResult, or EditGetRefactoringParams once the type is
known.
The generated code is not yet used; it will be used by future CL's.
R=brianwilkerson@google.com , danrubel@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//479043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39361 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 23:44:05 +00:00
scheglov@google.com
6f88255462
Remove already ported generated code.
...
Mostly to avoid duplicate import proposals from Quick Fixes.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//482143002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39357 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 21:50:49 +00:00
scheglov@google.com
b623c4d49f
When user renames 'prefix' in 'prefix.Class' she actually wants to rename ImportElement.
...
Unfortunately we resolve "prefix" to a "PrefixElement".
So, we have to fix this mismatch in the server.
We do the same in indexer, so this CL extract shared namespace-related code into a new unit.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//481173002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39356 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 21:49:11 +00:00
scheglov@google.com
e1e1febe72
Merge two constants.dart into one.
...
R=paulberry@google.com , brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//478933003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39355 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 21:34:54 +00:00
scheglov@google.com
d988d1c1cb
Test for 'edit.getAssists'.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//480223002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39354 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 21:21:26 +00:00
paulberry@google.com
7226309842
Import analysis_services.dart into analysis_server.dart.
...
Having two separate packages doesn't really have any benefit, and has
the downside of forcing us to carefully avoid circular dependencies
between the two. It makes more sense to just combine them.
This is largely a mechanical change consisting of the following renames:
1. pkg/analysis_services/lib/src/* -> pkg/analysis_server/lib/src/services/*
2. pkg/analysis_services/lib/* -> pkg/analysis_server/lib/src/services/*
3. pkg/analysis_services/test/* -> pkg/analysis_server/test/services/*
There were 4 instances where 1 and 2 created a collision:
.../services/correction/assist.dart, .../services/correction/fix.dart,
.../services/refactoring/refactoring.dart, and
.../services/search/search_engine_internal.dart. To fix the
collision, the files coming from pkg/analysis_services/lib/src were
renamed to "..._internal.dart".
In addition, pkg/analysis_services/test/test_all.dart was modified to
call pkg/analysis_services/test/services/test_all.dart.
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//484733003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39349 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 20:17:49 +00:00
scheglov@google.com
87f6954692
Support for the 'edit.getAvailableRefactorings' request.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//484713003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39340 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 18:09:05 +00:00
danrubel@google.com
1a6b8db026
refactor and cleanup code completion
...
- combine all elements of request into request object
- pass request object through to all computers / visitors
- add override annotations on visitor subclasses
- rename completion_computer -> completion_manager
- move DartCompletionComputer into library with other related classes
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//467233003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39333 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 15:43:09 +00:00
paulberry@google.com
f822f41189
Update analysis server and integration tests to match new ChangeContentOverlay.
...
The spec was changed in r39199 so that ChangeContentOverlay contains a
list of edits rather than a single edit. This updates the analysis
server and integration tests accordingly.
BUG=dartbug.com/20495
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//472613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39218 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 20:04:55 +00:00
scheglov@google.com
c25a70a1d9
Fixes for the missing highlights.
...
These problems were found in https://codereview.chromium.org/463643002/
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//454843004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39140 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 14:24:01 +00:00
scheglov@google.com
61451c87ad
Tweak for AnalysisDomainHandler.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//463563004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39104 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-11 20:22:43 +00:00
paulberry@google.com
80352fd61c
Fix analysis server to only send SERVER_STATUS when subscribed to.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//453263002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39065 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-09 16:36:39 +00:00
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