Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: pkg/analysis_server/lib/src/domain_analysis.dart

Issue 1288163003: Remove debug output in getNavigation(). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis/get_navigation_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/domain_analysis.dart
diff --git a/pkg/analysis_server/lib/src/domain_analysis.dart b/pkg/analysis_server/lib/src/domain_analysis.dart
index 955f0ced429856013711b7a754d0fdf6430fbac1..483f5321b21c155f5e47d264b53d0de4a56488a3 100644
--- a/pkg/analysis_server/lib/src/domain_analysis.dart
+++ b/pkg/analysis_server/lib/src/domain_analysis.dart
@@ -118,48 +118,33 @@ class AnalysisDomainHandler implements RequestHandler {
return new Response.getNavigationInvalidFile(request);
}
analysisFuture.then((AnalysisDoneReason reason) {
- print(' reason: $reason');
- try {
- switch (reason) {
- case AnalysisDoneReason.COMPLETE:
- print(' AnalysisDoneReason.COMPLETE');
- List<CompilationUnit> units =
- server.getResolvedCompilationUnits(file);
- print(' units: $units');
- if (units.isEmpty) {
- server
- .sendResponse(new Response.getNavigationInvalidFile(request));
- } else {
- DartUnitNavigationComputer computer =
- new DartUnitNavigationComputer();
- _GetNavigationAstVisitor visitor = new _GetNavigationAstVisitor(
- params.offset, params.offset + params.length, computer);
- for (CompilationUnit unit in units) {
- unit.accept(visitor);
- }
- server.sendResponse(new AnalysisGetNavigationResult(
- computer.files, computer.targets, computer.regions)
- .toResponse(request.id));
- }
- break;
- case AnalysisDoneReason.CONTEXT_REMOVED:
- print(' AnalysisDoneReason.CONTEXT_REMOVED');
- // The active contexts have changed, so try again.
- Response response = getNavigation(request);
- if (response != Response.DELAYED_RESPONSE) {
- server.sendResponse(response);
+ switch (reason) {
+ case AnalysisDoneReason.COMPLETE:
+ List<CompilationUnit> units =
+ server.getResolvedCompilationUnits(file);
+ if (units.isEmpty) {
+ server.sendResponse(new Response.getNavigationInvalidFile(request));
+ } else {
+ DartUnitNavigationComputer computer =
+ new DartUnitNavigationComputer();
+ _GetNavigationAstVisitor visitor = new _GetNavigationAstVisitor(
+ params.offset, params.offset + params.length, computer);
+ for (CompilationUnit unit in units) {
+ unit.accept(visitor);
}
- break;
- }
- } on Exception catch (e, st) {
- print('Exception1 in AnalysisDomainHandler.getNavigation()');
- print(e);
- print(st);
+ server.sendResponse(new AnalysisGetNavigationResult(
+ computer.files, computer.targets, computer.regions)
+ .toResponse(request.id));
+ }
+ break;
+ case AnalysisDoneReason.CONTEXT_REMOVED:
+ // The active contexts have changed, so try again.
+ Response response = getNavigation(request);
+ if (response != Response.DELAYED_RESPONSE) {
+ server.sendResponse(response);
+ }
+ break;
}
- }).catchError((e, st) {
- print('Exception2 in AnalysisDomainHandler.getNavigation()');
- print(e);
- print(st);
});
// delay response
return Response.DELAYED_RESPONSE;
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis/get_navigation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698