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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 public Void visitTypeName(TypeName node) { | 261 public Void visitTypeName(TypeName node) { |
262 super.visitTypeName(node); | 262 super.visitTypeName(node); |
263 ITypeBinding binding = context.getNodeTypeBinding(node); | 263 ITypeBinding binding = context.getNodeTypeBinding(node); |
264 if (node.getName() instanceof SimpleIdentifier) { | 264 if (node.getName() instanceof SimpleIdentifier) { |
265 SimpleIdentifier nameNode = (SimpleIdentifier) node.getName(); | 265 SimpleIdentifier nameNode = (SimpleIdentifier) node.getName(); |
266 String name = nameNode.getName(); | 266 String name = nameNode.getName(); |
267 if (JavaUtils.isTypeNamed(binding, "java.util.ArrayList")) { | 267 if (JavaUtils.isTypeNamed(binding, "java.util.ArrayList")) { |
268 nameNode.setToken(token("List")); | 268 nameNode.setToken(token("List")); |
269 return null; | 269 return null; |
270 } | 270 } |
| 271 if (JavaUtils.isTypeNamed(binding, "java.util.LinkedList")) { |
| 272 nameNode.setToken(token("Queue")); |
| 273 return null; |
| 274 } |
271 if ("EnumSet".equals(name)) { | 275 if ("EnumSet".equals(name)) { |
272 nameNode.setToken(token("Set")); | 276 nameNode.setToken(token("Set")); |
273 return null; | 277 return null; |
274 } | 278 } |
275 if ("HashSet".equals(name)) { | 279 if ("HashSet".equals(name)) { |
276 nameNode.setToken(token("Set")); | 280 nameNode.setToken(token("Set")); |
277 return null; | 281 return null; |
278 } | 282 } |
279 if ("HashMap".equals(name)) { | 283 if ("HashMap".equals(name)) { |
280 nameNode.setToken(token("Map")); | 284 nameNode.setToken(token("Map")); |
281 return null; | 285 return null; |
282 } | 286 } |
283 if (JavaUtils.isTypeNamed(binding, "java.util.Map.Entry")) { | 287 if (JavaUtils.isTypeNamed(binding, "java.util.Map.Entry")) { |
284 nameNode.setToken(token("MapEntry")); | 288 nameNode.setToken(token("MapEntry")); |
285 return null; | 289 return null; |
286 } | 290 } |
287 if (JavaUtils.isTypeNamed(binding, "java.util.Iterator")) { | 291 if (JavaUtils.isTypeNamed(binding, "java.util.Iterator")) { |
288 nameNode.setToken(token("JavaIterator")); | 292 nameNode.setToken(token("JavaIterator")); |
289 return null; | 293 return null; |
290 } | 294 } |
291 } | 295 } |
292 return null; | 296 return null; |
293 } | 297 } |
294 }); | 298 }); |
295 } | 299 } |
296 } | 300 } |
OLD | NEW |