Author: scabanovich
Date: 2007-09-17 09:24:52 -0400 (Mon, 17 Sep 2007)
New Revision: 3653
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/LargeReferencedIcons.java
Log:
JBIDE-571
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/LargeReferencedIcons.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/LargeReferencedIcons.java 2007-09-17
13:24:30 UTC (rev 3652)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/LargeReferencedIcons.java 2007-09-17
13:24:52 UTC (rev 3653)
@@ -18,6 +18,7 @@
* @author Viacheslav Kabanovich
*/
public class LargeReferencedIcons implements ImageComponent {
+ static String DEFAULT_LARGE_ICON = "main.xstudio.palette.macro-tag-large";
ReferencedIcons ri = new ReferencedIcons();
private XStudioIcons studioicons = new XStudioIcons();
@@ -26,6 +27,10 @@
public int getHash(XModelObject obj) {
String x = obj.getAttributeValue("large icon");
if (x == null || x.trim().length() == 0) {
+ x = obj.getAttributeValue("icon");
+ if (x == null || x.trim().length() == 0) {
+ return DEFAULT_LARGE_ICON.hashCode();
+ }
return ri.getHash(obj);
}
XModelObject r = obj.getModel().getByPath(x);
@@ -35,6 +40,10 @@
public Image getImage(XModelObject obj) {
String v = obj.getAttributeValue("large icon");
if(v == null || v.trim().length() == 0) {
+ v = obj.getAttributeValue("icon");
+ if(v == null || v.trim().length() == 0) {
+ return
obj.getModelEntity().getMetaModel().getIconList().getImage(DEFAULT_LARGE_ICON);
+ }
return ri.getImage(obj);
}
XModelObject ic = (v == null || v.trim().length() == 0) ? null :
obj.getModel().getByPath(v);