Index: pkg/analysis_server/test/domain_diagnostic_test.dart |
diff --git a/pkg/analysis_server/test/domain_diagnostic_test.dart b/pkg/analysis_server/test/domain_diagnostic_test.dart |
index 444e6cffddd12368987fea49c6c1c4f662276534..0e8fd2ad91835275417d71439d01ccf2b55e6347 100644 |
--- a/pkg/analysis_server/test/domain_diagnostic_test.dart |
+++ b/pkg/analysis_server/test/domain_diagnostic_test.dart |
@@ -10,7 +10,9 @@ import 'package:analysis_server/src/domain_diagnostic.dart'; |
import 'package:analysis_server/src/plugin/server_plugin.dart'; |
import 'package:analyzer/file_system/memory_file_system.dart'; |
import 'package:analyzer/instrumentation/instrumentation.dart'; |
+import 'package:analyzer/src/generated/engine.dart'; |
import 'package:plugin/manager.dart'; |
+import 'package:plugin/plugin.dart'; |
import 'package:unittest/unittest.dart'; |
import 'mock_sdk.dart'; |
@@ -25,11 +27,25 @@ main() { |
initializeTestEnvironment(); |
setUp(() { |
+ // |
+ // Collect plugins |
+ // |
+ ServerPlugin serverPlugin = new ServerPlugin(); |
+ List<Plugin> plugins = <Plugin>[]; |
+ plugins.addAll(AnalysisEngine.instance.requiredPlugins); |
+ plugins.add(AnalysisEngine.instance.commandLinePlugin); |
+ plugins.add(AnalysisEngine.instance.optionsPlugin); |
+ plugins.add(serverPlugin); |
+ // |
+ // Process plugins |
+ // |
+ ExtensionManager manager = new ExtensionManager(); |
+ manager.processPlugins(plugins); |
+ // |
+ // Create the server |
+ // |
var serverChannel = new MockServerChannel(); |
resourceProvider = new MemoryResourceProvider(); |
- ExtensionManager manager = new ExtensionManager(); |
- ServerPlugin serverPlugin = new ServerPlugin(); |
- manager.processPlugins([serverPlugin]); |
server = new AnalysisServer( |
serverChannel, |
resourceProvider, |