Author: scabanovich
Date: 2012-05-24 14:07:27 -0400 (Thu, 24 May 2012)
New Revision: 41364
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLModelObjectFinder.java
Log:
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLModelObjectFinder.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLModelObjectFinder.java 2012-05-24
18:02:26 UTC (rev 41363)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLModelObjectFinder.java 2012-05-24
18:07:27 UTC (rev 41364)
@@ -84,6 +84,15 @@
XModelObject res = findModelObject(chain, cs[i]);
if(res != cs[i]) return res;
}
+ XModelObject x = o.getChildByPath(chain.name + ((chain.index == 0) ? "" :
chain.index));
+ if(x != null) {
+ XModelObject res = findModelObject(chain.child, x);
+ if(res != null) {
+ return res;
+ } else {
+ return x;
+ }
+ }
return o;
}
}
Show replies by date