Index: pkg/analysis_server/lib/src/edit/edit_domain.dart |
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart |
index 13c0ebdeaa2b7d98630ddcc1131eed4a1b6b9320..a7cf8ea2bbf474c2f23642f01d31826e71cd48ef 100644 |
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart |
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart |
@@ -76,6 +76,8 @@ class EditDomainHandler extends AbstractRequestHandler { |
} |
Response format(Request request) { |
+ server.options.analytics?.sendEvent('edit', 'format'); |
+ |
EditFormatParams params = new EditFormatParams.fromRequest(request); |
String file = params.file; |
@@ -269,6 +271,8 @@ class EditDomainHandler extends AbstractRequestHandler { |
} |
Future getPostfixCompletion(Request request) async { |
+ server.options.analytics?.sendEvent('edit', 'getPostfixCompletion'); |
+ |
var params = new EditGetPostfixCompletionParams.fromRequest(request); |
SourceChange change; |
@@ -418,6 +422,8 @@ class EditDomainHandler extends AbstractRequestHandler { |
} |
Future<Null> organizeDirectives(Request request) async { |
+ server.options.analytics?.sendEvent('edit', 'organizeDirectives'); |
+ |
var params = new EditOrganizeDirectivesParams.fromRequest(request); |
// prepare file |
String file = params.file; |
@@ -687,6 +693,12 @@ class _RefactoringManager { |
EMPTY_PROBLEM_LIST, EMPTY_PROBLEM_LIST, EMPTY_PROBLEM_LIST); |
// process the request |
var params = new EditGetRefactoringParams.fromRequest(_request); |
+ |
+ if (params.kind != null) { |
+ server.options.analytics |
+ ?.sendEvent('refactor', params.kind.name.toLowerCase()); |
+ } |
+ |
runZoned(() async { |
await _init(params.kind, params.file, params.offset, params.length); |
if (initStatus.hasFatalError) { |