1.1 --- a/ada.editor/src/org/netbeans/modules/ada/editor/navigator/SemiAttribute.java Wed Sep 23 02:06:44 2009 +0200
1.2 +++ b/ada.editor/src/org/netbeans/modules/ada/editor/navigator/SemiAttribute.java Sun Aug 22 23:37:11 2010 +0200
1.3 @@ -73,7 +73,8 @@
1.4 import org.netbeans.modules.ada.editor.ast.nodes.TypeDeclaration;
1.5 import org.netbeans.modules.ada.editor.ast.nodes.TypeName;
1.6 import org.netbeans.modules.ada.editor.ast.nodes.Variable;
1.7 -import org.netbeans.modules.ada.editor.ast.nodes.VariableBase;
1.8 +import org.netbeans.modules.ada.editor.ast.nodes.NameBase;
1.9 +import org.netbeans.modules.ada.editor.ast.nodes.TypeAccess;
1.10 import org.netbeans.modules.ada.editor.ast.nodes.visitors.DefaultVisitor;
1.11 import org.netbeans.modules.ada.editor.indexer.AdaIndex;
1.12 import org.netbeans.modules.ada.editor.indexer.IndexedElement;
1.13 @@ -144,7 +145,7 @@
1.14
1.15 @Override
1.16 public void visit(Assignment node) {
1.17 - final VariableBase vb = node.getLeftHandSide();
1.18 + final NameBase vb = node.getLeftHandSide();
1.19
1.20 if (vb instanceof Variable) {
1.21 AttributedType at = null;
1.22 @@ -255,7 +256,14 @@
1.23 scopes.peek().enterWrite(name, Kind.VARIABLE, var);
1.24 }
1.25 }
1.26 - TypeName parameterType = node.getParameterType();
1.27 +
1.28 + TypeName parameterType;
1.29 + if (node.getParameterType() instanceof TypeAccess) {
1.30 + parameterType = ((TypeAccess)node.getParameterType()).getField();
1.31 + } else {
1.32 + parameterType = (TypeName)node.getParameterType();
1.33 + }
1.34 +
1.35 if (parameterType != null) {
1.36 String name = parameterType.getTypeName().getName();
1.37 if (name != null) {
1.38 @@ -539,8 +547,8 @@
1.39
1.40 @CheckForNull
1.41 //TODO converge this method with CodeUtils.extractTypeName()
1.42 - public static String extractTypeName(TypeDeclaration var) {
1.43 - String typeName = CodeUtils.extractTypeName(var);
1.44 + public static String extractTypeName(TypeDeclaration type) {
1.45 + String typeName = CodeUtils.extractTypeName(type);
1.46
1.47 return typeName;
1.48 }