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

Side by Side Diff: editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/Context.java

Issue 135803003: Translate index. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012, the Dart project authors. 2 * Copyright (c) 2012, 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 */ 387 */
388 public ConstructorDescription getConstructorDescription(ConstructorDeclaration node) { 388 public ConstructorDescription getConstructorDescription(ConstructorDeclaration node) {
389 IMethodBinding binding = constructorToBinding.get(node); 389 IMethodBinding binding = constructorToBinding.get(node);
390 return getConstructorDescription(binding); 390 return getConstructorDescription(binding);
391 } 391 }
392 392
393 /** 393 /**
394 * @return the not <code>null</code> {@link ConstructorDescription}, may be ju st added. 394 * @return the not <code>null</code> {@link ConstructorDescription}, may be ju st added.
395 */ 395 */
396 public ConstructorDescription getConstructorDescription(IMethodBinding binding ) { 396 public ConstructorDescription getConstructorDescription(IMethodBinding binding ) {
397 binding = (IMethodBinding) Bindings.getDeclaration(binding);
397 ConstructorDescription description = bindingToConstructor.get(binding); 398 ConstructorDescription description = bindingToConstructor.get(binding);
398 if (description == null) { 399 if (description == null) {
399 description = new ConstructorDescription(binding); 400 description = new ConstructorDescription(binding);
400 bindingToConstructor.put(binding, description); 401 bindingToConstructor.put(binding, description);
401 } 402 }
402 return description; 403 return description;
403 } 404 }
404 405
405 public Map<File, List<CompilationUnitMember>> getFileToMembers() { 406 public Map<File, List<CompilationUnitMember>> getFileToMembers() {
406 return fileToMembers; 407 return fileToMembers;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 if (declaration != null) { 633 if (declaration != null) {
633 anonymousDeclarations.put(creation, declaration); 634 anonymousDeclarations.put(creation, declaration);
634 } 635 }
635 } 636 }
636 637
637 /** 638 /**
638 * Remembers that given {@link SimpleIdentifier} used as name of the named 639 * Remembers that given {@link SimpleIdentifier} used as name of the named
639 * {@link ConstructorDeclaration} is reference to the given Java signature. 640 * {@link ConstructorDeclaration} is reference to the given Java signature.
640 */ 641 */
641 void putConstructorBinding(ConstructorDeclaration node, IMethodBinding binding ) { 642 void putConstructorBinding(ConstructorDeclaration node, IMethodBinding binding ) {
643 binding = (IMethodBinding) Bindings.getDeclaration(binding);
642 constructorToBinding.put(node, binding); 644 constructorToBinding.put(node, binding);
643 } 645 }
644 646
645 /** 647 /**
646 * Remembers that given {@link SimpleIdentifier} is the name of inner class an d all references to 648 * Remembers that given {@link SimpleIdentifier} is the name of inner class an d all references to
647 * it should be renamed. 649 * it should be renamed.
648 */ 650 */
649 void putInnerClassName(SimpleIdentifier identifier) { 651 void putInnerClassName(SimpleIdentifier identifier) {
650 innerClassNames.add(identifier); 652 innerClassNames.add(identifier);
651 } 653 }
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 } 983 }
982 } 984 }
983 } 985 }
984 } 986 }
985 } 987 }
986 } 988 }
987 } 989 }
988 }); 990 });
989 } 991 }
990 } 992 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698