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 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 | 1062 |
1063 @Override | 1063 @Override |
1064 public Void visitConstructorName(ConstructorName node) { | 1064 public Void visitConstructorName(ConstructorName node) { |
1065 if (typeName == node.getType()) { | 1065 if (typeName == node.getType()) { |
1066 if (node.getPeriod() != null) { | 1066 if (node.getPeriod() != null) { |
1067 if (isCompletionAfter(node.getPeriod().getEnd())) { | 1067 if (isCompletionAfter(node.getPeriod().getEnd())) { |
1068 // Is this branch reachable? Probably only in IdentifierCompleter. | 1068 // Is this branch reachable? Probably only in IdentifierCompleter. |
1069 "".toString(); // TODO This currently is just a place-holder for a b
reakpoint. | 1069 "".toString(); // TODO This currently is just a place-holder for a b
reakpoint. |
1070 } else { | 1070 } else { |
1071 // { new Cla!ss.cons() } | 1071 // { new Cla!ss.cons() } |
1072 namedConstructorReference((ClassElement) identifier.getElement(), id
entifier); | 1072 Element element = identifier.getElement(); |
| 1073 if (element instanceof ClassElement) { |
| 1074 namedConstructorReference((ClassElement) element, identifier); |
| 1075 } |
1073 } | 1076 } |
1074 } else { | 1077 } else { |
1075 // { new ! } { new Na!me(); } { new js!on. } | 1078 // { new ! } { new Na!me(); } { new js!on. } |
1076 analyzeConstructorTypeName(identifier); | 1079 analyzeConstructorTypeName(identifier); |
1077 } | 1080 } |
1078 } | 1081 } |
1079 return null; | 1082 return null; |
1080 } | 1083 } |
1081 | 1084 |
1082 @Override | 1085 @Override |
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2186 ASTNode parent = node; | 2189 ASTNode parent = node; |
2187 while (parent != null) { | 2190 while (parent != null) { |
2188 if (parent instanceof ClassDeclaration) { | 2191 if (parent instanceof ClassDeclaration) { |
2189 return ((ClassDeclaration) parent).getElement().getType(); | 2192 return ((ClassDeclaration) parent).getElement().getType(); |
2190 } | 2193 } |
2191 parent = parent.getParent(); | 2194 parent = parent.getParent(); |
2192 } | 2195 } |
2193 return DynamicTypeImpl.getInstance(); | 2196 return DynamicTypeImpl.getInstance(); |
2194 } | 2197 } |
2195 } | 2198 } |
OLD | NEW |