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

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

Issue 2571593002: Support for overlay only files in Analysis Server with the new driver. (Closed)
Patch Set: Created 4 years 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
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 import 'dart:core'; 9 import 'dart:core';
10 import 'dart:io' as io; 10 import 'dart:io' as io;
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 } else { 1480 } else {
1481 // Protocol parsing should have ensured that we never get here. 1481 // Protocol parsing should have ensured that we never get here.
1482 throw new AnalysisException('Illegal change type'); 1482 throw new AnalysisException('Illegal change type');
1483 } 1483 }
1484 1484
1485 fileContentOverlay[file] = newContents; 1485 fileContentOverlay[file] = newContents;
1486 1486
1487 driverMap.values.forEach((driver) { 1487 driverMap.values.forEach((driver) {
1488 driver.changeFile(file); 1488 driver.changeFile(file);
1489 }); 1489 });
1490
1491 // If the file did not exist, and is "overlay only", it still should be
1492 // analyzed. Add it to driver to which it should have been added.
1493 contextManager.getDriverFor(file)?.addFile(file);
1494
1490 // TODO(scheglov) implement other cases 1495 // TODO(scheglov) implement other cases
1491 }); 1496 });
1492 return; 1497 return;
1493 } 1498 }
1494 changes.forEach((file, change) { 1499 changes.forEach((file, change) {
1495 ContextSourcePair contextSource = getContextSourcePair(file); 1500 ContextSourcePair contextSource = getContextSourcePair(file);
1496 Source source = contextSource.source; 1501 Source source = contextSource.source;
1497 operationQueue.sourceAboutToChange(source); 1502 operationQueue.sourceAboutToChange(source);
1498 // Prepare the new contents. 1503 // Prepare the new contents.
1499 String oldContents = overlayState.getContents(source); 1504 String oldContents = overlayState.getContents(source);
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
2120 /** 2125 /**
2121 * The [PerformanceTag] for time spent in server request handlers. 2126 * The [PerformanceTag] for time spent in server request handlers.
2122 */ 2127 */
2123 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 2128 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
2124 2129
2125 /** 2130 /**
2126 * The [PerformanceTag] for time spent in split store microtasks. 2131 * The [PerformanceTag] for time spent in split store microtasks.
2127 */ 2132 */
2128 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 2133 static PerformanceTag splitStore = new PerformanceTag('splitStore');
2129 } 2134 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698