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

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

Issue 720543002: First fix for indexing slowness. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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.source.io; 8 library engine.source.io;
9 9
10 import 'source.dart'; 10 import 'source.dart';
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 * The URI from which this source was originally derived. 87 * The URI from which this source was originally derived.
88 */ 88 */
89 final Uri uri; 89 final Uri uri;
90 90
91 /** 91 /**
92 * The file represented by this source. 92 * The file represented by this source.
93 */ 93 */
94 final JavaFile file; 94 final JavaFile file;
95 95
96 /** 96 /**
97 * The cached absolute path of this source.
98 */
99 String _absolutePath;
100
101 /**
97 * The cached encoding for this source. 102 * The cached encoding for this source.
98 */ 103 */
99 String _encoding; 104 String _encoding;
100 105
101 /** 106 /**
102 * Initialize a newly created source object. 107 * Initialize a newly created source object.
103 * 108 *
104 * @param file the file represented by this source 109 * @param file the file represented by this source
105 */ 110 */
106 FileBasedSource.con1(JavaFile file) : this.con2(file.toURI(), file); 111 FileBasedSource.con1(JavaFile file) : this.con2(file.toURI(), file);
(...skipping 24 matching lines...) Expand all
131 136
132 @override 137 @override
133 String get encoding { 138 String get encoding {
134 if (_encoding == null) { 139 if (_encoding == null) {
135 _encoding = uri.toString(); 140 _encoding = uri.toString();
136 } 141 }
137 return _encoding; 142 return _encoding;
138 } 143 }
139 144
140 @override 145 @override
141 String get fullName => file.getAbsolutePath(); 146 String get fullName {
147 if (_absolutePath == null) {
148 _absolutePath = file.getAbsolutePath();
149 }
150 return _absolutePath;
151 }
142 152
143 @override 153 @override
144 int get modificationStamp => file.lastModified(); 154 int get modificationStamp => file.lastModified();
145 155
146 @override 156 @override
147 String get shortName => file.getName(); 157 String get shortName => file.getName();
148 158
149 @override 159 @override
150 UriKind get uriKind { 160 UriKind get uriKind {
151 String scheme = uri.scheme; 161 String scheme = uri.scheme;
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 for (JavaFile dir in _relativeDirectories) { 512 for (JavaFile dir in _relativeDirectories) {
503 JavaFile file = new JavaFile.relative(dir, filePath); 513 JavaFile file = new JavaFile.relative(dir, filePath);
504 if (file.exists()) { 514 if (file.exists()) {
505 return new FileBasedSource.con2(uri, file); 515 return new FileBasedSource.con2(uri, file);
506 } 516 }
507 } 517 }
508 } 518 }
509 return null; 519 return null;
510 } 520 }
511 } 521 }
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