Hi,

I managed (with some pain really) to install the tag library inside eclipse,

I followed the tutorial on the "Tapestry5 How Tos" and it works fine for installing the t5.tld entry.

But if I repeat the same procedure to install also the tld generated by your plugin, then eclipse either stops showing the auto completions or show only the last added (the ones belonging to my components).

Then - but this is eclipse - if I remove all the user defined catalogs, refresh, clean and update dependencies for the project, eclipse still shows the old auto completion tags.

The only way I managed to show all the tags (basic t5 and my components) is to manually merge everything inside one single tls file and then load just that one using the http://tapestry.apache.org/schema/tapestry_5_1_0.xsd as Key value for the XML Catalog Wizard of eclipse.


I think that a nice improvement to you plugin is to either merge all the tlds together (basic plus all the related components library projects and dependencies), or to programmatically add the tags definition to eclipse (for example by using some kind of eclipse plugin).

-- Alessio


On Sep 22, 2010, at 3:51 PM, Laurent Guerin wrote:

Happy to see that you could generate your TLD.

The generated XML "tldgen-components-info.xml" is a temporary file used to
collect Javadoc informations on components.
We are aware about the m2Eclipse issue, it's already referenced in the FAQ.

Thank you for your feedback. We will check the classes.jar issue.

2010/9/22 Alessio Gambi <agamb...@gmail.com>

Hi,

I am using maven from eclipse (It did not worked) but apparently launching
it from is fine.

This is the printout of the tld file:
<?xml version="1.0" encoding="UTF-8" ?><taglib xmlns="
http://java.sun.com/xml/ns/javaee"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";
version="2.1">
<tlib-version>1.0</tlib-version>
<short-name>t</short-name>

<uri>http://tapestry.apache.org/schema/tapestry_5_0_0.xsd</uri>
<tag>
  <description></description>
  <name>Dialog</name>

<tag-class>se.pmdit.tutorial.t5gwt.tapestry.components.Dialog</tag- class>
  <body-content>JSP</body-content>
  <attribute>
    <description></description>
    <name>entryPoint</name>
    <required>true</required>
    <deferred-value>
      <type>java.lang.String</type>
    </deferred-value>
  </attribute>
  <attribute>
    <description></description>
    <name>componentType</name>
    <required>true</required>
    <deferred-value>
      <type>java.lang.String</type>
    </deferred-value>
  </attribute>
</tag>
<tag>
  <description></description>
  <name>GwtEntryPoint</name>

<tag- class>se.pmdit.tutorial.t5gwt.tapestry.components.GwtEntryPoint</ tag-class>
  <body-content>JSP</body-content>
  <attribute>
    <description></description>
    <name>className</name>
    <required>true</required>
    <deferred-value>
      <type>java.lang.String</type>
    </deferred-value>
  </attribute>
</tag>
<tag>
  <description></description>
  <name>GwtComponent</name>

<tag- class>se.pmdit.tutorial.t5gwt.tapestry.components.GwtComponent</tag- class>
  <body-content>JSP</body-content>
  <attribute>
    <description></description>
    <name>entryPoint</name>
    <required>true</required>
    <deferred-value>
      <type>java.lang.String</type>
    </deferred-value>
  </attribute>
  <attribute>
    <description></description>
    <name>componentType</name>
    <required>true</required>
    <deferred-value>
      <type>java.lang.String</type>
    </deferred-value>
  </attribute>
</tag>
<tag>
  <description></description>
  <name>GwtSupport</name>

<tag-class>se.pmdit.tutorial.t5gwt.tapestry.components.GwtSupport</ tag-class>
  <body-content>JSP</body-content>
</tag>
</taglib>


This is the tldgen-components-info.xml file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<components>
<component
className="se.pmdit.tutorial.t5gwt.tapestry.components.GwtSupport"
superClassName="java.lang.Object">
<description/>
<parameters/>
</component>
<component
className="se.pmdit.tutorial.t5gwt.tapestry.components.GwtEntryPoint"
superClassName="java.lang.Object">
<description/>
<parameters>
<parameter name="className">
<description/>
</parameter>
</parameters>
</component>
<component
className="se.pmdit.tutorial.t5gwt.tapestry.components.GwtComponent"
superClassName="java.lang.Object">
<description/>
<parameters>
<parameter name="componentType">
<description/>
</parameter>
<parameter name="entryPoint">
<description/>
</parameter>
</parameters>
</component>
<component className="se.pmdit.tutorial.t5gwt.tapestry.components.Dialog" superClassName ="se.pmdit.tutorial.t5gwt.tapestry.components.GwtComponent">
<description/>
<parameters/>
</component>
</components>


Hi Alessio,

Thanks for your tests.

which Maven version did you use ?


mvn -version
Apache Maven 2.2.0 (r788681; 2009-06-26 15:04:01+0200)

Java version: 1.6.0_20
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/ 1.6.0/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.5.8" arch: "x86_64" Family: "mac"


Additionally,
I noticed also a strange behavior using m2eclipse:

I downloaded the source code for the plugin that you provide
Modified the pom.xml to remove the dependency on tools.jar
The build fails because of a failing test:


------------------------------------------------------------------------------
Test set: fr.exanpe.tapestry.tldgen.taglib.builder.StructureBuilderTest

-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.065 sec
<<< FAILURE!
testHeritage (fr.exanpe.tapestry.tldgen.taglib.builder.StructureBuilderTest)
Time elapsed: 0.048 sec  <<< FAILURE!
junit.framework.AssertionFailedError: expected:<3> but was:<0>
      at junit.framework.Assert.fail(Assert.java:47)
      at junit.framework.Assert.failNotEquals(Assert.java:282)
      at junit.framework.Assert.assertEquals(Assert.java:64)
      at junit.framework.Assert.assertEquals(Assert.java:201)
      at junit.framework.Assert.assertEquals(Assert.java:207)
      at
fr .exanpe .tapestry .tldgen .taglib .builder .StructureBuilderTest.testHeritage(StructureBuilderTest.java:49)

It seems that attributes of class SubSubComponent are not present.

However, THE SAME TEST CLASS passes THE SAME TEST when launched using
JUnit.

I think one of the problem could be the fact that classes.jar (that is a
super set, i.e. contains more classes, of tools.jar) has
"AccessRestrictions" ... unfortunately, I do not know how to deal with this.

Reply via email to