JBoss Tools SVN: r5520 - trunk/hibernatetools/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-01-04 12:45:51 -0500 (Fri, 04 Jan 2008)
New Revision: 5520
Modified:
trunk/hibernatetools/docs/reference/en/modules/ant.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-236 - adding a link
Modified: trunk/hibernatetools/docs/reference/en/modules/ant.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/ant.xml 2008-01-04 17:44:58 UTC (rev 5519)
+++ trunk/hibernatetools/docs/reference/en/modules/ant.xml 2008-01-04 17:45:51 UTC (rev 5520)
@@ -12,11 +12,10 @@
from tools.hibernate.org The <emphasis>
<property>hibernate-tools.jar</property>
</emphasis> is located in your eclipse plugins directory at <emphasis>
- <property>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/hibernate-tools.jar
- </property>
- </emphasis></para>
- <para>. This jar is 100% independent from the eclipse platform and can thus be used
- independently of eclipse.</para>
+ <property>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/hibernate-tools.jar </property>
+ </emphasis>.</para>
+ <para>This jar is 100% independent from the eclipse platform and can thus be used independently
+ of eclipse.</para>
<note>
<para>There might be incapabilities with respect to the Hibernate3.jar bundled with the tools
@@ -28,13 +27,14 @@
</section>
<section>
- <title>The <literal><hibernatetool></literal> ant Task</title>
+ <title>The <hibernatetool> Ant Task</title>
- <para>To use the ant tasks you need to have the hibernatetool task defined. That is done in your <emphasis>
+ <para>To use the ant tasks you need to have the <emphasis>
+ <property>hibernatetool</property>
+ </emphasis> task defined. That is done in your <emphasis>
<property>build.xml</property>
</emphasis> by inserting the following xml (assuming the jars are in the
- <literal>lib</literal> directory):
- <programlisting><![CDATA[<path id="toolslib">
+ <literal>lib</literal> directory): <programlisting><![CDATA[<path id="toolslib">
<path location="lib/hibernate-tools.jar" />
<path location="lib/hibernate3.jar" />
<path location="lib/freemarker.jar" />
@@ -51,9 +51,7 @@
<literal><taskdef></literal>
</property>
</emphasis> defines an Ant task called <emphasis>
- <property>
- <literal><hibernatetool></literal>
- </property>
+ <property> hibernatetool </property>
</emphasis> which now can be used anywhere in your ant <emphasis>
<property>build.xml</property>
</emphasis> files. It is important to include all the <property>Hibernate Tools</property>
@@ -65,9 +63,7 @@
<para/>
<para>When using the <emphasis>
- <property>
- <literal><hibernatetool> </literal>
- </property>
+ <property> hibernatetool </property>
</emphasis> task you have to specify one or more of the following:</para>
<para>
@@ -140,9 +136,9 @@
<property>
<literal>hibernate.cfg.xml</literal>
</property>
- </emphasis>. The output will be put in the <emphasis>
- <property>${build.dir}/generated</property></emphasis>
- directory.</para>
+ </emphasis>. The output will be put in the <emphasis>
+ <property>${build.dir}/generated</property>
+ </emphasis> directory.</para>
<para>
<programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
@@ -157,8 +153,8 @@
</emphasis> and finally runs a custom code generation via <emphasis>
<property><hbmtemplate></property>
</emphasis>. This is again from a normal <emphasis>
- <property>hibernate.cfg.xml</property></emphasis> and the output
- is still put in the <emphasis>
+ <property>hibernate.cfg.xml</property>
+ </emphasis> and the output is still put in the <emphasis>
<property>
<literal>${build.dir}/generated</literal>
</property>
@@ -201,8 +197,12 @@
<para>Each have in common that they are able to build up a Hibernate
<literal>Configuration</literal> object from which a set of exporters can be run to generate
- various output. Note: output can be anything, e.g. specific files, statements execution against
- a database, error reporting or anything else that can be done in java code.</para>
+ various output.
+
+ <note>Output can be anything, e.g. specific files, statements execution
+ against a database, error reporting or anything else that can be done in java code.
+ </note>
+ </para>
<para>The following section describes what the various configuration can do, plus list the
individual settings they have.</para>
@@ -265,8 +265,8 @@
</callout>
<callout arearefs="cfg5">
- <para>A standard Ant fileset. Used to include hibernate mapping files. Remember that if
- mappings are already specified in the hibernate.cfg.xml then it should not be
+ <para>A standard Ant fileset. Used to include hibernate mapping files. Remember that
+ if mappings are already specified in the hibernate.cfg.xml then it should not be
included via the fileset as it will result in duplicate import exceptions.</para>
</callout>
</calloutlist>
@@ -277,15 +277,18 @@
<title>Example</title>
<para>This example shows an example where no <emphasis>
- <property><literal>hibernate.cfg.xml</literal></property></emphasis> exists,
- and a <emphasis>
- <property><literal>hibernate.properties</literal></property></emphasis> + fileset is used instead.
- </para>
+ <property>
+ <literal>hibernate.cfg.xml</literal>
+ </property>
+ </emphasis> exists, and a <emphasis>
+ <property>
+ <literal>hibernate.properties</literal>
+ </property>
+ </emphasis> + fileset is used instead. </para>
<note>
- <para>
- Hibernate will still read any global <literal>/hibernate.properties</literal> available in
- the classpath, but the specified properties file here will override those values for any
- non-global property.</para>
+ <para> Hibernate will still read any global <literal>/hibernate.properties</literal>
+ available in the classpath, but the specified properties file here will override those
+ values for any non-global property.</para>
</note>
<para>
@@ -308,18 +311,20 @@
<title>Annotation based Configuration (<annotationconfiguration>)</title>
<para>An <emphasis>
- <property><annotationconfiguration></property></emphasis> is used when you want to
- read the metamodel from EJB3/Hibernate Annotations based POJO's. To use it remember to put
- the jars file needed for using hibernate annotations in the classpath of the
- <emphasis>
- <property><taskdef></property></emphasis>.</para>
+ <property><annotationconfiguration></property>
+ </emphasis> is used when you want to read the metamodel from EJB3/Hibernate Annotations
+ based POJO's. To use it remember to put the jars file needed for using hibernate annotations
+ in the classpath of the <emphasis>
+ <property><taskdef></property>
+ </emphasis>.</para>
<para>The <emphasis>
- <property><annotationconfiguration></property></emphasis> supports the same attributes as a
- <emphasis>
- <property><configuration></property></emphasis> except that the configurationfile attribute is now required as
- that is from where an <literal>AnnotationConfiguration</literal> gets the list of
- classes/packages it should load.</para>
+ <property><annotationconfiguration></property>
+ </emphasis> supports the same attributes as a <emphasis>
+ <property><configuration></property>
+ </emphasis> except that the configurationfile attribute is now required as that is from
+ where an <literal>AnnotationConfiguration</literal> gets the list of classes/packages it
+ should load.</para>
<para>Thus the minimal usage is:</para>
@@ -339,29 +344,31 @@
<title>JPA based configuration (<jpaconfiguration>)</title>
<para>A <emphasis>
- <property><jpaconfiguration></property></emphasis> is used when you want to read the metamodel from
- JPA/Hibernate Annotation where you want to use the auto-scan configuration as defined in the
- JPA spec (part of EJB3). In other words, when you do not have a
- <emphasis>
- <property>hibernate.cfg.xml</property></emphasis>, but instead have a setup where you use a
- <emphasis>
- <property>persistence.xml</property></emphasis> packaged in a JPA compliant manner.</para>
+ <property><jpaconfiguration></property>
+ </emphasis> is used when you want to read the metamodel from JPA/Hibernate Annotation where
+ you want to use the auto-scan configuration as defined in the JPA spec (part of EJB3). In
+ other words, when you do not have a <emphasis>
+ <property>hibernate.cfg.xml</property>
+ </emphasis>, but instead have a setup where you use a <emphasis>
+ <property>persistence.xml</property>
+ </emphasis> packaged in a JPA compliant manner.</para>
<para><literal><jpaconfiguration></literal> will simply just try and
- auto-configure it self based on the available classpath, e.g. look for
- <emphasis>
- <property>META-INF/persistence.xml</property></emphasis>.</para>
+ auto-configure it self based on the available classpath, e.g. look for <emphasis>
+ <property>META-INF/persistence.xml</property>
+ </emphasis>.</para>
<para>The <literal>persistenceunit</literal> attribute can be used to select a specific
persistence unit. If no persistenceunit is specified it will automatically search for one
- and if an unique one is found use it, but if multiple persistence units are available it will
- error.</para>
+ and if an unique one is found use it, but if multiple persistence units are available it
+ will error.</para>
<para>To use a <emphasis>
- <property><jpaconfiguration></property></emphasis> you will need to specify some additional jars
- from Hibernate EntityManager in the <emphasis>
- <property><taskdef></property></emphasis> of the hibernatetool. The
- following shows a full setup:</para>
+ <property><jpaconfiguration></property>
+ </emphasis> you will need to specify some additional jars from Hibernate EntityManager in
+ the <emphasis>
+ <property><taskdef></property>
+ </emphasis> of the hibernatetool. The following shows a full setup:</para>
<programlisting><![CDATA[<path id="ejb3toolslib">
<path refid="jpatoolslib"/> <!-- ref to previously defined toolslib -->
@@ -389,27 +396,35 @@
</hibernatetool>
]]></programlisting>
-
- <note><para><literal>ejb3configuration</literal> were the name used in previous versions. It
- still works but will emit a warning telling you to use <literal>jpaconfiguration</literal>
- instead.</para>
- </note>
+ <note>
+ <para><literal>ejb3configuration</literal> were the name used in previous versions. It still
+ works but will emit a warning telling you to use <literal>jpaconfiguration</literal>
+ instead.</para>
+ </note>
+
</section>
<section>
<title>JDBC Configuration for reverse engineering (<jdbcconfiguration>)</title>
<para>A <emphasis>
- <property><literal><jdbcconfiguration></literal></property></emphasis> is used to perform reverse
- engineering of the database from a JDBC connection.</para>
+ <property>
+ <literal><jdbcconfiguration></literal>
+ </property>
+ </emphasis> is used to perform reverse engineering of the database from a JDBC connection.</para>
<para>This configuration works by reading the connection properties from</para>
<para>The <emphasis>
- <property><literal><jdbcconfiguration></literal></property></emphasis> has the same attributes as a
- <emphasis>
- <property><literal><configuration></literal></property></emphasis> plus the following additional attributes:</para>
+ <property>
+ <literal><jdbcconfiguration></literal>
+ </property>
+ </emphasis> has the same attributes as a <emphasis>
+ <property>
+ <literal><configuration></literal>
+ </property>
+ </emphasis> plus the following additional attributes:</para>
<para>
<programlistingco>
@@ -474,12 +489,17 @@
<title>Example</title>
<para>Here is an example of using <emphasis>
- <property><literal><jdbcconfiguration></literal></property></emphasis> to
- generate Hibernate xml mappings via <literal><hbm2hbmxml></literal>. The
- connection settings is here read from a <emphasis>
- <property><literal>hibernate.properties</literal></property></emphasis> file but
- could just as well have been read from a <emphasis>
- <property>hibernate.cfg.xml</property></emphasis>.</para>
+ <property>
+ <literal><jdbcconfiguration></literal>
+ </property>
+ </emphasis> to generate Hibernate xml mappings via
+ <literal><hbm2hbmxml></literal>. The connection settings is here read from a <emphasis>
+ <property>
+ <literal>hibernate.properties</literal>
+ </property>
+ </emphasis> file but could just as well have been read from a <emphasis>
+ <property>hibernate.cfg.xml</property>
+ </emphasis>.</para>
<programlisting><![CDATA[<hibernatetool>
<jdbcconfiguration propertyfile="etc/hibernate.properties" />
@@ -493,20 +513,24 @@
<section>
<title>Exporters</title>
- <para>Exporters are the parts that does the actual job of converting the hibernate metamodel into
- various artifacts, mainly code. The following section describes the current supported set of
- exporters in the <property>Hibernate Tool</property> distribution. It is also possible for userdefined exporters,
- that is done through the <emphasis>
- <property><literal><hbmtemplate></literal></property></emphasis> exporter.</para>
+ <para>Exporters are the parts that does the actual job of converting the hibernate metamodel
+ into various artifacts, mainly code. The following section describes the current supported set
+ of exporters in the <property>Hibernate Tool</property> distribution. It is also possible for
+ userdefined exporters, that is done through the <emphasis>
+ <property>
+ <literal><hbmtemplate></literal>
+ </property>
+ </emphasis> exporter.</para>
<section>
<title>Database schema exporter (<hbm2ddl>)</title>
<para><emphasis>
- <property><hbm2ddl></property></emphasis> lets you run schemaexport and schemaupdate which generates the
- appropriate SQL DDL and allow you to store the result in a file or export it directly to the
- database. Remember that if a custom naming strategy is needed it is placed on the
- configuration element.</para>
+ <property><hbm2ddl></property>
+ </emphasis> lets you run schemaexport and schemaupdate which generates the appropriate SQL
+ DDL and allow you to store the result in a file or export it directly to the database.
+ Remember that if a custom naming strategy is needed it is placed on the configuration
+ element.</para>
<para>
<programlistingco>
@@ -545,11 +569,12 @@
</callout>
<callout arearefs="ycfg2">
- <para>update(default: false): Try and create an update script representing the "delta"
- between what is in the database and what the mappings specify. Ignores create/update
- attributes. (<emphasis>Do *not* use against production databases, no guarantees at
- all that the proper delta can be generated nor that the underlying database can
- actually execute the needed operations</emphasis>)</para>
+ <para>update(default: false): Try and create an update script representing the
+ "delta" between what is in the database and what the mappings
+ specify. Ignores create/update attributes. (<emphasis>Do *not* use against
+ production databases, no guarantees at all that the proper delta can be generated
+ nor that the underlying database can actually execute the needed
+ operations</emphasis>)</para>
</callout>
<callout arearefs="ycfg3">
@@ -587,9 +612,11 @@
<title>Example</title>
<para>Basic example of using <emphasis>
- <property><hbm2ddl></property></emphasis>, which does not export to the database
- but simply dumps the sql to a file named <emphasis>
- <property>sql.ddl</property></emphasis>.</para>
+ <property><hbm2ddl></property>
+ </emphasis>, which does not export to the database but simply dumps the sql to a file
+ named <emphasis>
+ <property>sql.ddl</property>
+ </emphasis>.</para>
<programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<configuration configurationfile="hibernate.cfg.xml"/>
@@ -602,8 +629,9 @@
<title>POJO java code exporter (<literal><hbm2java></literal>)</title>
<para><emphasis>
- <property><hbm2java></property></emphasis> is a java codegenerator. Options for controlling whether JDK 5
- syntax can be used and whether the POJO should be annotated with EJB3/Hibernate Annotations.</para>
+ <property><hbm2java></property>
+ </emphasis> is a java codegenerator. Options for controlling whether JDK 5 syntax can be
+ used and whether the POJO should be annotated with EJB3/Hibernate Annotations.</para>
<para>
<programlistingco>
@@ -636,8 +664,8 @@
<title>Example</title>
<para>Basic example of using <emphasis>
- <property><hbm2java></property></emphasis> to generate POJO's that utilize jdk5
- constructs.</para>
+ <property><hbm2java></property>
+ </emphasis> to generate POJO's that utilize jdk5 constructs.</para>
<programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<configuration configurationfile="hibernate.cfg.xml"/>
@@ -650,12 +678,13 @@
<title>Hibernate Mapping files exporter (<literal><hbm2hbmxml></literal>)</title>
<para><emphasis>
- <property><hbm2hbmxml></property></emphasis> generates a set of .hbm files. Intended to be used together
- with a <emphasis>
- <property><jdbcconfiguration></property></emphasis> when performing reverse engineering, but can be
- used with any kind of configuration. e.g. to convert from annotation based pojo's to
- <emphasis>
- <property>hbm.xml</property></emphasis>. Note that not every possible mapping transformation is possible/implemented
+ <property><hbm2hbmxml></property>
+ </emphasis> generates a set of .hbm files. Intended to be used together with a <emphasis>
+ <property><jdbcconfiguration></property>
+ </emphasis> when performing reverse engineering, but can be used with any kind of
+ configuration. e.g. to convert from annotation based pojo's to <emphasis>
+ <property>hbm.xml</property>
+ </emphasis>. Note that not every possible mapping transformation is possible/implemented
(contributions welcome) so some hand editing might be necessary.</para>
<programlisting><![CDATA[<hbm2hbmxml/>]]></programlisting>
@@ -663,8 +692,9 @@
<section>
<title>Example</title>
- <para>Basic usage of <emphasis>
- <property><hbm2hbmxml></property></emphasis>.</para>
+ <para>Basic usage of <emphasis>
+ <property><hbm2hbmxml></property>
+ </emphasis>.</para>
<programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<configuration configurationfile="hibernate.cfg.xml"/>
@@ -672,19 +702,20 @@
</hibernatetool>]]></programlisting>
<para><emphasis>
- <property><hbm2hbmxml></property>
- </emphasis> is normally used with a <emphasis>
- <property><jdbcconfiguration></property>
- </emphasis>
- like in the above example, but any other configuration can also be used to convert between
- the different ways of performing mappings. Here is an example of that, using an
- <emphasis>
- <property><annotationconfiguration></property></emphasis>.</para>
-
- <note><para>Not all conversions is implemented
- (contributions welcome), so some hand editing might be necessary.</para>
- </note>
+ <property><hbm2hbmxml></property>
+ </emphasis> is normally used with a <emphasis>
+ <property><jdbcconfiguration></property>
+ </emphasis> like in the above example, but any other configuration can also be used to
+ convert between the different ways of performing mappings. Here is an example of that,
+ using an <emphasis>
+ <property><annotationconfiguration></property>
+ </emphasis>.</para>
+ <note>
+ <para>Not all conversions is implemented (contributions welcome), so some hand editing
+ might be necessary.</para>
+ </note>
+
<para>
<programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<annotationconfiguration configurationfile="hibernate.cfg.xml"/>
@@ -698,13 +729,15 @@
<title>Hibernate Configuration file exporter (<literal><hbm2cfgxml></literal>)</title>
<para><emphasis>
- <property><hbm2cfgxml></property></emphasis> generates a <emphasis>
- <property>hibernate.cfg.xml</property></emphasis>. Intended to be used together
- with a <emphasis>
- <property><jdbcconfiguration></property></emphasis> when performing reverse engineering, but can be
- used with any kind of configuration. The <emphasis>
- <property><hbm2cfgxml></property></emphasis> will contain the
- properties used and adds mapping entries for each mapped class.</para>
+ <property><hbm2cfgxml></property>
+ </emphasis> generates a <emphasis>
+ <property>hibernate.cfg.xml</property>
+ </emphasis>. Intended to be used together with a <emphasis>
+ <property><jdbcconfiguration></property>
+ </emphasis> when performing reverse engineering, but can be used with any kind of
+ configuration. The <emphasis>
+ <property><hbm2cfgxml></property>
+ </emphasis> will contain the properties used and adds mapping entries for each mapped class.</para>
<para>
<programlistingco>
@@ -732,8 +765,8 @@
<title>Documentation exporter (<literal><hbm2doc></literal>)</title>
<para><emphasis>
- <property><hbm2doc></property></emphasis> generates html documentation a'la javadoc for the database
- schema et.al.</para>
+ <property><hbm2doc></property>
+ </emphasis> generates html documentation a'la javadoc for the database schema et.al.</para>
<programlisting><![CDATA[<hbm2doc/>]]></programlisting>
</section>
@@ -742,8 +775,9 @@
<title>Query exporter (<query>)</title>
<para><emphasis>
- <property><query></property></emphasis> is used to execute a HQL query statements and optionally send the
- output to a file. Can be used for verifying the mappings and for basic data extraction.</para>
+ <property><query></property>
+ </emphasis> is used to execute a HQL query statements and optionally send the output to a
+ file. Can be used for verifying the mappings and for basic data extraction.</para>
<programlisting><![CDATA[<query
destfile="filename">
@@ -761,8 +795,9 @@
<title>Examples</title>
<para>Simplest usage of <emphasis>
- <property><query></property></emphasis> will just execute the query without dumping to
- a file. This can be used to verify that queries can actually be performed.</para>
+ <property><query></property>
+ </emphasis> will just execute the query without dumping to a file. This can be used to
+ verify that queries can actually be performed.</para>
<programlisting><![CDATA[<hibernatetool>
<configuration configurationfile="hibernate.cfg.xml"/>
@@ -770,14 +805,15 @@
</hibernatetool>]]></programlisting>
<para>Multiple queries can be executed by nested <emphasis>
- <property><hql></property></emphasis> elements. In this
- example we also let the output be dumped to <emphasis>
- <property>queryresult.txt</property></emphasis>. </para>
-
- <note><para>
- Currently the dump is simply a call to toString on each element.</para>
- </note>
+ <property><hql></property>
+ </emphasis> elements. In this example we also let the output be dumped to <emphasis>
+ <property>queryresult.txt</property>
+ </emphasis>. </para>
+ <note>
+ <para> Currently the dump is simply a call to toString on each element.</para>
+ </note>
+
<para>
<programlisting><![CDATA[<hibernatetool>
<configuration configurationfile="hibernate.cfg.xml"/>
@@ -800,18 +836,19 @@
exporterclass="Exporter classname"
/>]]></programlisting>
- <note><para>Previous versions of the tools used Velocity. We are now using Freemarker which
- provides us much better exception and error handling.</para>
- </note>
+ <note>
+ <para>Previous versions of the tools used Velocity. We are now using Freemarker which
+ provides us much better exception and error handling.</para>
+ </note>
<section>
<title>Exporter via <literal><hbmtemplate></literal></title>
- <para>The following is an example of reverse engineering via
- <emphasis>
- <property><jdbcconfiguration></property></emphasis> and use a custom Exporter via the
- <emphasis>
- <property><hbmtemplate></property></emphasis>.</para>
+ <para>The following is an example of reverse engineering via <emphasis>
+ <property><jdbcconfiguration></property>
+ </emphasis> and use a custom Exporter via the <emphasis>
+ <property><hbmtemplate></property>
+ </emphasis>.</para>
<para>
<programlisting><![CDATA[ <hibernatetool destdir="${destdir}">
@@ -837,63 +874,78 @@
<section>
<title>Using properties to configure Exporters</title>
- <para>Exporters can be controlled by user properties. The user properties are specified via
- <emphasis>
- <property><property></property></emphasis> or
- <emphasis>
- <property><literal><propertyset></literal></property></emphasis> and each exporter will have access to them
- directly in the templates and via <literal>Exporter.setProperties()</literal>.</para>
+ <para>Exporters can be controlled by user properties. The user properties are specified via <emphasis>
+ <property><property></property>
+ </emphasis> or <emphasis>
+ <property>
+ <literal><propertyset></literal>
+ </property>
+ </emphasis> and each exporter will have access to them directly in the templates and via
+ <literal>Exporter.setProperties()</literal>.</para>
<section>
<title><literal><property></literal> and
<literal><propertyset></literal></title>
<para>The <emphasis>
- <property><property></property></emphasis> allows you bind a string value to a key. The value will be
- available in the templates via $<key>. The following example will assign the
- string value <emphasis>
- <property>"true"</property></emphasis> to the variable <literal>$descriptors.</literal></para>
+ <property><property></property>
+ </emphasis> allows you bind a string value to a key. The value will be available in the
+ templates via $<key>. The following example will assign the string value <emphasis>
+ <property>"true"</property>
+ </emphasis> to the variable <literal>$descriptors.</literal></para>
<programlisting><![CDATA[<property key="descriptors" value="true"/>]]></programlisting>
<para>Most times using <emphasis>
- <property><literal><property></literal></property></emphasis> is enough for specifying
- the properties needed for the exporters. Still the ant tools supports the notion of
- <emphasis>
- <property><literal><propertyset></literal></property></emphasis>. The functionality of
- <emphasis>
- <property><literal><propertyset></literal></property></emphasis> is explained in detail in the Ant task
- manual.</para>
+ <property>
+ <literal><property></literal>
+ </property>
+ </emphasis> is enough for specifying the properties needed for the exporters. Still the ant
+ tools supports the notion of <emphasis>
+ <property>
+ <literal><propertyset></literal>
+ </property>
+ </emphasis>. The functionality of <emphasis>
+ <property>
+ <literal><propertyset></literal>
+ </property>
+ </emphasis> is explained in detail in the Ant task manual.</para>
</section>
<section>
<title>Getting access to user specific classes</title>
- <para>If the templates need to access some user class it is possible by specifying a
- <emphasis>
- <property>"toolclass"</property></emphasis> in the properties.</para>
+ <para>If the templates need to access some user class it is possible by specifying a <emphasis>
+ <property>"toolclass"</property>
+ </emphasis> in the properties.</para>
<programlisting><![CDATA[<property key="hibernatetool.sometool.toolclass" value="x.y.z.NameOfToolClass"/>
]]></programlisting>
<para>Placing the above <emphasis>
- <property><literal><property></literal></property></emphasis> tag in
- <emphasis>
- <property><literal><hibernatetool></literal></property></emphasis> or inside any exporter will automatically
- create an instance of <literal>x.y.z.NameOfToolClass</literal> and it will be available in
- the templates as <literal>$sometool</literal>. This is useful to delegate logic and code
- generation to java code instead of placing such logic in the templates.</para>
+ <property>
+ <literal><property></literal>
+ </property>
+ </emphasis> tag in <emphasis>
+ <property>
+ <literal><hibernatetool></literal>
+ </property>
+ </emphasis> or inside any exporter will automatically create an instance of
+ <literal>x.y.z.NameOfToolClass</literal> and it will be available in the templates as
+ <literal>$sometool</literal>. This is useful to delegate logic and code generation to java
+ code instead of placing such logic in the templates.</para>
<section>
<title>Example</title>
<para>Here is an example that uses <emphasis>
- <property><hbmtemplate></property></emphasis> together with
- <emphasis>
- <property><property></property></emphasis> which will be available to the templates/exporter. </para>
- <note><para> This
- example actually simulates what <hbm2java> actually does.</para>
- </note>
+ <property><hbmtemplate></property>
+ </emphasis> together with <emphasis>
+ <property><property></property>
+ </emphasis> which will be available to the templates/exporter. </para>
+ <note>
+ <para> This example actually simulates what <hbm2java> actually does.</para>
+ </note>
<programlisting><![CDATA[<hibernatetool destdir="${build.dir}/generated">
<configuration
17 years
JBoss Tools SVN: r5519 - trunk/hibernatetools/docs/reference/en/images.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-01-04 12:44:58 -0500 (Fri, 04 Jan 2008)
New Revision: 5519
Added:
trunk/hibernatetools/docs/reference/en/images/codegendropdown.png
trunk/hibernatetools/docs/reference/en/images/consoleoutline-before-reven.png
Modified:
trunk/hibernatetools/docs/reference/en/images/hbmxml-namecompletion.png
trunk/hibernatetools/docs/reference/en/images/hbmxml-typecompletion.png
Log:
http://jira.jboss.com/jira/browse/JBDS-185 - correcting screenshots
Added: trunk/hibernatetools/docs/reference/en/images/codegendropdown.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/docs/reference/en/images/codegendropdown.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/docs/reference/en/images/consoleoutline-before-reven.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/docs/reference/en/images/consoleoutline-before-reven.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/hibernatetools/docs/reference/en/images/hbmxml-namecompletion.png
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/docs/reference/en/images/hbmxml-typecompletion.png
===================================================================
(Binary files differ)
17 years
JBoss Tools SVN: r5518 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-04 09:55:12 -0500 (Fri, 04 Jan 2008)
New Revision: 5518
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfJbideTest.java
Log:
removed "system.out.println"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfJbideTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfJbideTest.java 2008-01-04 14:46:47 UTC (rev 5517)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfJbideTest.java 2008-01-04 14:55:12 UTC (rev 5518)
@@ -207,7 +207,6 @@
// find "select" elements
findElementsByName(node, elements, HTML.TAG_SELECT);
- System.out.print("\n1:" + elements.size());
for (nsIDOMNode select : elements) {
// get attributes
@@ -248,8 +247,6 @@
// find "select" elements
findElementsByName(node, elements, HTML.TAG_SELECT);
- System.out.print("\n2:" + elements.size());
-
for (nsIDOMNode select : elements) {
// get attributes
17 years
JBoss Tools SVN: r5517 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE: JBIDE-1467 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-04 09:46:47 -0500 (Fri, 04 Jan 2008)
New Revision: 5517
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/JBIDE-1467/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/JBIDE-1467/JBIDE-1467.jsp
Log:
Copied: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/JBIDE-1467/JBIDE-1467.jsp (from rev 5492, trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/JBIDE-1467.jsp)
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/JBIDE-1467/JBIDE-1467.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/JBIDE-1467/JBIDE-1467.jsp 2008-01-04 14:46:47 UTC (rev 5517)
@@ -0,0 +1,22 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+
+<html>
+<head>
+</head>
+<body>
+
+<f:view>
+
+ <h:selectOneRadio>
+
+ <f:selectItem itemLabel="value1" />
+ <f:selectItem itemLabel="value2" />
+ <f:selectItem itemLabel="value3" />
+ <f:selectItem itemLabel="value4" />
+
+ </h:selectOneRadio>
+
+</f:view>
+</body>
+</html>
\ No newline at end of file
17 years
JBoss Tools SVN: r5516 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE: 1501 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-04 09:44:55 -0500 (Fri, 04 Jan 2008)
New Revision: 5516
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1501/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1501/JBIDE-1501_multiple.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1501/JBIDE-1501_size.jsp
Log:
http://jira.jboss.com/jira/browse/JBIDE-1501
was added junit
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1501/JBIDE-1501_multiple.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1501/JBIDE-1501_multiple.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1501/JBIDE-1501_multiple.jsp 2008-01-04 14:44:55 UTC (rev 5516)
@@ -0,0 +1,27 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+
+<html>
+<head>
+</head>
+<body>
+
+<f:view>
+
+ <h:selectManyMenu value="someValue">
+ <f:selectItem itemLabel="value1" itemValue="value1" />
+ <f:selectItem itemLabel="value2" itemValue="value2" />
+ <f:selectItem itemLabel="value3" itemValue="value3" />
+ <f:selectItem itemLabel="value4" itemValue="value4" />
+ </h:selectManyMenu>
+
+ <h:selectManyListbox value="someValue">
+ <f:selectItem itemLabel="value1" itemValue="value1" />
+ <f:selectItem itemLabel="value2" itemValue="value2" />
+ <f:selectItem itemLabel="value3" itemValue="value3" />
+ <f:selectItem itemLabel="value4" itemValue="value4" />
+ </h:selectManyListbox>
+
+</f:view>
+</body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1501/JBIDE-1501_size.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1501/JBIDE-1501_size.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1501/JBIDE-1501_size.jsp 2008-01-04 14:44:55 UTC (rev 5516)
@@ -0,0 +1,37 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+
+<html>
+<head>
+</head>
+<body>
+
+<f:view>
+
+ <h:selectOneListbox value="someValue">
+ <f:selectItem itemLabel="value1" itemValue="value1" />
+ <f:selectItem itemLabel="value2" itemValue="value2" />
+ </h:selectOneListbox>
+
+ <h:selectManyListbox value="someValue">
+ <f:selectItem itemLabel="value1" itemValue="value1" />
+ <f:selectItem itemLabel="value2" itemValue="value2" />
+ </h:selectManyListbox>
+
+ <h:selectOneListbox value="someValue" size="2">
+ <f:selectItem itemLabel="value1" itemValue="value1" />
+ <f:selectItem itemLabel="value2" itemValue="value2" />
+ <f:selectItem itemLabel="value3" itemValue="value3" />
+ <f:selectItem itemLabel="value4" itemValue="value4" />
+ </h:selectOneListbox>
+
+ <h:selectManyListbox value="someValue" size="2">
+ <f:selectItem itemLabel="value1" itemValue="value1" />
+ <f:selectItem itemLabel="value2" itemValue="value2" />
+ <f:selectItem itemLabel="value3" itemValue="value3" />
+ <f:selectItem itemLabel="value4" itemValue="value4" />
+ </h:selectManyListbox>
+
+</f:view>
+</body>
+</html>
\ No newline at end of file
17 years
JBoss Tools SVN: r5515 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-04 09:44:04 -0500 (Fri, 04 Jan 2008)
New Revision: 5515
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/JBIDE-1467.jsp
Log:
http://jira.jboss.com/jira/browse/JBIDE-1501
was added junit
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/JBIDE-1467.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/JBIDE-1467.jsp 2008-01-04 14:43:36 UTC (rev 5514)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/JBIDE-1467.jsp 2008-01-04 14:44:04 UTC (rev 5515)
@@ -1,22 +0,0 @@
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-
-<html>
-<head>
-</head>
-<body>
-
-<f:view>
-
- <h:selectOneRadio>
-
- <f:selectItem itemLabel="value1" />
- <f:selectItem itemLabel="value2" />
- <f:selectItem itemLabel="value3" />
- <f:selectItem itemLabel="value4" />
-
- </h:selectOneRadio>
-
-</f:view>
-</body>
-</html>
\ No newline at end of file
17 years
JBoss Tools SVN: r5514 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-04 09:43:36 -0500 (Fri, 04 Jan 2008)
New Revision: 5514
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfJbideTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1501
was added junit
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfJbideTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfJbideTest.java 2008-01-04 14:40:22 UTC (rev 5513)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfJbideTest.java 2008-01-04 14:43:36 UTC (rev 5514)
@@ -1,13 +1,14 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
+
package org.jboss.tools.jsf.vpe.jsf.test;
import java.util.ArrayList;
@@ -46,10 +47,9 @@
// type of input tag
private static final String ATTR_TYPE_VALUE = "radio";
- // $NON-NLS-1$
-
// check warning log
private final static boolean checkWarning = false;
+
private Throwable exception;
public JsfJbideTest(String name) {
@@ -65,13 +65,12 @@
*/
protected void setUp() throws Exception {
+
super.setUp();
Platform.addLogListener(this);
- TestJsfUtil.waitForJobs();
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
- .closeAllEditors(true);
+ closeEditors();
}
/**
@@ -82,13 +81,12 @@
* @see TestCase#tearDown()
*/
protected void tearDown() throws Exception {
+
super.tearDown();
+
Platform.removeLogListener(this);
- TestJsfUtil.waitForJobs();
-
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
- .closeAllEditors(true);
+ closeEditors();
}
/*
@@ -98,42 +96,33 @@
/**
* test for http://jira.jboss.com/jira/browse/JBIDE-1467
*
- * REQUIREMENT :test page must have only one <h:selectOneRadio > tag
+ * the cause of bug : <input type=radio > tags ( which vpe template forms
+ * when process "selectOneRadio" jsf tag ) didn't have equal "name"
+ * attribute
*
- * test check that all "radio" elements ( of xulRunner DOMDocument ) have
+ * REQUIREMENT :test page must has only one <h:selectOneRadio > tag
+ *
+ * test checks that all "radio" elements ( of xulRunner DOMDocument ) have
* equal "name" attributes
*/
public void testJBIDE_1467() throws PartInitException, Throwable {
- // path to test page
- String path = "JBIDE/JBIDE-1467.jsp";
+
// wait
TestJsfUtil.waitForJobs();
// set exception
exception = null;
// get test page path
- IFile file = (IFile) TestJsfUtil.getComponentPath(path);
+ IFile file = (IFile) TestJsfUtil
+ .getComponentPath("JBIDE/1467/JBIDE-1467.jsp");
IEditorInput input = new FileEditorInput(file);
- // get editor
- JSPMultiPageEditor part = (JSPMultiPageEditor) PlatformUI
- .getWorkbench().getActiveWorkbenchWindow().getActivePage()
- .openEditor(input, EDITOR_ID, true);
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
- // wait for jobs
- TestJsfUtil.waitForJobs();
- // wait full initialization of vpe
- TestJsfUtil.delay(3000);
-
- VpeEditorPart visualEditor = (VpeEditorPart) part.getVisualEditor();
- VpeController vpeController = visualEditor.getController();
-
- // get xulRunner editor
- XulRunnerEditor xulRunnerEditor = vpeController.getXulRunnerEditor();
-
// get dom document
- nsIDOMDocument document = xulRunnerEditor.getDOMDocument();
+ nsIDOMDocument document = getVpePageSource(part);
nsIDOMElement element = document.getDocumentElement();
if (element != null) {
@@ -149,7 +138,7 @@
// check that "radio" elements have equal names
// (size of list of names == 1 )
- assertEquals(getRadioNames(elements).size(), 1);
+ assertEquals(1, getRadioNames(elements).size());
}
@@ -161,6 +150,131 @@
}
/**
+ * test for http://jira.jboss.com/jira/browse/JBIDE-1467
+ *
+ * the cause of bug :
+ *
+ * 1. <select ... > tag ( which vpe template forms when process
+ * "selectManyMenu" and "selectManyListbox" jsf tags ) didn't have
+ * multiple="multiple" attribute
+ *
+ * 2. <select ... > tag ( which vpe template forms when process
+ * "selectOneListbox" and "selectManyListbox" jsf tags ) sometimes had
+ * incorrect "size" attribute
+ *
+ * DISCRIPTION: test consist of two part
+ *
+ * 1. The first page (JBIDE-1501_multiple.jsp) has "selectManyMenu" and
+ * "selectManyListbox" jsf tags. And test checks that all "select" elements
+ * have "multiple" attribute
+ *
+ * 2. The second page (JBIDE-1501_size.jsp) has "selectOneListbox" and
+ * "selectManyListbox" jsf tags and they was formed so that all "select"
+ * elements must have size="2" attribute . And test checks "size" attribute
+ */
+ public void testJBIDE_1501() throws PartInitException, Throwable {
+
+ // wait
+ TestJsfUtil.waitForJobs();
+ // set exception
+ exception = null;
+
+ // _____1st Part____//
+
+ // get test page path
+ IFile file = (IFile) TestJsfUtil
+ .getComponentPath("JBIDE/1501/JBIDE-1501_multiple.jsp");
+
+ IEditorInput input = new FileEditorInput(file);
+
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ // get dom document
+ nsIDOMDocument document = getVpePageSource(part);
+ assertNotNull(document);
+
+ // get dom element
+ nsIDOMElement element = document.getDocumentElement();
+ assertNotNull(element);
+
+ // get root node
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "select" elements
+ findElementsByName(node, elements, HTML.TAG_SELECT);
+
+ System.out.print("\n1:" + elements.size());
+ for (nsIDOMNode select : elements) {
+
+ // get attributes
+ nsIDOMNamedNodeMap attributes = select.getAttributes();
+
+ // "select" must have attributes
+ assertNotNull(attributes);
+
+ // select must have "multiple" attribute
+ assertNotNull(attributes.getNamedItem(HTML.ATTR_MULTIPLE));
+
+ }
+
+ // _____2nd Part____//
+
+ // get test page path
+ file = (IFile) TestJsfUtil
+ .getComponentPath("JBIDE/1501/JBIDE-1501_size.jsp");
+
+ input = new FileEditorInput(file);
+
+ // open and get editor
+ part = openEditor(input);
+
+ // get dom document
+ document = getVpePageSource(part);
+ assertNotNull(document);
+
+ // get dom element
+ element = document.getDocumentElement();
+ assertNotNull(element);
+
+ // get root node
+ node = (nsIDOMNode) element.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ elements = new ArrayList<nsIDOMNode>();
+
+ // find "select" elements
+ findElementsByName(node, elements, HTML.TAG_SELECT);
+
+ System.out.print("\n2:" + elements.size());
+
+ for (nsIDOMNode select : elements) {
+
+ // get attributes
+ nsIDOMNamedNodeMap attributes = select.getAttributes();
+
+ // "select" must have attributes
+ assertNotNull(attributes);
+
+ // select must have "size" attribute
+ nsIDOMNode size = attributes.getNamedItem(HTML.ATTR_SIZE);
+ assertNotNull(size);
+
+ //
+ assertEquals(2, Integer.parseInt(size.getNodeValue()));
+
+ }
+
+ // check exception
+ if (exception != null) {
+ throw exception;
+ }
+
+ }
+
+ /**
* find elements by name
*
* @param node -
@@ -170,7 +284,7 @@
* @param name -
* name element
*/
- void findElementsByName(nsIDOMNode node, List<nsIDOMNode> elements,
+ private void findElementsByName(nsIDOMNode node, List<nsIDOMNode> elements,
String name) {
// get children
@@ -182,15 +296,22 @@
if (name.equalsIgnoreCase((child.getNodeName()))) {
elements.add(child);
- return;
+
+ } else {
+
+ findElementsByName(child, elements, name);
+
}
- // if current child is not required
- findElementsByName(child, elements, name);
-
}
}
+ /**
+ *
+ * @param elements
+ * list of "input" elements
+ * @return list of names
+ */
private List<String> getRadioNames(List<nsIDOMNode> elements) {
// list of "name" of "radio" elements
@@ -200,12 +321,12 @@
// attributes
nsIDOMNamedNodeMap attributes = element.getAttributes();
- if (null != attributes) {
+ if (attributes != null) {
// get type of element
nsIDOMNode type = attributes.getNamedItem(HTML.ATTR_TYPE);
// if type is "radio"
- if ((null != type)
+ if ((type != null)
&& (ATTR_TYPE_VALUE.equalsIgnoreCase(type
.getNodeValue()))) {
@@ -227,6 +348,65 @@
}
+ /**
+ * close all opened editors
+ */
+ private void closeEditors() {
+
+ // wait
+ TestJsfUtil.waitForJobs();
+
+ // close
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .closeAllEditors(true);
+
+ }
+
+ /**
+ * Open JSPMultiPageEditor editor
+ *
+ * @param input
+ * @return
+ * @throws PartInitException
+ */
+ private JSPMultiPageEditor openEditor(IEditorInput input)
+ throws PartInitException {
+
+ // get editor
+ JSPMultiPageEditor part = (JSPMultiPageEditor) PlatformUI
+ .getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .openEditor(input, EDITOR_ID, true);
+
+ // wait for jobs
+ TestJsfUtil.waitForJobs();
+ // wait full initialization of vpe
+ TestJsfUtil.delay(3000);
+
+ return part;
+
+ }
+
+ /**
+ * get xulrunner source page
+ *
+ * @param part -
+ * JSPMultiPageEditor
+ * @return nsIDOMDocument
+ */
+ private nsIDOMDocument getVpePageSource(JSPMultiPageEditor part) {
+
+ VpeEditorPart visualEditor = (VpeEditorPart) part.getVisualEditor();
+ VpeController vpeController = visualEditor.getController();
+
+ // get xulRunner editor
+ XulRunnerEditor xulRunnerEditor = vpeController.getXulRunnerEditor();
+
+ // get dom document
+ nsIDOMDocument document = xulRunnerEditor.getDOMDocument();
+
+ return document;
+ }
+
public void logging(IStatus status, String plugin) {
switch (status.getSeverity()) {
case IStatus.ERROR:
17 years
JBoss Tools SVN: r5513 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-04 09:40:22 -0500 (Fri, 04 Jan 2008)
New Revision: 5513
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/TestJsfUtil.java
Log:
update comments
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/TestJsfUtil.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/TestJsfUtil.java 2008-01-04 14:39:17 UTC (rev 5512)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/TestJsfUtil.java 2008-01-04 14:40:22 UTC (rev 5513)
@@ -1,13 +1,14 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
+
package org.jboss.tools.jsf.vpe.jsf.test;
import java.io.File;
17 years
JBoss Tools SVN: r5512 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-04 09:39:17 -0500 (Fri, 04 Jan 2008)
New Revision: 5512
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfTestPlugin.java
Log:
update comments
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfTestPlugin.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfTestPlugin.java 2008-01-04 14:38:36 UTC (rev 5511)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfTestPlugin.java 2008-01-04 14:39:17 UTC (rev 5512)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.jsf.vpe.jsf.test;
import java.net.URL;
@@ -54,11 +65,11 @@
public static JsfTestPlugin getDefault() {
return plugin;
}
-
- public static IPluginLog getPluginLog() {
- return getDefault();
- }
+ public static IPluginLog getPluginLog() {
+ return getDefault();
+ }
+
public static String getPluginResourcePath() {
Bundle bundle = Platform.getBundle(PLUGIN_ID);
URL url = null;
17 years
JBoss Tools SVN: r5511 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-04 09:38:36 -0500 (Fri, 04 Jan 2008)
New Revision: 5511
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfComponentTest.java
Log:
update comments
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfComponentTest.java 2008-01-04 14:38:02 UTC (rev 5510)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfComponentTest.java 2008-01-04 14:38:36 UTC (rev 5511)
@@ -1,12 +1,12 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.test;
17 years