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

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

Issue 2754473004: Replace making getInnermostContext public with making a getFolder method (Closed)
Patch Set: Created 3 years, 9 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 | « pkg/analysis_server/lib/src/context_manager.dart ('k') | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.single_context_manager; 5 library analysis_server.src.single_context_manager;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:core'; 8 import 'dart:core';
9 import 'dart:math' as math; 9 import 'dart:math' as math;
10 10
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 AnalysisContext getContextFor(String path) { 140 AnalysisContext getContextFor(String path) {
141 if (context == null) { 141 if (context == null) {
142 return null; 142 return null;
143 } else if (_isContainedIn(includedPaths, path)) { 143 } else if (_isContainedIn(includedPaths, path)) {
144 return context; 144 return context;
145 } 145 }
146 return null; 146 return null;
147 } 147 }
148 148
149 @override 149 @override
150 Folder getContextFolderFor(String path) {
151 if (isInAnalysisRoot(path)) {
152 return contextFolder;
153 }
154 return null;
155 }
156
157 @override
150 AnalysisDriver getDriverFor(String path) { 158 AnalysisDriver getDriverFor(String path) {
151 throw new UnimplementedError( 159 throw new UnimplementedError(
152 'Unexpected invocation of getDriverFor in SingleContextManager'); 160 'Unexpected invocation of getDriverFor in SingleContextManager');
153 } 161 }
154 162
155 @override 163 @override
156 List<AnalysisDriver> getDriversInAnalysisRoot(Folder analysisRoot) { 164 List<AnalysisDriver> getDriversInAnalysisRoot(Folder analysisRoot) {
157 throw new UnimplementedError( 165 throw new UnimplementedError(
158 'Unexpected invocation of getDriversInAnalysisRoot in SingleContextManag er'); 166 'Unexpected invocation of getDriversInAnalysisRoot in SingleContextManag er');
159 } 167 }
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 static List<Resource> _getChildrenSafe(Folder folder) { 526 static List<Resource> _getChildrenSafe(Folder folder) {
519 try { 527 try {
520 return folder.getChildren(); 528 return folder.getChildren();
521 } on FileSystemException { 529 } on FileSystemException {
522 // The folder either doesn't exist or cannot be read. 530 // The folder either doesn't exist or cannot be read.
523 // Either way, there are no children. 531 // Either way, there are no children.
524 return const <Resource>[]; 532 return const <Resource>[];
525 } 533 }
526 } 534 }
527 } 535 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698