### Eclipse Workspace Patch 1.0
#P org.jboss.tools.jst.jsp
Index: src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java
===================================================================
--- src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java	(revision 25814)
+++ src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java	(working copy)
@@ -113,6 +113,10 @@
 		if(k >= 0) {
 			return text.substring(0, k + 2) + prefix + ":" + text.substring(k + 2); //$NON-NLS-1$
 		}
+		k = text.toLowerCase().indexOf("${" + tagname.toLowerCase()); //$NON-NLS-1$
+		if(k >= 0) {
+			return text.substring(0, k + 2) + prefix + ":" + text.substring(k + 2); //$NON-NLS-1$
+		}
 		return text;
 	}
 
#P org.jboss.tools.jst.web
Index: src/org/jboss/tools/jst/web/tld/model/handlers/JSPAdopt.java
===================================================================
--- src/org/jboss/tools/jst/web/tld/model/handlers/JSPAdopt.java	(revision 24572)
+++ src/org/jboss/tools/jst/web/tld/model/handlers/JSPAdopt.java	(working copy)
@@ -126,6 +126,7 @@
 			if(!Character.isJavaIdentifierPart(c) && c != '.' && c != ':') return false;
 		}
 		int q = s.indexOf('<');
+		if(q < 0) q = s.indexOf("${");
 		if(q < 0) return false;
 		if(s.indexOf(n, q) < 0) return false;
 		return true;
Index: src/org/jboss/tools/jst/web/tld/model/helpers/TLDToPaletteHelper.java
===================================================================
--- src/org/jboss/tools/jst/web/tld/model/helpers/TLDToPaletteHelper.java	(revision 24572)
+++ src/org/jboss/tools/jst/web/tld/model/helpers/TLDToPaletteHelper.java	(working copy)
@@ -11,6 +11,7 @@
 package org.jboss.tools.jst.web.tld.model.helpers;
 
 import java.util.*;
+
 import org.jboss.tools.common.model.*;
 import org.jboss.tools.jst.web.tld.URIConstants;
 import org.jboss.tools.jst.web.tld.model.TLDUtil;
@@ -167,6 +168,13 @@
         	if(TLDUtil.isTag(tags[i])) tab.addChild(createMacroByTag(tags[i], model));
         	if(TLDUtil.isFaceletTag(tags[i])) tab.addChild(createMacroByFaceletTag(tags[i], model));
         }
+        XModelObject f = tld.getChildByPath("Functions"); //$NON-NLS-1$
+        if(f != null) {
+        	XModelObject[] fs = f.getChildren();
+        	for (int i = 0; i < fs.length; i++) {
+        		tab.addChild(createMacroByFunction(fs[i], model));
+        	}
+        }
         return tab;
     }
 
@@ -174,5 +182,43 @@
         return (s.length() == 0) ? s : Character.toUpperCase(s.charAt(0)) + s.substring(1);
     }
 
+    public XModelObject createMacroByFunction(XModelObject tag, XModel model) {
+        Properties p = new Properties();
+        String parentname = getTldName(tag.getParent());
+//        String prefix = (parentname.length() == 0) ? "" : parentname + ":"; //$NON-NLS-1$ //$NON-NLS-2$
+        String shortname = tag.getAttributeValue("name"); //$NON-NLS-1$
+		p.setProperty("name", shortname); //$NON-NLS-1$
+		String signature = tag.getAttributeValue("function-signature"); //$NON-NLS-1$
+		int i = signature.indexOf("("); //$NON-NLS-1$
+		int j = signature.indexOf(")"); //$NON-NLS-1$
+		List<String> paramTypes = new ArrayList<String>();
+		if(i >= 0 && j > i) {
+			String params = signature.substring(i + 1, j);
+			StringTokenizer st = new StringTokenizer(params, ","); //$NON-NLS-1$
+			while(st.hasMoreTokens()) {
+				String param = st.nextToken().trim();
+				paramTypes.add(param);
+			}
+		}
+		
+		StringBuffer sb = new StringBuffer();
+		sb.append("${"); //$NON-NLS-1$
+		sb.append(shortname);
+		sb.append("("); //$NON-NLS-1$
+		for (int k = 0; k < paramTypes.size(); k++) {
+			if(k > 0) sb.append(", "); //$NON-NLS-1$
+			sb.append("''"); //$NON-NLS-1$
+		}
+		sb.append(")"); //$NON-NLS-1$
+		sb.append("}"); //$NON-NLS-1$
+        p.setProperty(START_TEXT, sb.toString());
+        
+        sb = new StringBuffer();
+        sb.append("<b>").append(shortname).append("</b><br>");
+        sb.append(signature);
+        p.setProperty(DESCRIPTION, sb.toString());
+        return model.createModelObject("SharableMacroHTML", p); //$NON-NLS-1$
+    }
+
 }
 
