| OLD | NEW |
| 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 test.analysis_server; | 5 library test.analysis_server; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 10 import 'package:analysis_server/src/analysis_server.dart'; | 10 import 'package:analysis_server/src/analysis_server.dart'; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 expect(fooContext.getKindOf(fooSource), SourceKind.LIBRARY); | 117 expect(fooContext.getKindOf(fooSource), SourceKind.LIBRARY); |
| 118 expect(fooContext.getKindOf(barSource), SourceKind.UNKNOWN); | 118 expect(fooContext.getKindOf(barSource), SourceKind.UNKNOWN); |
| 119 expect(barContext.getKindOf(fooSource), SourceKind.UNKNOWN); | 119 expect(barContext.getKindOf(fooSource), SourceKind.UNKNOWN); |
| 120 expect(barContext.getKindOf(barSource), SourceKind.LIBRARY); | 120 expect(barContext.getKindOf(barSource), SourceKind.LIBRARY); |
| 121 }); | 121 }); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void processRequiredPlugins(ServerPlugin serverPlugin) { | 124 void processRequiredPlugins(ServerPlugin serverPlugin) { |
| 125 List<Plugin> plugins = <Plugin>[]; | 125 List<Plugin> plugins = <Plugin>[]; |
| 126 plugins.addAll(AnalysisEngine.instance.requiredPlugins); | 126 plugins.addAll(AnalysisEngine.instance.requiredPlugins); |
| 127 plugins.add(AnalysisEngine.instance.optionsPlugin); | |
| 128 plugins.add(serverPlugin); | 127 plugins.add(serverPlugin); |
| 129 | 128 |
| 130 ExtensionManager manager = new ExtensionManager(); | 129 ExtensionManager manager = new ExtensionManager(); |
| 131 manager.processPlugins(plugins); | 130 manager.processPlugins(plugins); |
| 132 } | 131 } |
| 133 | 132 |
| 134 void setUp() { | 133 void setUp() { |
| 135 ServerPlugin serverPlugin = new ServerPlugin(); | 134 ServerPlugin serverPlugin = new ServerPlugin(); |
| 136 processRequiredPlugins(serverPlugin); | 135 processRequiredPlugins(serverPlugin); |
| 137 channel = new MockServerChannel(); | 136 channel = new MockServerChannel(); |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 _MockServerOperation(this.context); | 567 _MockServerOperation(this.context); |
| 569 | 568 |
| 570 @override | 569 @override |
| 571 ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS; | 570 ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS; |
| 572 | 571 |
| 573 @override | 572 @override |
| 574 void perform(AnalysisServer server) { | 573 void perform(AnalysisServer server) { |
| 575 isComplete = true; | 574 isComplete = true; |
| 576 } | 575 } |
| 577 } | 576 } |
| OLD | NEW |