Commit Graph

62 Commits

Author SHA1 Message Date
scheglov@google.com 283b78e260 Add --enable-incremental-resolution option.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41971 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 20:53:10 +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 e7bdefffba update error handling to send response with stack trace
BUG=dartbug.com/20893
R=brianwilkerson@google.com, paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40237 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 12:30:07 +00:00
danrubel@google.com a9a2c98d53 gracefully handle internal exceptions during request
- new SERVER_ERROR response code
- return SERVER_ERROR response if exception when processing request before request can be sent
- send server.error notification if exception occurs anytime while processing request or future work triggered by request

BUG=dartbug.com/20893
R=brianwilkerson@google.com, paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40198 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 05:01:46 +00:00
paulberry@google.com 3123e48d29 In the analysis server API, change RequestError.code to an enum.
Some of the error codes that were previously defined are no longer
used, so those have been removed.  The enum reflects the set of errors
that are currently in use.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39689 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-29 07:30:43 +00:00
paulberry@google.com 0c0fd777a6 Finish modifying analysis server to make use of code generation.
Generated code is used to produce the response to these requests:
- analysis.updateOptions
- analysis.updateContent
- analysis.setSubscriptions
- analysis.setPriorityFiles
- analysis.setAnalysisRoots
- server.shutdown
- server.setSubscriptions

Generated code is used to produce these requests:
- server.shutdown
- server.getVersion
- server.shutdown
- server.connected

Generated code is used to produce these notifications:
- completion.results
- analysis.overrides
- analysis.outline
- analysis.occurrences

Generated code is used to decode these notifications:
- server.status

In addition, some dead code was removed, the 'protocol.dart' and
'protocol2.dart' files were combined, and the fields Response.result,
Request.params, and Notification.params were made private (to
encourage future use of the generated code).  Also, some overly
verbose import statements were cleaned up by using "hide" rather than
"show".

R=danrubel@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39516 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-25 10:48:16 +00:00
paulberry@google.com e18327f317 Make more use of generated code in analysis server.
The following generated classes are now used:
- CompletionRelevance
- CompletionSuggestion
- CompletionSuggestionKind
- ErrorFixes
- HighlightRegion
- HighlightRegionType
- HoverInformation
- LinkedEditGroup
- LinkedEditSuggestion
- LinkedEditSuggestionKind
- SourceChange

Generated code is used to produce these notifications:
- analysis.errors
- analysis.highlights
- analysis.navigation
- search.results
- server.error
- server.status

Generated code is used to produce the response to these requests:
- analysis.getErrors
- analysis.getHover
- edit.getAssists
- edit.getFixes
- server.getVersion

Generated code is used to handle these notifications in unit testing:
- analysis.highlights
- analysis.navigation

In addition, these methods have been removed, since they are no longer
needed:
- Notification.getParameter
- Result.setEmptyResult
- Result.setResult

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39511 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-24 08:39:41 +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
brianwilkerson@google.com 58ee598e04 Adjust server for API changes
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37368 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-16 18:41:04 +00:00
scheglov@google.com 24c8f1f4b2 Extract constants into separate libarary.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36828 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-30 18:37:44 +00:00
paulberry@google.com 93deb52cd6 Add a message for analysis server to indicate a successful connection.
This complements the "server already started" error introduced in
r35046.  It's now easy for the client to detect whether a connection
to the server was successful--it simply connects and waits for the
initial message from the server.  The message returned on a successful
connection is:

{"event":"server.connected"}

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35108 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-16 15:11:35 +00:00
paulberry@google.com 33c7e78bb0 Split analysis server's HttpAnalysisServer into two classes.
Behaviours of the HttpAnalysisServer which are independent of the
WebSocket transport mechanism have been moved to a new class,
SocketServer, which will also be used when the transport mechanism is
stdio.

GetHander now holds a reference to the SocketServer rather than the
AnalysisServer, so that we don't need to go to extra effort to update
it when the AnalysisServer is created.

R=brianwilkerson@google.com, jwren@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35061 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-15 15:41:09 +00:00