Fix the issue #131958 - AssertionError on selecting element reference in Create New Variable dialog
1.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/ResolverUtility.java Mon Apr 07 16:52:12 2008 +0400
1.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/ResolverUtility.java Mon Apr 07 17:13:57 2008 +0400
1.3 @@ -45,6 +45,7 @@
1.4 import org.netbeans.modules.xml.xam.ModelSource;
1.5 import org.netbeans.modules.xml.xam.Named;
1.6 import org.netbeans.modules.xml.xam.Reference;
1.7 +import org.netbeans.modules.xml.xpath.ext.schema.GetNameVisitor;
1.8 import org.openide.util.NbBundle;
1.9
1.10 /**
1.11 @@ -121,9 +122,9 @@
1.12 } else if (comp instanceof SchemaComponent) {
1.13 targetNamespace = ((SchemaComponent)comp).getModel().
1.14 getSchema().getTargetNamespace();
1.15 - if (comp instanceof Named) {
1.16 - compName = ((Named)comp).getName();
1.17 - }
1.18 + GetNameVisitor nameVisitor = new GetNameVisitor();
1.19 + ((SchemaComponent)comp).accept(nameVisitor);
1.20 + compName = nameVisitor.getName();
1.21 }
1.22 //
1.23 assert compName != null :