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

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

Issue 1261203003: Server options file rename [TBR]. (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.src.server_options; 5 library analysis_server.src.server_options;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:path/path.dart' as path; 10 import 'package:path/path.dart' as path;
11 import 'package:yaml/yaml.dart'; 11 import 'package:yaml/yaml.dart';
12 12
13 const _optionsFileName = 'dart_analysis_server.options'; 13 //TODO: consider renaming (https://github.com/dart-lang/sdk/issues/23927)
14 const _optionsFileName = '.dart_analysis_server.yaml';
14 15
15 /// The shared options instance. 16 /// The shared options instance.
16 ServerOptions _serverOptions; 17 ServerOptions _serverOptions;
17 18
18 /// Server options. 19 /// Server options.
19 ServerOptions get serverOptions { 20 ServerOptions get serverOptions {
20 if (_serverOptions == null) { 21 if (_serverOptions == null) {
21 _serverOptions = _loadOptions(); 22 _serverOptions = _loadOptions();
22 } 23 }
23 return _serverOptions; 24 return _serverOptions;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 var doc = loadYaml(contents); 102 var doc = loadYaml(contents);
102 if (doc is YamlMap) { 103 if (doc is YamlMap) {
103 doc.forEach((k, v) { 104 doc.forEach((k, v) {
104 if (k is String) { 105 if (k is String) {
105 _options[k] = v; 106 _options[k] = v;
106 } 107 }
107 }); 108 });
108 } 109 }
109 } 110 }
110 } 111 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698