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

Side by Side Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 426243005: Make "server.shutdown" exit the analysis server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/channel.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analysis.server; 5 library analysis.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/file_system/file_system.dart'; 10 import 'package:analyzer/file_system/file_system.dart';
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 completer.completeError(message); 694 completer.completeError(message);
695 } 695 }
696 } 696 }
697 697
698 void shutdown() { 698 void shutdown() {
699 running = false; 699 running = false;
700 if (index != null) { 700 if (index != null) {
701 index.clear(); 701 index.clear();
702 index.stop(); 702 index.stop();
703 } 703 }
704 // Defer closing the channel so that the shutdown response can be sent.
705 new Future(channel.close);
704 } 706 }
705 707
706 /** 708 /**
707 * Return the [CompilationUnit] of the Dart file with the given [path]. 709 * Return the [CompilationUnit] of the Dart file with the given [path].
708 * Return `null` if the file is not a part of any context. 710 * Return `null` if the file is not a part of any context.
709 */ 711 */
710 CompilationUnit test_getResolvedCompilationUnit(String path) { 712 CompilationUnit test_getResolvedCompilationUnit(String path) {
711 // prepare AnalysisContext 713 // prepare AnalysisContext
712 AnalysisContext context = getAnalysisContext(path); 714 AnalysisContext context = getAnalysisContext(path);
713 if (context == null) { 715 if (context == null) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 /** 790 /**
789 * An enumeration of the services provided by the server domain. 791 * An enumeration of the services provided by the server domain.
790 */ 792 */
791 class ServerService extends Enum2<ServerService> { 793 class ServerService extends Enum2<ServerService> {
792 static const ServerService STATUS = const ServerService('STATUS', 0); 794 static const ServerService STATUS = const ServerService('STATUS', 0);
793 795
794 static const List<ServerService> VALUES = const [STATUS]; 796 static const List<ServerService> VALUES = const [STATUS];
795 797
796 const ServerService(String name, int ordinal) : super(name, ordinal); 798 const ServerService(String name, int ordinal) : super(name, ordinal);
797 } 799 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/channel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698