Author: scabanovich
Date: 2011-06-29 19:01:15 -0400 (Wed, 29 Jun 2011)
New Revision: 32481
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/testJSFProject/WebContent/WEB-INF/kgcomponents.taglib.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/TestPalette.java
Log:
JBIDE-9279
https://issues.jboss.org/browse/JBIDE-9279
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/testJSFProject/WebContent/WEB-INF/kgcomponents.taglib.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/testJSFProject/WebContent/WEB-INF/kgcomponents.taglib.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/testJSFProject/WebContent/WEB-INF/kgcomponents.taglib.xml 2011-06-29
23:01:15 UTC (rev 32481)
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<!DOCTYPE facelet-taglib PUBLIC
+"-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+"http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib>
+ <
namespace>http://www.krasig.org/paduan</namespace>
+ <tag>
+ <tag-name>myModal</tag-name>
+ <source>myModal.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>myModalMany</tag-name>
+ <source>myModalMany.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalTreeMany</tag-name>
+ <source>modalTreeMany.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>myModalJivObj</tag-name>
+ <source>myModalJivObject.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalLica</tag-name>
+ <source>modalLica.xhtml</source>
+ </tag>
+
+ <tag>
+ <tag-name>modalOrg</tag-name>
+ <source>modalOrg.xhtml</source>
+ </tag>
+
+ <tag>
+ <tag-name>modalJivObekt</tag-name>
+ <source>modalJivObekt.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalAnimals</tag-name>
+ <source>modalAnimals.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalAnimalsSimple</tag-name>
+ <source>modalAnimalsSimple.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalVetSpec</tag-name>
+ <source>modalVetSpec.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalVlzList</tag-name>
+ <source>modalVlzList.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalMpsList</tag-name>
+ <source>modalMpsList.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalSelectAnimals</tag-name>
+ <source>modalSelectAnimals.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalJivObektSelectMany</tag-name>
+ <source>modalJivObektSelectMany.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalLiceOrgJivotni</tag-name>
+ <source>modalLiceOrgJivotni.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalAddOperacia</tag-name>
+ <source>modalAddOperacia.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalAddImunoMerop</tag-name>
+ <source>modalAddImunoMerop.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalSelectRFID</tag-name>
+ <source>modalSelectRFID.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalAddSickness</tag-name>
+ <source>modalAddSickness.xhtml</source>
+ </tag>
+ <tag>
+ <tag-name>modalStado</tag-name>
+ <source>modalStado.xhtml</source>
+ </tag>
+</facelet-taglib>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/testJSFProject/WebContent/WEB-INF/kgcomponents.taglib.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/TestPalette.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/TestPalette.java 2011-06-29
22:42:57 UTC (rev 32480)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/TestPalette.java 2011-06-29
23:01:15 UTC (rev 32481)
@@ -169,6 +169,20 @@
assertEquals("Text of macros containsIgnoreCase is not correct.",
"${containsIgnoreCase('', '')}", m.getAttributeValue("start
text"));
}
+ public void testFaceletTaglibImport() throws Exception {
+ XModel model = EclipseResourceUtil.getModelNature(jsfProject).getModel();
+
+ XModelObject tld = model.getByPath("/kgcomponents.taglib.xml");
+ assertNotNull("Facelet taglib kgcomponents.taglib.xml not found.", tld);
+ XModelObject g = new TLDToPaletteHelper().createGroupByTLD(tld, model);
+ assertNotNull(g);
+ assertEquals("Library uri is not set correctly to the palette group.",
"http://www.krasig.org/paduan", g.getAttributeValue("library uri"));
+ XModelObject m = g.getChildByPath("myModal");
+ assertNotNull("Macros myModal was not created.", m);
+ assertEquals("Text of macros myModal is not correct.",
"<myModal>", m.getAttributeValue("start text"));
+ assertTrue("Text of description of macro myModal is not correct.",
m.getAttributeValue("description").endsWith("<code></code>"));
+ }
+
public void testPaletteInsertHelper() throws Exception {
IWorkbench w = JsfUiPlugin.getDefault().getWorkbench();
IWorkbenchWindow window = w.getActiveWorkbenchWindow();