Author: scabanovich
Date: 2009-11-17 10:25:00 -0500 (Tue, 17 Nov 2009)
New Revision: 18713
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionListImpl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5199
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionListImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionListImpl.java 2009-11-17
14:42:02 UTC (rev 18712)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionListImpl.java 2009-11-17
15:25:00 UTC (rev 18713)
@@ -15,6 +15,7 @@
import org.jboss.tools.common.meta.XModelEntity;
import org.jboss.tools.common.meta.action.*;
import org.jboss.tools.common.meta.impl.*;
+import org.jboss.tools.common.model.XModelObjectConstants;
public class XActionListImpl extends XActionItemImpl implements XActionList {
private XActionItem[] items;
@@ -109,15 +110,18 @@
} else if(XMODEL_ACTION_ITEM_REF.equals(tag)) {
String entityName = ei.getAttribute(XMetaDataConstants.ENTITY);
String attrName = ei.getAttribute(NAME);
+ String defaultPath = (getPath() == null) ? attrName : getPath() +
XModelObjectConstants.SEPARATOR + attrName;
String path = ei.hasAttribute("path") //$NON-NLS-1$
? ei.getAttribute("path") //$NON-NLS-1$
- : attrName;
+ : defaultPath;
XModelEntity entity = getMetaModel().getEntity(entityName);
if(entity != null) {
XActionItem item = ((XActionListImpl)entity.getActionList()).findItem(path);
if(item != null) {
list.add(item.copy(Acceptor.DEFAULT));
+ } else {
+// System.out.println("Cannot find path " + path);
}
}
}