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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 // If errors are available, then queue the errors to be translated to marker
s | 119 // If errors are available, then queue the errors to be translated to marker
s |
120 AnalysisError[] errors = change.getErrors(); | 120 AnalysisError[] errors = change.getErrors(); |
121 if (errors != null) { | 121 if (errors != null) { |
122 Source source = change.getSource(); | 122 Source source = change.getSource(); |
123 IResource res = project.getResource(source); | 123 IResource res = project.getResource(source); |
124 if (res == null) { | 124 if (res == null) { |
125 // TODO (danrubel): log unmatched sources once context only returns erro
rs for added sources | 125 // TODO (danrubel): log unmatched sources once context only returns erro
rs for added sources |
126 // DartCore.logError("Failed to determine resource for: " + source); | 126 // DartCore.logError("Failed to determine resource for: " + source); |
127 } else { | 127 } else { |
128 LineInfo lineInfo = change.getLineInfo(); | 128 if (!DartCore.isContainedInPackages(res.getLocation().toFile())) { |
129 if (lineInfo == null) { | 129 LineInfo lineInfo = change.getLineInfo(); |
130 DartCore.logError("Missing line information for: " + source); | 130 if (lineInfo == null) { |
131 } else { | 131 DartCore.logError("Missing line information for: " + source); |
132 markerManager.queueErrors(res, lineInfo, errors); | 132 } else { |
| 133 markerManager.queueErrors(res, lineInfo, errors); |
| 134 } |
133 } | 135 } |
134 } | 136 } |
135 } | 137 } |
136 | 138 |
137 // If there is a unit to be indexed, then do so | 139 // If there is a unit to be indexed, then do so |
138 CompilationUnit unit = change.getCompilationUnit(); | 140 CompilationUnit unit = change.getCompilationUnit(); |
139 if (unit != null) { | 141 if (unit != null) { |
140 index.indexUnit(context, unit); | 142 index.indexUnit(context, unit); |
141 } | 143 } |
142 } | 144 } |
(...skipping 11 matching lines...) Expand all Loading... |
154 return false; | 156 return false; |
155 } | 157 } |
156 | 158 |
157 // process results and return true indicating there might be more analysis | 159 // process results and return true indicating there might be more analysis |
158 for (ChangeNotice change : changes) { | 160 for (ChangeNotice change : changes) { |
159 processChange(change); | 161 processChange(change); |
160 } | 162 } |
161 return true; | 163 return true; |
162 } | 164 } |
163 } | 165 } |
OLD | NEW |