OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, the Dart project authors. | 2 * Copyright (c) 2013, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 public LibraryElement getLibraryElement(Source source) { | 170 public LibraryElement getLibraryElement(Source source) { |
171 if (source.isInSystemLibrary()) { | 171 if (source.isInSystemLibrary()) { |
172 return sdkAnalysisContext.getLibraryElement(source); | 172 return sdkAnalysisContext.getLibraryElement(source); |
173 } else { | 173 } else { |
174 return super.getLibraryElement(source); | 174 return super.getLibraryElement(source); |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 @Override | 178 @Override |
179 public Source[] getLibrarySources() { | 179 public Source[] getLibrarySources() { |
180 return ArrayUtils.addAll(getLibrarySources(), sdkAnalysisContext.getLibraryS
ources()); | 180 return ArrayUtils.addAll(super.getLibrarySources(), sdkAnalysisContext.getLi
brarySources()); |
181 } | 181 } |
182 | 182 |
183 @Override | 183 @Override |
184 public LineInfo getLineInfo(Source source) { | 184 public LineInfo getLineInfo(Source source) { |
185 if (source.isInSystemLibrary()) { | 185 if (source.isInSystemLibrary()) { |
186 return sdkAnalysisContext.getLineInfo(source); | 186 return sdkAnalysisContext.getLineInfo(source); |
187 } else { | 187 } else { |
188 return super.getLineInfo(source); | 188 return super.getLineInfo(source); |
189 } | 189 } |
190 } | 190 } |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 super.setSourceFactory(factory); | 349 super.setSourceFactory(factory); |
350 DartSdk sdk = factory.getDartSdk(); | 350 DartSdk sdk = factory.getDartSdk(); |
351 if (sdk != null) { | 351 if (sdk != null) { |
352 sdkAnalysisContext = (InternalAnalysisContext) sdk.getContext(); | 352 sdkAnalysisContext = (InternalAnalysisContext) sdk.getContext(); |
353 } else { | 353 } else { |
354 throw new IllegalStateException( | 354 throw new IllegalStateException( |
355 "SourceFactorys provided to DelegatingAnalysisContextImpls must have a
DartSdk associated with the provided SourceFactory."); | 355 "SourceFactorys provided to DelegatingAnalysisContextImpls must have a
DartSdk associated with the provided SourceFactory."); |
356 } | 356 } |
357 } | 357 } |
358 } | 358 } |
OLD | NEW |