[jboss-user] [JBoss Tools (users)] - Re: XHTML files and content assist with custom tags

campi do-not-reply at jboss.com
Wed Jul 30 04:23:16 EDT 2008


Here my plugin.xml :

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <?eclipse version="3.0"?>
  | 
  | <plugin>
  | 
  |    <extension-point id="tldResource" name="KB TLD Resource" schema="schema/tldResource.exsd"/>
  | 
  |    <extension
  | 
  |          point="org.jboss.tools.common.kb.tldResource">
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="JSF Core"
  | 
  |             schema-location="schemas/tld/JsfCore1_2.xml"
  | 
  |             uri="http://java.sun.com/jsf/core"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="JSF HTML Basic"
  | 
  |             schema-location="schemas/tld/JsfHtmlBasic1_1.xml"
  | 
  |             uri="http://java.sun.com/jsf/html"
  | 
  |             version="1.0"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="JSF HTML Basic"
  | 
  |             schema-location="schemas/tld/JsfHtmlBasic1_2.xml"
  | 
  |             uri="http://java.sun.com/jsf/html"/>
  | 
  | 
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="JBoss Seam"
  | 
  |             schema-location="schemas/tld/JBossSeam1_2.xml"
  | 
  |             uri="http://jboss.com/products/seam/taglib"
  | 
  |             version="1.1"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="JBoss Seam"
  | 
  |             schema-location="schemas/tld/JBossSeam1_2.xml"
  | 
  |             uri="http://jboss.com/products/seam/taglib"
  | 
  |             version="1.2"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="JBoss Seam"
  | 
  |             schema-location="schemas/tld/JBossSeam2_0.xml"
  | 
  |             uri="http://jboss.com/products/seam/taglib"/>
  | 
  | 
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="JBoss Rich Faces"
  | 
  |             schema-location="schemas/tld/Vcp.xml"
  | 
  |             uri="http://richfaces.ajax4jsf.org/rich"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="JBoss Rich Faces 3.1"
  | 
  |             schema-location="schemas/tld/Richfaces3_1.xml"
  | 
  |             uri="http://richfaces.org/rich"
  | 
  |             version="1.2"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="JBoss Rich Faces 3.2"
  | 
  |             schema-location="schemas/tld/Richfaces3_2.xml"
  | 
  |             uri="http://richfaces.org/rich"/>
  | 
  | 
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="Rich Faces Ajax"
  | 
  |             schema-location="schemas/tld/VcpAjax.xml"
  | 
  |             uri="http://www.redhat.com/vcp/components/ajax"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="JBoss Ajax4jsf"
  | 
  |             schema-location="schemas/tld/ajax4jsf.xml"
  | 
  |             uri="https://ajax4jsf.dev.java.net/ajax"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="JBoss Ajax4jsf 3.1"
  | 
  |             schema-location="schemas/tld/Ajax4jsf3_1.xml"
  | 
  |             uri="http://richfaces.org/a4j"
  | 
  |             version="1.2"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="JBoss Ajax4jsf 3.2"
  | 
  |             schema-location="schemas/tld/Ajax4jsf3_2.xml"
  | 
  |             uri="http://richfaces.org/a4j"/>
  | 
  | 
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="My Faces Extension"
  | 
  |             schema-location="schemas/tld/MyFacesExt.xml"
  | 
  |             uri="http://myfaces.apache.org/extensions"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="My Faces Sandbox"
  | 
  |             schema-location="schemas/tld/MyFacesSandbox.xml"
  | 
  |             uri="http://myfaces.apache.org/sandbox"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="My Faces Tomahawk"
  | 
  |             schema-location="schemas/tld/MyFacesTomahawk.xml"
  | 
  |             uri="http://myfaces.apache.org/tomahawk"/>
  | 
  | 
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="Facelets"
  | 
  |             schema-location="schemas/tld/Facelets.xml"
  | 
  |             uri="http://java.sun.com/jsf/facelets"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="Facelets Html"
  | 
  |             schema-location="schemas/tld/FaceletsHtml.xml"
  | 
  |             uri="http://www.w3.org/1999/xhtml/facelets"/>
  | 
  | 
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="ADF Faces Core"
  | 
  |             schema-location="schemas/tld/ADFFacesCore.xml"
  | 
  |             uri="http://xmlns.oracle.com/adf/faces"/>
  | 
  |       <tld
  | 
  |             jsf="true"
  | 
  |             name="ADF Faces HTML"
  | 
  |             schema-location="schemas/tld/ADFFacesHtml.xml"
  | 
  |             uri="http://xmlns.oracle.com/adf/faces/html"/>
  | 
  | 
  | 
  |       <tld
  | 
  |             name="JSTL Core 1.0"
  | 
  |             schema-location="schemas/tld/JstlCore1_0.xml"
  | 
  |             uri="http://java.sun.com/jstl/core"/>
  | 
  |       <tld
  | 
  |             name="JSTL Format 1.0"
  | 
  |             schema-location="schemas/tld/JstlFmt1_0.xml"
  | 
  |             uri="http://java.sun.com/jstl/fmt"/>
  | 
  |       <tld
  | 
  |             name="JSTL SQL 1.0"
  | 
  |             schema-location="schemas/tld/JstlSql1_0.xml"
  | 
  |             uri="http://java.sun.com/jstl/sql"/>
  | 
  |       <tld
  | 
  |             name="JSTL XML 1.0"
  | 
  |             schema-location="schemas/tld/JstlXml1_0.xml"
  | 
  |             uri="http://java.sun.com/jstl/xml"/>
  | 
  | 
  | 
  |       <tld
  | 
  |             name="Struts HTML"
  | 
  |             schema-location="schemas/tld/StrutsHtml.xml"
  | 
  |             uri="http://struts.apache.org/tags-html"/>
  | 
  |       <tld
  | 
  |             name="Struts Bean"
  | 
  |             schema-location="schemas/tld/StrutsBean.xml"
  | 
  |             uri="http://struts.apache.org/tags-bean"/>
  | 
  |       <tld
  | 
  |             name="Struts Tiles"
  | 
  |             schema-location="schemas/tld/StrutsTiles.xml"
  | 
  |             uri="http://struts.apache.org/tags-tiles"/>
  | 
  |       <tld
  | 
  |             name="Struts Tiles 1.1"
  | 
  |             schema-location="schemas/tld/StrutsTiles11.xml"
  | 
  |             uri="http://jakarta.apache.org/struts/tags-tiles-1.1"/>
  | 
  | 
  | 
  |       <tld
  | 
  |             name="JSP"
  | 
  |             schema-location="schemas/tld/Jsp.xml"
  | 
  |             uri="http://java.sun.com/JSP/Page"/>
  | 
  |       <tld
  |             jsf="true"
  | 
  |             name="AtexoCommonsPages"
  | 
  |             schema-location="schemas/tld/AtexoCommonsPages.xml"
  | 
  |             uri="http://www.atexo.com/commons-pages"/>
  | 
  | 
  |       <tld
  |             jsf="true"
  | 
  |             name="AtexoCommons"
  | 
  |             schema-location="schemas/tld/AtexoCommons.xml"
  | 
  |             uri="http://www.atexo.com/jsf"/>
  | 
  |       <tld
  |             jsf="true"
  | 
  |             name="AtexoSub"
  | 
  |             schema-location="schemas/tld/AtexoSub.xml"
  | 
  |             uri="http://www.atexo.com/sub"/>
  | 
  | 
  |   </extension>
  | 
  | 
  | 
  | </plugin>
  | 

My Three tld that I will be using are the last three.

Here my AtexoCommonsPages.xml : 

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <!DOCTYPE kb-schema PUBLIC "-//Red Hat, Inc//DTD Knowledge Base 1.0//EN" "http://www.redhat.com/dtds/kb-schema_1_0.dtd">
  | 
  | <schema prefix="commons-pages">   
  | 	<element-type body-content="allowed" content="mixed" name="referentielAddOrUpdate" start-tag="required">
  | 
  | 		<description>Renders the referentiel add or update form page.</description>
  | 		<attribute-type name="title" required="true" value="java.lang.String">
  | 
  | 			<proposal type="beanProperty"/>
  | 
  | 			<proposal type="bundleProperty"/>
  | 
  | 			<proposal type="jsfVariables"/>
  | 
  | 		</attribute-type>
  | 		<attribute type="title"/>
  | 
  | 	</element-type>
  | 
  | 	<element-type body-content="allowed" content="mixed" name="referentielDelete" start-tag="required">
  | 
  | 		<description>Renders the referentiel delete form page.</description>
  | 
  | 	</element-type>
  | </schema>
  | 

I haven't rewrite all my tad (someday I'll have the time for, I hope), but this exemple is working.

Here some screenshots after an eclipse -clean :
http://champion.louis.free.fr/screenshot/eclipse/completion-custom-tag.png
http://champion.louis.free.fr/screenshot/eclipse/completion-attribute.png

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167536#4167536

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167536



More information about the jboss-user mailing list