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

Side by Side Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 845813006: When the file content is the same as the being removed overlay contents, ignore the change. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments. Created 5 years, 11 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 | Annotate | Revision Log
« 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) 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine; 8 library engine;
9 9
10 import "dart:math" as math; 10 import "dart:math" as math;
(...skipping 3197 matching lines...) Expand 10 before | Expand all | Expand 10 after
3208 } else { 3208 } else {
3209 SourceEntry sourceEntry = _cache.get(source); 3209 SourceEntry sourceEntry = _cache.get(source);
3210 if (sourceEntry != null) { 3210 if (sourceEntry != null) {
3211 sourceEntry.modificationTime = 3211 sourceEntry.modificationTime =
3212 _contentCache.getModificationStamp(source); 3212 _contentCache.getModificationStamp(source);
3213 } 3213 }
3214 } 3214 }
3215 } else if (originalContents != null) { 3215 } else if (originalContents != null) {
3216 _incrementalAnalysisCache = 3216 _incrementalAnalysisCache =
3217 IncrementalAnalysisCache.clear(_incrementalAnalysisCache, source); 3217 IncrementalAnalysisCache.clear(_incrementalAnalysisCache, source);
3218 _sourceChanged(source);
3219 changed = true; 3218 changed = true;
3219 // We are removing the overlay for the file, check if the file's
3220 // contents is the same as it was in the overlay.
3221 SourceEntry sourceEntry = _cache.get(source);
3222 if (sourceEntry != null) {
3223 try {
3224 TimestampedData<String> fileContents = getContents(source);
3225 String fileContentsData = fileContents.data;
3226 if (fileContentsData == originalContents) {
3227 sourceEntry.modificationTime = fileContents.modificationTime;
3228 sourceEntry.setValue(SourceEntry.CONTENT, fileContentsData);
3229 changed = false;
3230 }
3231 } catch (e) {
3232 }
3233 }
3234 // If not the same content (e.g. the file is being closed without save),
3235 // then force analysis.
3236 if (changed) {
3237 _sourceChanged(source);
3238 }
3220 } 3239 }
3221 return changed; 3240 return changed;
3222 } 3241 }
3223 3242
3224 /** 3243 /**
3225 * Create a [GenerateDartErrorsTask] for the given source, marking the verific ation errors 3244 * Create a [GenerateDartErrorsTask] for the given source, marking the verific ation errors
3226 * as being in-process. The compilation unit and the library can be the same i f the compilation 3245 * as being in-process. The compilation unit and the library can be the same i f the compilation
3227 * unit is the defining compilation unit of the library. 3246 * unit is the defining compilation unit of the library.
3228 * 3247 *
3229 * @param unitSource the source for the compilation unit to be verified 3248 * @param unitSource the source for the compilation unit to be verified
(...skipping 8972 matching lines...) Expand 10 before | Expand all | Expand 10 after
12202 if (element.id == _id) { 12221 if (element.id == _id) {
12203 result = element; 12222 result = element;
12204 throw new _ElementByIdFinderException(); 12223 throw new _ElementByIdFinderException();
12205 } 12224 }
12206 super.visitElement(element); 12225 super.visitElement(element);
12207 } 12226 }
12208 } 12227 }
12209 12228
12210 class _ElementByIdFinderException { 12229 class _ElementByIdFinderException {
12211 } 12230 }
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