Fix for Bug 294. 46/4646/1
authorMartin Vitez <mvitez@cisco.com>
Thu, 23 Jan 2014 13:36:49 +0000 (14:36 +0100)
committerMartin Vitez <mvitez@cisco.com>
Thu, 23 Jan 2014 13:36:49 +0000 (14:36 +0100)
Added lookup of rpc statements when searching by augment target path.

Signed-off-by: Martin Vitez <mvitez@cisco.com>
code-generator/maven-sal-api-gen-plugin/src/main/java/org/opendaylight/yangtools/yang/unified/doc/generator/GeneratorImpl.xtend

index c08366f36e4d3859ccdcdc705c654a20fa659c74..d0c436ba94e0b2b3e72f22f69f934e6df1f2bd5a 100644 (file)
@@ -611,11 +611,19 @@ class GeneratorImpl {
                 if (node == null && (parent instanceof Module)) {\r
                     val notifications = (parent as Module).notifications;\r
                     for (notification : notifications) {\r
-                        if (notification.QName.localName.equals(name.localName)) {\r
+                        if (notification.QName.equals(name)) {\r
                             node = notification\r
                         }\r
                     }\r
                 }\r
+                if (node == null && (parent instanceof Module)) {
+                    val rpcs = (parent as Module).rpcs;
+                    for (rpc : rpcs) {
+                        if (rpc.QName.equals(name)) {
+                            node = rpc
+                        }
+                    }
+                }
 \r
                 if (!(node instanceof ChoiceNode) && !(node instanceof ChoiceCaseNode)) {\r
                     var String prefix = node.QName.prefix\r