JBoss Tools SVN: r22094 - branches/modular_build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-15 00:06:57 -0400 (Sat, 15 May 2010)
New Revision: 22094
Modified:
branches/modular_build/genpom.xml
Log:
tweak output (ported from teiid designer version)
Modified: branches/modular_build/genpom.xml
===================================================================
--- branches/modular_build/genpom.xml 2010-05-14 20:02:20 UTC (rev 22093)
+++ branches/modular_build/genpom.xml 2010-05-15 04:06:57 UTC (rev 22094)
@@ -492,7 +492,7 @@
">
<sequential>
<var name="COMPONENT" value="@{COMPONENT}" />
- <echo level="info">COMPONENT = ${COMPONENT}</echo>
+ <echo level="info">COMPONENT = '${COMPONENT}'</echo>
<if>
<not>
<available file="${WORKINGDIR}/${pathToParentPomInput}parent-pom.xml" type="file" />
@@ -511,7 +511,7 @@
<var name="pathToParentPom" value="../" />
</then>
</if>
- <echo level="verbose">COMPONENT = ${COMPONENT}, pathToParentPom = ${pathToParentPom}</echo>
+ <echo level="verbose">COMPONENT = '${COMPONENT}', pathToParentPom = ${pathToParentPom}</echo>
<!-- if set, compare values in tags file to values found in manifests and report discrepancies -->
<!--<property name="tagsFile"
@@ -561,7 +561,7 @@
</not>
<then>
<length property="show.pom.exists.warning.count" string="${show.pom.exists.warning}" />
- <echo level="warning">${show.pom.exists.warning.count} ${COMPONENT} pom.xml file(s) already exist. To overwrite, use -Doverwrite.existing.pom.xml=true</echo>
+ <echo level="warning">${show.pom.exists.warning.count} '${COMPONENT}' pom.xml file(s) already exist. To overwrite, use -Doverwrite.existing.pom.xml=true</echo>
</then>
</if>
<var name="show.pom.exists.warning.count" unset="true" />
15 years, 11 months
JBoss Tools SVN: r22093 - trunk/jmx/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2010-05-14 16:02:20 -0400 (Fri, 14 May 2010)
New Revision: 22093
Modified:
trunk/jmx/docs/reference/en-US/tasks.xml
Log:
https://jira.jboss.org/jira/browse/TOOLSDOC-49
Managing Equinox chapter is updated and corrected
Modified: trunk/jmx/docs/reference/en-US/tasks.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/tasks.xml 2010-05-14 20:01:00 UTC (rev 22092)
+++ trunk/jmx/docs/reference/en-US/tasks.xml 2010-05-14 20:02:20 UTC (rev 22093)
@@ -1,382 +1,391 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<chapter id="tasks" xreflabel="tasks">
- <?dbhtml filename="tasks.html"?>
- <title>JMX Tools Tasks</title>
- <para>This chapter will give you answers on most popular questions asked by <property>JMX
- plugin</property> users.</para>
- <section>
- <title>Quick Start</title>
-
- <para>To start using the <property>JMX Tools</property> it's necessary to open
- <property>MBean Explorer</property>. Go to <emphasis><property>Window > Show View > Other</property></emphasis> and then select
- <property>MBean Explorer</property> and click <emphasis><property>OK</property>.</emphasis></para>
-
- <para>The <property>MBean Explorer</property> lists all the domains, mbeans, attributes, and operations inside a
- connection. When you double-click a MBean in the <emphasis><property>MBean Explorer</property>,</emphasis> it opens a multi-page
- editor to manage the MBean. The <property>MBean Editor</property> is composed of these pages:</para>
-
- <itemizedlist>
- <listitem>
- <para><emphasis><property>Attributes page</property>,</emphasis> to get/set the attributes of the MBean</para>
- </listitem>
- <listitem>
- <para><emphasis><property>Operations page</property>,</emphasis> to invoke operations on the MBean</para>
- </listitem>
- <listitem>
- <para><emphasis><property>Notifications page</property>,</emphasis> to receive notifications from the MBean</para>
- </listitem>
- <listitem>
- <para><emphasis><property>Info page</property>,</emphasis> which displays general information about the MBean </para>
- </listitem>
- </itemizedlist>
-
- </section>
-
- <section>
- <title>Managing Application</title>
-
-
-<para>Like it's said earlier in the guide the JMX technology allows to monitor and manage Java applications. In this section we will show you how to get connected to
-a sample Java application and run the <property>sayHello()</property> method remotely from inside of the <property>MBean Explorer</property>.</para>
-<orderedlist>
-<listitem><para>Unzip the bundle of sample classes.</para></listitem>
-<listitem><para>Compile the example Java classes from within where you unpacked the files directory.</para>
-
- <programlisting role="XML"><![CDATA[
- javac com/example/*.java
- ]]></programlisting>
-
-</listitem>
-<listitem><para>Start the <property>Main</property> application, specifying the properties that expose Main for remote management:</para>
-
- <programlisting role="XML"><![CDATA[
-java -Dcom.sun.management.jmxremote.port=9999 \
--Dcom.sun.management.jmxremote.authenticate=false \
--Dcom.sun.management.jmxremote.ssl=false \
-com.example.Main
- ]]></programlisting>
-
-<para>If everything was done correctly you will see the "Waiting for incoming requests..." message on the screen.</para>
-
-
- </listitem>
- <listitem><para>Now launch the Eclipse IDE, in Eclipse open the <property>MBean Explorer</property>. Go to <emphasis><property>Window > Show View > Other</property></emphasis> and then select
- <property>MBean Explorer</property> and click <emphasis><property>OK</property></emphasis>)</para></listitem>
- <listitem>
- <para>Click the <emphasis>
- <property>New Connection</property></emphasis> icon
-
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/new_connection_icon.png"/>
- </imageobject>
- </inlinemediaobject>
-
- in the <property>MBean Explorer</property> menu
- bar.</para>
- </listitem>
-
- <listitem><para>In the <property>Create JMX Connection</property> dialog, hit <property>Next</property> and then click the <property>Advanced</property> tab. </para></listitem>
-
-
- <listitem><para>In the <property>JMX URL</property> input field enter the following URL:</para>
-
- <programlisting role="XML"><![CDATA[
- service:jmx:rmi:///jndi/rmi://:9999/jmxrmi
- ]]></programlisting>
-
- </listitem>
-
- <listitem><para>Press <property>Finish</property> to esteblish the connection with the application.</para>
- </listitem>
-
- <listitem><para>Now expand the connection you have just created, then open the <property>com.example</property> package and click <property>sayHello()</property> method. </para>
- <para>Once the <property>sayHello()</property> method is clicked the <property>MBean Editor</property> is activated. </para>
-
- </listitem>
-
- <listitem><para>In the <property>MBean Editor</property> go to the <property>Operation Details</property> section and hit the <property>sayHello()</property> button.</para><para> You will get the "Operation inoked successfully" message. </para>
- </listitem>
-
- <listitem><para>The final step is to make sure the application worked as it was expected. Open the terminal where you launched the application in step 3. Now you see the "hello, world" message on the screen. </para>
- </listitem>
-</orderedlist>
-
-
-
- </section>
- <section>
- <title>Tomcat Managing</title>
-
- <para>It's possible to manage Tomcat using <property>JMX Tools</property>.</para>
-
- <para>Currently, JMX Tooling is able to connect to Tomcat without authentication or with
- password-based authentication.</para>
- <para>Using SSL for authentication is not supported: you need to make sure that the System
- property <emphasis>
- <property>com.sun.management.jmxremote.ssl</property>
- </emphasis> is set to false. </para>
- <para>More information to manage Tomcat can be found in <ulink url="http://tomcat.apache.org/tomcat-6.0-doc/">Tomcat management documentation</ulink>.</para>
- <para>Instructions to manage remotely Tomcat are available in <ulink url="http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html">Tomcat's monitoring documentation</ulink>.</para>
-
-
- </section>
-
- <section>
- <title>Eclipse Equinox Managing</title>
-
- <para>You can manage Equinox through the Equinox monitoring framework.</para>
- <para>Once you have installed the Equinox monitoring framework and restarted Eclipse:</para>
-
- <orderedlist>
- <listitem>
- <para>Go to <emphasis>
- <property>Window > Open Perspective > Other</property>
- </emphasis> and select the <property>JMX perspective</property></para>
- </listitem>
-
- <!--<listitem>
- <para>Select <emphasis>
- <property>JMX Server > Open Connection</property>
- </emphasis> and click <emphasis>
- <property>OK</property>
- </emphasis></para>
- </listitem>-->
-
- <listitem>
- <para>Switch to the <property>MBean Explorer</property> by going to <emphasis>
- <property>Window > Show View > Other</property>
- </emphasis> and selecting the MBean Explorer</para>
- </listitem>
-
- <listitem>
- <para>Click the <emphasis>
- <property>New Connection</property></emphasis> icon
-
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/new_connection_icon.png"/>
- </imageobject>
- </inlinemediaobject>
-
- in the <property>MBean Explorer</property> menu
- bar.</para>
- </listitem>
-
- <listitem>
- <para>Select the <emphasis>
- <property>Advanced tab</property></emphasis> and set the JMX URL to <emphasis>
- <property>service:jmx:rmi:///jndi/rmi://:8118/jmxserver</property>
- </emphasis></para>
- </listitem>
- </orderedlist>
-
- <para>You now have access to the MBeans exposed by Equinox.</para>
- </section>
-
-
-
-
-
- <section>
- <title>Managing JBoss AS</title>
-
- <para>Managing JBoss instances is not supported with the <property>JMX Tools</property>
- alone. You must also download and install the <property>AS Tools</property> portion of
- the <property>JBoss Tools</property> distribution. Even after installing the proper
- tooling, you cannot create a JBoss JMX connection yourself or through the Connection
- Wizard. The first step is to create a JBoss Server. The full instructions for this can
- be found in the AS Tools section, however, the short summary is: </para>
- <orderedlist>
- <listitem>
- <para>Open the <property>Servers</property> view</para>
- </listitem>
-
- <listitem>
- <para>Right-click in the view and select <emphasis>
- <property>New > Server</property>
- </emphasis></para>
- </listitem>
-
- <listitem>
- <para>In the <emphasis>
- <property>JBoss Enterprise Middleware</property>
- </emphasis> or in <emphasis>
- <property>JBoss Community</property>
- </emphasis> section, select a server version</para>
- </listitem>
-
- <listitem>
- <para>If a runtime has not yet been created, you'll be prompted for the
- server's home directory, JDK, and configuration</para>
- </listitem>
-
- <listitem>
- <para>Finish the wizard and note that you have a new entry in both the
- <property>Servers</property> view and the <property>MBean
- Explorer</property></para>
- </listitem>
-
- <listitem>
- <para>Start the server by right-clicking it and selecting <emphasis>
- <property>Start</property></emphasis></para>
- </listitem>
- <listitem>
- <para>Note that once the server is started, the JMX connection can be
- expanded</para>
- </listitem>
- </orderedlist>
-
- <para>Now you can explore MBeans exposed by a JBoss instance.</para>
- </section>
-
- <section>
- <title>Managing JBoss AS Remotely</title>
-
- <para>JBoss JMX Tool allow you to easily get access and mangane JBoss AS server remotely.
- In order to get connected to the instance of JBoss AS remotely you need to run the server or make sure the server is lauched.
- </para>
- <orderedlist>
- <listitem>
- <para>Go to <emphasis>
- <property>Window > Open Perspective > Other</property>
- </emphasis> and select the <property>JMX perspective.</property></para>
- </listitem>
- <listitem>
- <para>Switch to the <property>MBean Explorer</property> by going to <emphasis>
- <property>Window > Show View > Other</property>
- </emphasis> and selecting the MBean Explorer.</para>
- </listitem>
-
- <listitem>
- <para>Click the <emphasis>
- <property>New Connection</property></emphasis> icon
-
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/new_connection_icon.png"/>
- </imageobject>
- </inlinemediaobject>
-
- in the <property>MBean Explorer</property> menu
- bar.</para>
- </listitem>
-
- <listitem>
- <para>Select the <emphasis>
- <property>Advanced tab</property></emphasis> and set the JMX URL to: </para>
- <programlisting role="XML"><![CDATA[
-service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector
- ]]></programlisting>
-
- <para>Please, note that in this example we connected to the local host. </para>
- </listitem>
- </orderedlist>
- </section>
- <section id="extensions" xreflabel="extensions">
- <title>Extension Task</title>
- <para>This section will outline how to contribute your own Server type with some default
- behavior.</para>
-
- <section>
- <title>Why we should do that?</title>
-
- <para>You might be asking yourself why you'd need to extend this framework if JMX is
- a standard. Perhaps you want a connection to be automatically created after some specific
- action, or perhaps you want your connection wizard to do more than simply set a host and
- port. JBoss, for example, requires setting some credentials on the client machine, but
- using JBoss classes to do it. This requires that the connection have access to JBoss
- jars.</para>
- </section>
-
- <section>
- <title>Core Extensions</title>
-
- <para>To create your own JMX Connection type, you must use the
- org.jboss.tools.jmx.core.MBeanServerConnectionProvider extension point. This point takes
- one child, a connectionProvider with a class that implements
- org.jboss.tools.jmx.core.IConnectionProvider.</para>
-
- <para>An IConnectionProvider is responsible for creation and deletion of IConnectionWrapper
- objects. It must also keep a list of listeners that it is expected to inform when a
- connection is added or removed from its list. </para>
-
- <para>Each IConnectionWrapper is expected to handle running arbitrary JMX runnables or getting
- a "Root" object representing all JMX nodes. There are some utility methods the
- IConnectionWrapper can make use of.</para>
- </section>
-
- <section>
- <title>UI Extensions</title>
- <para>There are two extension points currently approved for use in the UI</para>
- <itemizedlist>
- <listitem>
- <para>org.jboss.tools.jmx.ui.providerUI - provide an icon, id, displayable name, and
- wizardPage class for creation of new connections</para>
- </listitem>
- <listitem>
- <para>org.jboss.tools.jmx.ui.attribute.controls - allows you to map class types to some
- Control to present them in the MBean Editor</para>
- <para>We hope, this guide helped you to get started with the JBoss JMX Tools. Besides, for additional information you are welcome on <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss forum</ulink>.</para>
- </listitem>
- </itemizedlist>
- </section>
-
- </section>
- <section id="connection" xreflabel="connection">
-
- <title>Connections Creation Task</title>
-
- <para>The <property>MBean Explorer</property> supports several different types of connections.
- The tooling itself comes only with a default connection type, however other
- adopters can provide additional connection types that may require additional
- or non-spec behavior. Connections can be in either the connected state or
- the disconnected state. Some connection types (such as the default connection type)
- allow you to control the current state. Other connection types may not. </para>
-
- <para>Similarly, some connection types may be able to be created, and others may not.
- The default connection type, for example, can be created and deleted by you
- at will. The AS Tools connection type, which represents a JBoss server, does not
- allow you this level of control. A JBoss JMX connection is created when a JBoss server is created
- in the server's view, and deleted when said server is deleted. The JMX connection for
- this server is in the connected state only when the server is started. </para>
-
-
- <section><title>Establishing Connection</title>
-
- <para> There are two ways to connect to an application with remote management enabled:</para>
-
- <para> The first step is the same for both - to connect to a MBean Server, click the
- <emphasis>
- <property>New Connection</property></emphasis> icon
-
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/new_connection_icon.png"/>
- </imageobject>
- </inlinemediaobject>
-
- in the <property>MBean Explorer</property> menu bar.</para>
-
- <para>Then to follow the simple one you just need to specify host, port (and optionally user
- name and password) and click <emphasis>
- <property>OK</property>.</emphasis></para>
- <para>On the <property>Advanced</property> tab you can set the sever name (it will be displayed in <property>MBean Explorer</property>), a url to the remote server.
- For example, to connect to JBoss AS you need to set the <property>JMX URL</property> to
- </para>
- <programlisting role="XML"><![CDATA[
-service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector
- ]]></programlisting>
- <para>If it is required you can enter user name and password for the server connection.
- </para>
-
-
- <note>
- <title>Note</title>
- <para>Only JMX URL based on RMI are supported.</para>
- </note>
- </section>
- </section>
-</chapter>
-
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="tasks" xreflabel="tasks">
+ <?dbhtml filename="tasks.html"?>
+ <title>JMX Tools Tasks</title>
+ <para>This chapter will give you answers on most popular questions asked by <property>JMX
+ plugin</property> users.</para>
+ <section>
+ <title>Quick Start</title>
+
+ <para>To start using the <property>JMX Tools</property> it's necessary to open
+ <property>MBean Explorer</property>. Go to <emphasis><property>Window > Show View > Other</property></emphasis> and then select
+ <property>MBean Explorer</property> and click <emphasis><property>OK</property>.</emphasis></para>
+
+ <para>The <property>MBean Explorer</property> lists all the domains, mbeans, attributes, and operations inside a
+ connection. When you double-click a MBean in the <emphasis><property>MBean Explorer</property>,</emphasis> it opens a multi-page
+ editor to manage the MBean. The <property>MBean Editor</property> is composed of these pages:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis><property>Attributes page</property>,</emphasis> to get/set the attributes of the MBean</para>
+ </listitem>
+ <listitem>
+ <para><emphasis><property>Operations page</property>,</emphasis> to invoke operations on the MBean</para>
+ </listitem>
+ <listitem>
+ <para><emphasis><property>Notifications page</property>,</emphasis> to receive notifications from the MBean</para>
+ </listitem>
+ <listitem>
+ <para><emphasis><property>Info page</property>,</emphasis> which displays general information about the MBean </para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+
+ <section>
+ <title>Managing Application</title>
+
+
+
+<para>Like it's said earlier in the guide the JMX technology allows to monitor and manage Java applications. In this section we will show you how to get connected to
+a sample Java application and run the <property>sayHello()</property> method remotely from inside of the <property>MBean Explorer</property>.</para>
+<orderedlist>
+<listitem><para>Unzip the bundle of sample classes.</para></listitem>
+<listitem><para>Compile the example Java classes from within where you unpacked the files directory.</para>
+
+ <programlisting role="XML"><![CDATA[
+ javac com/example/*.java
+ ]]></programlisting>
+
+</listitem>
+<listitem><para>Start the <property>Main</property> application, specifying the properties that expose Main for remote management:</para>
+
+ <programlisting role="XML"><![CDATA[
+java -Dcom.sun.management.jmxremote.port=9999 \
+-Dcom.sun.management.jmxremote.authenticate=false \
+-Dcom.sun.management.jmxremote.ssl=false \
+com.example.Main
+ ]]></programlisting>
+
+<para>If everything was done correctly you will see the "Waiting for incoming requests..." message on the screen.</para>
+
+
+ </listitem>
+ <listitem><para>Now launch the Eclipse IDE, in Eclipse open the <property>MBean Explorer</property>. Go to <emphasis><property>Window > Show View > Other</property></emphasis> and then select
+ <property>MBean Explorer</property> and click <emphasis><property>OK</property></emphasis>)</para></listitem>
+ <listitem>
+ <para>Click the <emphasis>
+ <property>New Connection</property></emphasis> icon
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/new_connection_icon.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the <property>MBean Explorer</property> menu
+ bar.</para>
+ </listitem>
+
+ <listitem><para>In the <property>Create JMX Connection</property> dialog, hit <property>Next</property> and then click the <property>Advanced</property> tab. </para></listitem>
+
+
+ <listitem><para>In the <property>JMX URL</property> input field enter the following URL:</para>
+
+ <programlisting role="XML"><![CDATA[
+ service:jmx:rmi:///jndi/rmi://:9999/jmxrmi
+ ]]></programlisting>
+
+ </listitem>
+
+ <listitem><para>Press <property>Finish</property> to esteblish the connection with the application.</para>
+ </listitem>
+
+ <listitem><para>Now expand the connection you have just created, then open the <property>com.example</property> package and click <property>sayHello()</property> method. </para>
+ <para>Once the <property>sayHello()</property> method is clicked the <property>MBean Editor</property> is activated. </para>
+
+ </listitem>
+
+ <listitem><para>In the <property>MBean Editor</property> go to the <property>Operation Details</property> section and hit the <property>sayHello()</property> button.</para><para> You will get the "Operation inoked successfully" message. </para>
+ </listitem>
+
+ <listitem><para>The final step is to make sure the application worked as it was expected. Open the terminal where you launched the application in step 3. Now you see the "hello, world" message on the screen. </para>
+ </listitem>
+</orderedlist>
+
+
+
+ </section>
+ <section>
+ <title>Tomcat Managing</title>
+
+ <para>It's possible to manage Tomcat using <property>JMX Tools</property>.</para>
+
+ <para>Currently, JMX Tooling is able to connect to Tomcat without authentication or with
+ password-based authentication.</para>
+ <para>Using SSL for authentication is not supported: you need to make sure that the System
+ property <emphasis>
+ <property>com.sun.management.jmxremote.ssl</property>
+ </emphasis> is set to false. </para>
+ <para>More information to manage Tomcat can be found in <ulink url="http://tomcat.apache.org/tomcat-6.0-doc/">Tomcat management documentation</ulink>.</para>
+ <para>Instructions to manage remotely Tomcat are available in <ulink url="http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html">Tomcat's monitoring documentation</ulink>.</para>
+
+
+ </section>
+
+ <section>
+ <title>Eclipse Equinox Managing</title>
+
+ <para>You can manage Equinox through the Equinox monitoring framework.</para>
+ <para>In this section we will show you how to connect to an Equinox server via JBoss JMX tools. First off, you need to make for example a simple servlet and run it on a server. This guide is not intended to teach you how to build application and run them on the server, you can read for example <ulink url="http://www.eclipse.org/equinox-portal/tutorials/server-side/"> this tutorial </ulink> to get a better idea of how to build server-based applications with Eclipse Equinox. </para>
+ <para>Once you have run an application on the server you can connect to it using JBoss JMX tools.</para>
+
+ <orderedlist>
+ <listitem>
+ <para>Go to <emphasis>
+ <property>Window > Open Perspective > Other</property>
+ </emphasis> and select the <property>JMX perspective.</property></para>
+ </listitem>
+
+ <!--<listitem>
+ <para>Select <emphasis>
+ <property>JMX Server > Open Connection</property>
+ </emphasis> and click <emphasis>
+ <property>OK</property>
+ </emphasis></para>
+ </listitem>-->
+
+ <listitem>
+ <para>Switch to the <property>MBean Explorer</property> by going to <emphasis>
+ <property>Window > Show View > Other</property>
+ </emphasis> and selecting the MBean Explorer.</para>
+ </listitem>
+
+ <listitem>
+ <para>Click the <emphasis>
+ <property>New Connection</property></emphasis> icon
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/new_connection_icon.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the <property>MBean Explorer</property> menu
+ bar.</para>
+ </listitem>
+
+ <listitem>
+ <para>Select the <emphasis>
+ <property>Advanced tab</property></emphasis> and set the JMX URL to <emphasis>
+ <property>service:jmx:rmi:///jndi/rmi://:8118/jmxserver.</property>
+ </emphasis></para>
+
+ <figure>
+ <title>Using JMX Tools to Access Equinox Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/equinox.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </listitem>
+ </orderedlist>
+
+ <para>You now have access to the MBeans exposed by Equinox.</para>
+ </section>
+
+
+ <section>
+ <title>Managing JBoss AS</title>
+
+ <para>Managing JBoss instances is not supported with the <property>JMX Tools</property>
+ alone. You must also download and install the <property>AS Tools</property> portion of
+ the <property>JBoss Tools</property> distribution. Even after installing the proper
+ tooling, you cannot create a JBoss JMX connection yourself or through the Connection
+ Wizard. The first step is to create a JBoss Server. The full instructions for this can
+ be found in the AS Tools section, however, the short summary is: </para>
+ <orderedlist>
+ <listitem>
+ <para>Open the <property>Servers</property> view</para>
+ </listitem>
+
+ <listitem>
+ <para>Right-click in the view and select <emphasis>
+ <property>New > Server</property>
+ </emphasis></para>
+ </listitem>
+
+ <listitem>
+ <para>In the <emphasis>
+ <property>JBoss Enterprise Middleware</property>
+ </emphasis> or in <emphasis>
+ <property>JBoss Community</property>
+ </emphasis> section, select a server version</para>
+ </listitem>
+
+ <listitem>
+ <para>If a runtime has not yet been created, you'll be prompted for the
+ server's home directory, JDK, and configuration</para>
+ </listitem>
+
+ <listitem>
+ <para>Finish the wizard and note that you have a new entry in both the
+ <property>Servers</property> view and the <property>MBean
+ Explorer</property></para>
+ </listitem>
+
+ <listitem>
+ <para>Start the server by right-clicking it and selecting <emphasis>
+ <property>Start</property></emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Note that once the server is started, the JMX connection can be
+ expanded</para>
+ </listitem>
+ </orderedlist>
+
+ <para>Now you can explore MBeans exposed by a JBoss instance.</para>
+ </section>
+
+ <section>
+ <title>Managing JBoss AS Remotely</title>
+
+ <para>JBoss JMX Tool allow you to easily get access and mangane JBoss AS server remotely.
+ In order to get connected to the instance of JBoss AS remotely you need to run the server or make sure the server is lauched.
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>Go to <emphasis>
+ <property>Window > Open Perspective > Other</property>
+ </emphasis> and select the <property>JMX perspective.</property></para>
+ </listitem>
+ <listitem>
+ <para>Switch to the <property>MBean Explorer</property> by going to <emphasis>
+ <property>Window > Show View > Other</property>
+ </emphasis> and selecting the MBean Explorer.</para>
+ </listitem>
+
+ <listitem>
+ <para>Click the <emphasis>
+ <property>New Connection</property></emphasis> icon
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/new_connection_icon.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the <property>MBean Explorer</property> menu
+ bar.</para>
+ </listitem>
+
+ <listitem>
+ <para>Select the <emphasis>
+ <property>Advanced tab</property></emphasis> and set the JMX URL to: </para>
+ <programlisting role="XML"><![CDATA[
+service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector
+ ]]></programlisting>
+
+ <para>Please, note that in this example we connected to the local host. </para>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="extensions" xreflabel="extensions">
+ <title>Extension Task</title>
+ <para>This section will outline how to contribute your own Server type with some default
+ behavior.</para>
+
+ <section>
+ <title>Why we should do that?</title>
+
+ <para>You might be asking yourself why you'd need to extend this framework if JMX is
+ a standard. Perhaps you want a connection to be automatically created after some specific
+ action, or perhaps you want your connection wizard to do more than simply set a host and
+ port. JBoss, for example, requires setting some credentials on the client machine, but
+ using JBoss classes to do it. This requires that the connection have access to JBoss
+ jars.</para>
+ </section>
+
+ <section>
+ <title>Core Extensions</title>
+
+ <para>To create your own JMX Connection type, you must use the
+ org.jboss.tools.jmx.core.MBeanServerConnectionProvider extension point. This point takes
+ one child, a connectionProvider with a class that implements
+ org.jboss.tools.jmx.core.IConnectionProvider.</para>
+
+ <para>An IConnectionProvider is responsible for creation and deletion of IConnectionWrapper
+ objects. It must also keep a list of listeners that it is expected to inform when a
+ connection is added or removed from its list. </para>
+
+ <para>Each IConnectionWrapper is expected to handle running arbitrary JMX runnables or getting
+ a "Root" object representing all JMX nodes. There are some utility methods the
+ IConnectionWrapper can make use of.</para>
+ </section>
+
+ <section>
+ <title>UI Extensions</title>
+ <para>There are two extension points currently approved for use in the UI</para>
+ <itemizedlist>
+ <listitem>
+ <para>org.jboss.tools.jmx.ui.providerUI - provide an icon, id, displayable name, and
+ wizardPage class for creation of new connections</para>
+ </listitem>
+ <listitem>
+ <para>org.jboss.tools.jmx.ui.attribute.controls - allows you to map class types to some
+ Control to present them in the MBean Editor</para>
+ <para>We hope, this guide helped you to get started with the JBoss JMX Tools. Besides, for additional information you are welcome on <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss forum</ulink>.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ </section>
+ <section id="connection" xreflabel="connection">
+
+ <title>Connections Creation Task</title>
+
+ <para>The <property>MBean Explorer</property> supports several different types of connections.
+ The tooling itself comes only with a default connection type, however other
+ adopters can provide additional connection types that may require additional
+ or non-spec behavior. Connections can be in either the connected state or
+ the disconnected state. Some connection types (such as the default connection type)
+ allow you to control the current state. Other connection types may not. </para>
+
+ <para>Similarly, some connection types may be able to be created, and others may not.
+ The default connection type, for example, can be created and deleted by you
+ at will. The AS Tools connection type, which represents a JBoss server, does not
+ allow you this level of control. A JBoss JMX connection is created when a JBoss server is created
+ in the server's view, and deleted when said server is deleted. The JMX connection for
+ this server is in the connected state only when the server is started. </para>
+
+
+ <section><title>Establishing Connection</title>
+
+ <para> There are two ways to connect to an application with remote management enabled:</para>
+
+ <para> The first step is the same for both - to connect to a MBean Server, click the
+ <emphasis>
+ <property>New Connection</property></emphasis> icon
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/new_connection_icon.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the <property>MBean Explorer</property> menu bar.</para>
+
+ <para>Then to follow the simple one you just need to specify host, port (and optionally user
+ name and password) and click <emphasis>
+ <property>OK</property>.</emphasis></para>
+ <para>On the <property>Advanced</property> tab you can set the sever name (it will be displayed in <property>MBean Explorer</property>), a url to the remote server.
+ For example, to connect to JBoss AS you need to set the <property>JMX URL</property> to
+ </para>
+ <programlisting role="XML"><![CDATA[
+service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector
+ ]]></programlisting>
+ <para>If it is required you can enter user name and password for the server connection.
+ </para>
+
+
+ <note>
+ <title>Note</title>
+ <para>Only JMX URL based on RMI are supported.</para>
+ </note>
+ </section>
+ </section>
+</chapter>
+
15 years, 11 months
JBoss Tools SVN: r22092 - in branches/hibernatetools-multiversion/hibernatetools/plugins: org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils and 14 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-05-14 16:01:00 -0400 (Fri, 14 May 2010)
New Revision: 22092
Added:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/Embeddable.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/Entity.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/MappedSuperclass.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/spi/
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/spi/PersistenceUnitTransactionType.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/Ejb3Configuration.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/HibernatePersistence.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/ClassFilter.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/Entry.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/FileFilter.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/Filter.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/JarVisitor.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/JarVisitorFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/NamedInputStream.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/PackageFilter.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/PersistenceMetadata.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/PersistenceXmlLoader.java
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/.classpath
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/dom4j/mediator/x/Document.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/dom4j/mediator/x/Element.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/dom4j/mediator/x/Visitor.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/base/HObject.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/util/OpenMappingUtilsEjb3.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/mapping/Column.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6070 - fix bugs, fix with Hibernate 3.5, fix issues with open mapping
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-05-14 18:53:05 UTC (rev 22091)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -447,7 +447,15 @@
build();
buildSessionFactory();
}
- return configStub.getEntityResolver();
+ EntityResolver res = (EntityResolver)execute(new ExecutionContext.Command() {
+ public Object execute() {
+ if (configStub != null) {
+ return configStub.getEntityResolver();
+ }
+ return null;
+ }
+ } );
+ return res;
}
public HQLCodeAssist getHQLCodeAssist() {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2010-05-14 18:53:05 UTC (rev 22091)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -241,7 +241,6 @@
* @param table
* @return
*/
- @SuppressWarnings("unchecked")
public static boolean tableInFile(ConsoleConfiguration consoleConfig, IFile file, Table table) {
EntityResolver entityResolver = consoleConfig.getEntityResolver();
Document doc = getDocument(file.getLocation().toFile(), entityResolver);
@@ -446,7 +445,6 @@
* @param element
* @return
*/
- @SuppressWarnings("unchecked")
public static IFile searchInMappingFiles(ConsoleConfiguration consoleConfig, Object element) {
IFile file = null;
if (consoleConfig == null) {
@@ -991,7 +989,7 @@
final Cfg2HbmTool tool = Cfg2HbmTool.newInstance();
String toolTag = ""; //$NON-NLS-1$
PersistentClass pc = property.getPersistentClass();
- if (pc != null && pc.getIdentifierProperty() == property) {
+ if (pc != null && property.equals(pc.getIdentifierProperty())) {
if (property.isComposite()) {
toolTag = "composite-id"; //$NON-NLS-1$
} else {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/.classpath
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/.classpath 2010-05-14 18:53:05 UTC (rev 22091)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/.classpath 2010-05-14 20:01:00 UTC (rev 22092)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/cglib-2.2.jar"/>
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/Embeddable.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/Embeddable.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/Embeddable.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,12 @@
+package javax.persistence.mediator.x;
+
+import org.hibernate.mediator.base.HObject;
+
+public class Embeddable extends HObject {
+
+ public static final String CL = "javax.persistence.Embeddable"; //$NON-NLS-1$
+
+ protected Embeddable(Object embeddable) {
+ super(embeddable, CL);
+ }
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/Entity.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/Entity.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/Entity.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,12 @@
+package javax.persistence.mediator.x;
+
+import org.hibernate.mediator.base.HObject;
+
+public class Entity extends HObject {
+
+ public static final String CL = "javax.persistence.Entity"; //$NON-NLS-1$
+
+ protected Entity(Object entity) {
+ super(entity, CL);
+ }
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/MappedSuperclass.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/MappedSuperclass.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/MappedSuperclass.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,12 @@
+package javax.persistence.mediator.x;
+
+import org.hibernate.mediator.base.HObject;
+
+public class MappedSuperclass extends HObject {
+
+ public static final String CL = "javax.persistence.MappedSuperclass"; //$NON-NLS-1$
+
+ protected MappedSuperclass(Object mappedSuperclass) {
+ super(mappedSuperclass, CL);
+ }
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/spi/PersistenceUnitTransactionType.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/spi/PersistenceUnitTransactionType.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/javax/persistence/mediator/x/spi/PersistenceUnitTransactionType.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,19 @@
+package javax.persistence.mediator.x.spi;
+
+import org.hibernate.mediator.base.HObject;
+
+public class PersistenceUnitTransactionType extends HObject {
+
+ public static final String CL = "javax.persistence.spi.PersistenceUnitTransactionType"; //$NON-NLS-1$
+
+ public static final PersistenceUnitTransactionType RESOURCE_LOCAL =
+ new PersistenceUnitTransactionType(readStaticFieldValue(CL, "RESOURCE_LOCAL"));
+
+ public static final PersistenceUnitTransactionType JTA =
+ new PersistenceUnitTransactionType(readStaticFieldValue(CL, "JTA"));
+
+ protected PersistenceUnitTransactionType(Object persistenceUnitTransactionType) {
+ super(persistenceUnitTransactionType, CL);
+ }
+
+}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/dom4j/mediator/x/Document.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/dom4j/mediator/x/Document.java 2010-05-14 18:53:05 UTC (rev 22091)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/dom4j/mediator/x/Document.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -23,6 +23,6 @@
@Override
public void accept(Visitor visitor) {
- visitor.visit(this);
+ invoke(mn(), visitor.Obj());
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/dom4j/mediator/x/Element.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/dom4j/mediator/x/Element.java 2010-05-14 18:53:05 UTC (rev 22091)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/dom4j/mediator/x/Element.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -59,7 +59,11 @@
}
public Attribute attribute(String name) {
- return new Attribute(invoke(mn(), name));
+ Object obj = invoke(mn(), name);
+ if (obj == null) {
+ return null;
+ }
+ return new Attribute(obj);
}
public String getName() {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/dom4j/mediator/x/Visitor.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/dom4j/mediator/x/Visitor.java 2010-05-14 18:53:05 UTC (rev 22091)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/dom4j/mediator/x/Visitor.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -1,7 +1,63 @@
package org.dom4j.mediator.x;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import org.hibernate.mediator.HibernateConsoleRuntimeException;
+import org.hibernate.mediator.stubs.util.ClassHelper;
+import org.hibernate.mediator.stubs.util.ReflectHelper;
+
public abstract class Visitor {
+ public static final String CL = "org.dom4j.Visitor"; //$NON-NLS-1$
+
+ protected Object visitor;
+
+ public Visitor() {
+ Class<?> clazz;
+ try {
+ clazz = ReflectHelper.classForName(CL);
+ } catch (ClassNotFoundException e) {
+ throw new HibernateConsoleRuntimeException(e);
+ }
+ InvocationHandler handler = new InvocationHandler() {
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ if ("visit".equals(method.getName())) { //$NON-NLS-1$
+ Visitor.visit(Visitor.this, args[0]);
+ }
+ return null;
+ }
+ };
+ visitor = Proxy.newProxyInstance(clazz.getClassLoader(),
+ new Class[] { clazz }, handler);
+ }
+
+ // type of store object
+ public final Class<?> Cl() {
+ return visitor.getClass();
+ }
+
+ //
+ public final Object Obj() {
+ return visitor;
+ }
+
+ @SuppressWarnings("unchecked")
+ protected static void visit(Visitor visitor, Object obj) {
+ if (obj == null) {
+ return;
+ }
+ final Class cl = obj.getClass();
+ if (ClassHelper.isClassOrOffspring(cl, Document.CL)) {
+ visitor.visit(new Document(obj));
+ } else if (ClassHelper.isClassOrOffspring(cl, Element.CL)) {
+ visitor.visit(new Element(obj));
+ } else if (ClassHelper.isClassOrOffspring(cl, Attribute.CL)) {
+ visitor.visit(new Attribute(obj));
+ }
+ }
+
public void visit(Document document) {
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/base/HObject.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/base/HObject.java 2010-05-14 18:53:05 UTC (rev 22091)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/base/HObject.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -45,6 +45,16 @@
return obj;
}
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj instanceof HObject) {
+ return (this.obj == ((HObject)obj).obj);
+ }
+ return false;
+ }
+
//
public Object invoke(final String methodName) {
return invoke(methodName, new HObject[0]);
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/util/OpenMappingUtilsEjb3.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/util/OpenMappingUtilsEjb3.java 2010-05-14 18:53:05 UTC (rev 22091)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/stubs/util/OpenMappingUtilsEjb3.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -11,23 +11,23 @@
import java.util.Set;
import java.util.StringTokenizer;
-import javax.persistence.Embeddable;
-import javax.persistence.Entity;
-import javax.persistence.MappedSuperclass;
-import javax.persistence.spi.PersistenceUnitTransactionType;
+import javax.persistence.mediator.x.Embeddable;
+import javax.persistence.mediator.x.Entity;
+import javax.persistence.mediator.x.MappedSuperclass;
+import javax.persistence.mediator.x.spi.PersistenceUnitTransactionType;
-import org.hibernate.ejb.Ejb3Configuration;
-import org.hibernate.ejb.HibernatePersistence;
-import org.hibernate.ejb.packaging.ClassFilter;
-import org.hibernate.ejb.packaging.Entry;
-import org.hibernate.ejb.packaging.FileFilter;
-import org.hibernate.ejb.packaging.Filter;
-import org.hibernate.ejb.packaging.JarVisitor;
-import org.hibernate.ejb.packaging.JarVisitorFactory;
-import org.hibernate.ejb.packaging.NamedInputStream;
-import org.hibernate.ejb.packaging.PackageFilter;
-import org.hibernate.ejb.packaging.PersistenceMetadata;
-import org.hibernate.ejb.packaging.PersistenceXmlLoader;
+import org.hibernate.mediator.x.ejb.Ejb3Configuration;
+import org.hibernate.mediator.x.ejb.HibernatePersistence;
+import org.hibernate.mediator.x.ejb.packaging.ClassFilter;
+import org.hibernate.mediator.x.ejb.packaging.Entry;
+import org.hibernate.mediator.x.ejb.packaging.FileFilter;
+import org.hibernate.mediator.x.ejb.packaging.Filter;
+import org.hibernate.mediator.x.ejb.packaging.JarVisitor;
+import org.hibernate.mediator.x.ejb.packaging.JarVisitorFactory;
+import org.hibernate.mediator.x.ejb.packaging.NamedInputStream;
+import org.hibernate.mediator.x.ejb.packaging.PackageFilter;
+import org.hibernate.mediator.x.ejb.packaging.PersistenceMetadata;
+import org.hibernate.mediator.x.ejb.packaging.PersistenceXmlLoader;
import org.hibernate.mediator.stubs.util.CollectionHelper;
import org.xml.sax.EntityResolver;
@@ -63,7 +63,7 @@
if (xmls == null || !xmls.hasMoreElements()) {
return null;
}
- final String IMPLEMENTATION_NAME = HibernatePersistence.class.getName();
+ final String IMPLEMENTATION_NAME = HibernatePersistence.CL;
List<String> res = null;
while (xmls.hasMoreElements() && res == null) {
URL url = xmls.nextElement();
@@ -164,9 +164,8 @@
* @param metadata
* @throws IOException
*/
- @SuppressWarnings("unchecked")
private static void addMetadataFromVisitor(JarVisitor visitor, String addPath, PersistenceMetadata metadata) throws IOException {
- Set[] entries = visitor.getMatchingEntries();
+ Set<Entry>[] entries = visitor.getMatchingEntries();
Filter[] filters = visitor.getFilters();
int size = filters.length;
List<String> classes = metadata.getClasses();
@@ -174,14 +173,13 @@
List<NamedInputStream> hbmFiles = metadata.getHbmfiles();
List<String> mappingFiles = metadata.getMappingFiles();
for (int index = 0; index < size; index++) {
- for (Object o : entries[index]) {
- Entry entry = (Entry) o;
+ for (Entry entry : entries[index]) {
if (filters[index] instanceof ClassFilter) {
classes.add(entry.getName());
} else if (filters[index] instanceof PackageFilter) {
packages.add(entry.getName());
} else if (filters[index] instanceof FileFilter) {
- hbmFiles.add(new NamedInputStream(addPath + "/" + entry.getName(), //$NON-NLS-1$
+ hbmFiles.add(NamedInputStream.create(addPath + "/" + entry.getName(), //$NON-NLS-1$
entry.getInputStream()));
if (mappingFiles != null) {
mappingFiles.remove(entry.getName());
@@ -251,30 +249,27 @@
int size = (detectedArtifacts[0] ? 2 : 0) + ((searchORM || detectedArtifacts[1] || mappingFilesSize > 0) ? 1 : 0);
Filter[] filters = new Filter[size];
if (detectedArtifacts[0]) {
- filters[0] = new PackageFilter(false, null) {
+ filters[0] = PackageFilter.newInstance(false, null, new Filter.IAcceptHolder() {
public boolean accept(String javaElementName) {
return true;
}
- };
- filters[1] = new ClassFilter(
- false, new Class[] {
- Entity.class,
- MappedSuperclass.class,
- Embeddable.class}
- ) {
- public boolean accept(String javaElementName) {
- return true;
- }
- };
+ });
+ filters[1] = ClassFilter.newInstance(false,
+ new Class[] { Entity.class, MappedSuperclass.class, Embeddable.class },
+ new Filter.IAcceptHolder() {
+ public boolean accept(String javaElementName) {
+ return true;
+ }
+ });
}
if (detectedArtifacts[1] || searchORM || mappingFilesSize > 0) {
- filters[size - 1] = new FileFilter(true) {
+ filters[size - 1] = FileFilter.newInstance(true, new Filter.IAcceptHolder() {
public boolean accept(String javaElementName) {
return (detectedArtifacts[1] && javaElementName.endsWith("hbm.xml")) //$NON-NLS-1$
|| (searchORM && javaElementName.endsWith(META_INF_ORM_XML))
|| (mappingFilesSize > 0 && mappingFiles.contains(javaElementName));
}
- };
+ });
}
return filters;
}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/Ejb3Configuration.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/Ejb3Configuration.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/Ejb3Configuration.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,13 @@
+package org.hibernate.mediator.x.ejb;
+
+import org.hibernate.mediator.base.HObject;
+
+public class Ejb3Configuration extends HObject {
+
+ public static final String CL = "org.hibernate.ejb.Ejb3Configuration"; //$NON-NLS-1$
+
+ protected Ejb3Configuration(Object ejb3Configuration) {
+ super(ejb3Configuration, CL);
+ }
+
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/HibernatePersistence.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/HibernatePersistence.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/HibernatePersistence.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,15 @@
+package org.hibernate.mediator.x.ejb;
+
+import org.hibernate.mediator.base.HObject;
+
+public class HibernatePersistence extends HObject {
+
+ public static final String CL = "org.hibernate.ejb.HibernatePersistence"; //$NON-NLS-1$
+
+ protected HibernatePersistence(Object hibernatePersistence) {
+ super(hibernatePersistence, CL);
+ }
+
+ public static final String AUTODETECTION = (String)HObject.readStaticFieldValue(CL, "AUTODETECTION"); //$NON-NLS-1$
+
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/ClassFilter.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/ClassFilter.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/ClassFilter.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,38 @@
+package org.hibernate.mediator.x.ejb.packaging;
+
+import java.lang.reflect.Method;
+
+import net.sf.cglib.proxy.Enhancer;
+import net.sf.cglib.proxy.MethodInterceptor;
+import net.sf.cglib.proxy.MethodProxy;
+
+import org.hibernate.mediator.HibernateConsoleRuntimeException;
+import org.hibernate.mediator.stubs.util.ReflectHelper;
+
+public class ClassFilter extends Filter {
+
+ public static final String CL = "org.hibernate.ejb.packaging.ClassFilter"; //$NON-NLS-1$
+
+ protected ClassFilter(Object classFilter) {
+ super(classFilter, CL);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static ClassFilter newInstance(boolean retrieveStream, Class[] annotations, final IAcceptHolder acceptHolder) {
+ Class<?> clazz;
+ try {
+ clazz = ReflectHelper.classForName(CL);
+ } catch (ClassNotFoundException e) {
+ throw new HibernateConsoleRuntimeException(e);
+ }
+ MethodInterceptor mi = new MethodInterceptor() {
+ public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
+ return acceptHolder.accept((String)args[0]);
+ }
+ };
+ Enhancer e = createEnhancer(clazz, mi);
+ Object packageFilter = e.create(new Class[] { boolean.class, Class[].class },
+ new Object[] { retrieveStream, annotations } );
+ return new ClassFilter(packageFilter);
+ }
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/Entry.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/Entry.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/Entry.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,23 @@
+package org.hibernate.mediator.x.ejb.packaging;
+
+import java.io.InputStream;
+
+import org.hibernate.mediator.base.HObject;
+
+public class Entry extends HObject {
+
+ public static final String CL = "org.hibernate.ejb.packaging.Entry"; //$NON-NLS-1$
+
+ protected Entry(Object entry) {
+ super(entry, CL);
+ }
+
+ public String getName() {
+ return (String)invoke(mn());
+ }
+
+ public InputStream getInputStream() {
+ return (InputStream)invoke(mn());
+ }
+
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/FileFilter.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/FileFilter.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/FileFilter.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,38 @@
+package org.hibernate.mediator.x.ejb.packaging;
+
+import java.lang.reflect.Method;
+
+import net.sf.cglib.proxy.Enhancer;
+import net.sf.cglib.proxy.MethodInterceptor;
+import net.sf.cglib.proxy.MethodProxy;
+
+import org.hibernate.mediator.HibernateConsoleRuntimeException;
+import org.hibernate.mediator.stubs.util.ReflectHelper;
+
+public class FileFilter extends Filter {
+
+ public static final String CL = "org.hibernate.ejb.packaging.FileFilter"; //$NON-NLS-1$
+
+ protected FileFilter(Object fileFilter) {
+ super(fileFilter, CL);
+ }
+
+ public static FileFilter newInstance(boolean retrieveStream, final IAcceptHolder acceptHolder) {
+ Class<?> clazz;
+ try {
+ clazz = ReflectHelper.classForName(CL);
+ } catch (ClassNotFoundException e) {
+ throw new HibernateConsoleRuntimeException(e);
+ }
+ MethodInterceptor mi = new MethodInterceptor() {
+ public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
+ return acceptHolder.accept((String)args[0]);
+ }
+ };
+ Enhancer e = createEnhancer(clazz, mi);
+ Object packageFilter = e.create(new Class[] { boolean.class },
+ new Object[] { retrieveStream } );
+ return new FileFilter(packageFilter);
+ }
+
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/Filter.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/Filter.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/Filter.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,46 @@
+package org.hibernate.mediator.x.ejb.packaging;
+
+import java.lang.reflect.Method;
+
+import net.sf.cglib.proxy.Callback;
+import net.sf.cglib.proxy.CallbackFilter;
+import net.sf.cglib.proxy.Enhancer;
+import net.sf.cglib.proxy.MethodInterceptor;
+import net.sf.cglib.proxy.NoOp;
+
+import org.hibernate.mediator.base.HObject;
+
+public class Filter extends HObject {
+
+ public static final String CL = "org.hibernate.ejb.packaging.Filter"; //$NON-NLS-1$
+
+ protected Filter(Object filter) {
+ super(filter, CL);
+ }
+
+ protected Filter(Object filter, String cn) {
+ super(filter, cn);
+ }
+
+ public interface IAcceptHolder {
+ public boolean accept(String javaElementName);
+ }
+
+
+ private static final CallbackFilter baseNodeFilter = new CallbackFilter() {
+ public int accept(Method method) {
+ if ("accept".equals(method.getName() ) ) {
+ return 1;
+ }
+ return 0;
+ }
+ };
+
+ public static Enhancer createEnhancer(Class<?> clazz, MethodInterceptor mi) {
+ Enhancer e = new Enhancer();
+ e.setSuperclass(clazz);
+ e.setCallbacks(new Callback[] { NoOp.INSTANCE, mi });
+ e.setCallbackFilter(baseNodeFilter);
+ return e;
+ }
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/JarVisitor.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/JarVisitor.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/JarVisitor.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,43 @@
+package org.hibernate.mediator.x.ejb.packaging;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.hibernate.mediator.base.HObject;
+
+public class JarVisitor extends HObject {
+
+ public static final String CL = "org.hibernate.ejb.packaging.JarVisitor"; //$NON-NLS-1$
+
+ protected JarVisitor(Object jarVisitor) {
+ super(jarVisitor, CL);
+ }
+
+ public String getUnqualifiedJarName() {
+ return (String)invoke(mn());
+ }
+
+ @SuppressWarnings("unchecked")
+ public Set<Entry>[] getMatchingEntries() {
+ Set[] objs = (Set[])invoke(mn());
+ Set[] res = new Set[objs.length];
+ for (int i = 0; i < objs.length; i++) {
+ Set<Entry> newSet = new HashSet<Entry>();
+ for (Object o : objs[i]) {
+ newSet.add(new Entry(o));
+ }
+ res[i] = newSet;
+ }
+ return res;
+ }
+
+ public Filter[] getFilters() {
+ Object[] objs = (Object[])invoke(mn());
+ Filter[] res = new Filter[objs.length];
+ for (int i = 0; i < objs.length; i++) {
+ res[i] = new Filter(objs[i]);
+ }
+ return res;
+ }
+
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/JarVisitorFactory.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/JarVisitorFactory.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/JarVisitorFactory.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,68 @@
+package org.hibernate.mediator.x.ejb.packaging;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URL;
+
+import org.hibernate.mediator.HibernateConsoleRuntimeException;
+import org.hibernate.mediator.base.HObject;
+import org.hibernate.mediator.stubs.util.ReflectHelper;
+import org.hibernate.mediator.util.MReflectionUtils;
+
+public class JarVisitorFactory extends HObject {
+
+ public static final String CL = "org.hibernate.ejb.packaging.JarVisitorFactory"; //$NON-NLS-1$
+
+ protected JarVisitorFactory(Object jarVisitorFactory) {
+ super(jarVisitorFactory, CL);
+ }
+
+ public static URL getJarURLFromURLEntry(URL url, String entry) {
+ return (URL)invokeStaticMethod(CL, mn(), url, entry);
+ }
+
+
+ public static Object invokeStaticGetVisitor(URL jarUrl, Filter[] filters) {
+ Class<?>[] signature = new Class<?>[2];
+ Object[] vals = new Object[2];
+ //
+ signature[0] = jarUrl.getClass();
+ vals[0] = jarUrl;
+ //
+ Class<?> clazz;
+ try {
+ clazz = ReflectHelper.classForName(Filter.CL);
+ } catch (ClassNotFoundException e) {
+ throw new HibernateConsoleRuntimeException(e);
+ }
+ signature[1] = java.lang.reflect.Array.newInstance(clazz, 0).getClass();
+ Object[] objFilters = (Object[])java.lang.reflect.Array.newInstance(clazz, filters.length);
+ for (int i = 0; i < filters.length; i++) {
+ objFilters[i] = filters[i].Obj();
+ }
+ vals[1] = objFilters;
+ //
+ try {
+ clazz = ReflectHelper.classForName(CL);
+ } catch (ClassNotFoundException e) {
+ throw new HibernateConsoleRuntimeException(e);
+ }
+ Method method = MReflectionUtils.getMethod(clazz, "getVisitor", signature );
+ Object res;
+ try {
+ res = method.invoke(null, vals);
+ } catch (IllegalArgumentException e) {
+ throw new HibernateConsoleRuntimeException(e);
+ } catch (IllegalAccessException e) {
+ throw new HibernateConsoleRuntimeException(e);
+ } catch (InvocationTargetException e) {
+ throw new HibernateConsoleRuntimeException(e);
+ }
+ return res;
+ }
+
+ public static JarVisitor getVisitor(URL jarUrl, Filter[] filters) {
+ //return new JarVisitor(invokeStaticMethod(CL, mn(), jarUrl, filters));
+ return new JarVisitor(invokeStaticGetVisitor(jarUrl, filters));
+ }
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/NamedInputStream.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/NamedInputStream.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/NamedInputStream.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,31 @@
+package org.hibernate.mediator.x.ejb.packaging;
+
+import java.io.InputStream;
+
+import org.hibernate.mediator.base.HObject;
+
+public class NamedInputStream extends HObject {
+
+ public static final String CL = "org.hibernate.ejb.packaging.NamedInputStream"; //$NON-NLS-1$
+
+ protected NamedInputStream(Object namedInputStream) {
+ super(namedInputStream, CL);
+ }
+
+ public static NamedInputStream newInstance() {
+ return new NamedInputStream(HObject.newInstance(CL));
+ }
+
+ public static NamedInputStream create(String name, InputStream stream) {
+ return (NamedInputStream)newInstance(CL, name, stream);
+ }
+
+ public String getName() {
+ return (String)invoke(mn());
+ }
+
+ public InputStream getStream() {
+ return (InputStream)invoke(mn());
+ }
+
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/PackageFilter.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/PackageFilter.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/PackageFilter.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,38 @@
+package org.hibernate.mediator.x.ejb.packaging;
+
+import java.lang.reflect.Method;
+
+import net.sf.cglib.proxy.Enhancer;
+import net.sf.cglib.proxy.MethodInterceptor;
+import net.sf.cglib.proxy.MethodProxy;
+
+import org.hibernate.mediator.HibernateConsoleRuntimeException;
+import org.hibernate.mediator.stubs.util.ReflectHelper;
+
+public class PackageFilter extends Filter {
+
+ public static final String CL = "org.hibernate.ejb.packaging.PackageFilter"; //$NON-NLS-1$
+
+ protected PackageFilter(Object packageFilter) {
+ super(packageFilter, CL);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static PackageFilter newInstance(boolean retrieveStream, Class[] annotations, final IAcceptHolder acceptHolder) {
+ Class<?> clazz;
+ try {
+ clazz = ReflectHelper.classForName(CL);
+ } catch (ClassNotFoundException e) {
+ throw new HibernateConsoleRuntimeException(e);
+ }
+ MethodInterceptor mi = new MethodInterceptor() {
+ public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
+ return acceptHolder.accept((String)args[0]);
+ }
+ };
+ Enhancer e = createEnhancer(clazz, mi);
+ Object packageFilter = e.create(new Class[] { boolean.class, Class[].class },
+ new Object[] { retrieveStream, annotations } );
+ return new PackageFilter(packageFilter);
+ }
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/PersistenceMetadata.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/PersistenceMetadata.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/PersistenceMetadata.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,61 @@
+package org.hibernate.mediator.x.ejb.packaging;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.hibernate.mediator.base.HObject;
+
+public class PersistenceMetadata extends HObject {
+
+ public static final String CL = "org.hibernate.ejb.packaging.PersistenceMetadata"; //$NON-NLS-1$
+
+ protected PersistenceMetadata(Object persistenceMetadata) {
+ super(persistenceMetadata, CL);
+ }
+
+ public String getName() {
+ return (String)invoke(mn());
+ }
+
+ public void setName(Object name) {
+ invoke(mn(), name);
+ }
+
+ public String getProvider() {
+ return (String)invoke(mn());
+ }
+
+ public boolean getExcludeUnlistedClasses() {
+ return (Boolean)invoke(mn());
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<String> getClasses() {
+ return (List<String>)invoke(mn());
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<String> getPackages() {
+ return (List<String>)invoke(mn());
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<String> getMappingFiles() {
+ return (List<String>)invoke(mn());
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<NamedInputStream> getHbmfiles() {
+ List list = (List)invoke(mn());
+ List<NamedInputStream> res = new ArrayList<NamedInputStream>();
+ for (Object obj : list) {
+ res.add(new NamedInputStream(obj));
+ }
+ return res;
+ }
+
+ public Properties getProps() {
+ return (Properties)invoke(mn());
+ }
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/PersistenceXmlLoader.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/PersistenceXmlLoader.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/ejb/packaging/PersistenceXmlLoader.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -0,0 +1,31 @@
+package org.hibernate.mediator.x.ejb.packaging;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.persistence.mediator.x.spi.PersistenceUnitTransactionType;
+
+import org.hibernate.mediator.base.HObject;
+import org.xml.sax.EntityResolver;
+
+public class PersistenceXmlLoader extends HObject {
+
+ public static final String CL = "org.hibernate.ejb.packaging.PersistenceXmlLoader"; //$NON-NLS-1$
+
+ protected PersistenceXmlLoader(Object persistenceXmlLoader) {
+ super(persistenceXmlLoader, CL);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static List<PersistenceMetadata> deploy(URL url, Map overrides, EntityResolver resolver,
+ PersistenceUnitTransactionType defaultTransactionType) {
+ List list = (List)invokeStaticMethod(CL, mn(), url, overrides, resolver, defaultTransactionType);
+ List<PersistenceMetadata> res = new ArrayList<PersistenceMetadata>();
+ for (Object o : list) {
+ res.add(new PersistenceMetadata(o));
+ }
+ return res;
+ }
+}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/mapping/Column.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/mapping/Column.java 2010-05-14 18:53:05 UTC (rev 22091)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.mediator/src/org/hibernate/mediator/x/mapping/Column.java 2010-05-14 20:01:00 UTC (rev 22092)
@@ -7,9 +7,9 @@
public class Column extends Selectable {
public static final String CL = "org.hibernate.mapping.Column"; //$NON-NLS-1$
- public static final int DEFAULT_LENGTH = 255;
- public static final int DEFAULT_PRECISION = 19;
- public static final int DEFAULT_SCALE = 2;
+ public static final int DEFAULT_LENGTH = (Integer)readStaticFieldValue(CL, "DEFAULT_LENGTH");
+ public static final int DEFAULT_PRECISION = (Integer)readStaticFieldValue(CL, "DEFAULT_PRECISION");
+ public static final int DEFAULT_SCALE = (Integer)readStaticFieldValue(CL, "DEFAULT_SCALE");
protected Column(Object column) {
super(column, CL);
15 years, 11 months
JBoss Tools SVN: r22091 - in trunk/jbpm/docs/reference/en-US: images/the_views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-05-14 14:53:05 -0400 (Fri, 14 May 2010)
New Revision: 22091
Added:
trunk/jbpm/docs/reference/en-US/images/the_views/the_views_6a.png
Modified:
trunk/jbpm/docs/reference/en-US/the_views.xml
Log:
TOOLSDOC-72-Template added to better render the jbpm task forms in the
visual editor - description and image is added
Added: trunk/jbpm/docs/reference/en-US/images/the_views/the_views_6a.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/docs/reference/en-US/images/the_views/the_views_6a.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jbpm/docs/reference/en-US/the_views.xml
===================================================================
--- trunk/jbpm/docs/reference/en-US/the_views.xml 2010-05-14 18:51:08 UTC (rev 22090)
+++ trunk/jbpm/docs/reference/en-US/the_views.xml 2010-05-14 18:53:05 UTC (rev 22091)
@@ -1,230 +1,241 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="the_views" xreflabel="the_views">
- <?dbhtml filename="the_views.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>The views</title>
-
- <para>Here, it will be explained how to work with views and editors provided by JBDS.</para>
- <para>The views are used for representation and navigation the resources you are working on at
- the moment. One of the advantages of all the views is that all modifications made in the
- current active file are immediately displayed in them. Let’s get acquainted more closely
- with those that the <property>jPDL perspective</property> provides. </para>
-
- <figure>
- <title>The jPDL Perspective Views and Editors</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_0.png" scale="80"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As you can see in the picture above, the <property>jPDL perspective</property> contains a
- complete set of functionality that's necessary for working on the jBPM project.</para>
-
- <section id="the_outline_view">
- <?dbhtml filename="the_outline_view.html"?>
- <title>The Outline View</title>
- <para>To have a way to quickly see an outline of the process use the <emphasis>
- <property>Outline view</property>
- </emphasis> that is presented as the classical tree. If it is not visible select <emphasis>
- <property>Window > Show view > Outline</property>. </emphasis></para>
-
- <figure>
- <title>The Overview View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="the_overview">
- <?dbhtml filename="the_outline_view.html"?>
- <title>The Overview</title>
- <para>The main advantage of this view is that it gives visual representation of the whole
- current developing process. Besides, the <emphasis>
- <property>Overview</property>
- </emphasis> comes as a scrollable thumbnail which enables a better navigation of the
- process structure if it's too large.</para>
-
- <figure>
- <title>The Overview</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="the_properties_view">
- <?dbhtml filename="the_properties_view.html"?>
- <title>The Properties View</title>
- <para> Here, we dwell on the JBDS <property>Properties view</property>.</para>
- <para>Notice if it's not visible you can access it by navigating <emphasis>
- <property>Window > Show view > Properties</property>. </emphasis></para>
- <para>The view shows the relevant properties of the selected item in the tabbed form. Every
- item has its own set of properties, which can be directly editable in the Properties
- view or by brining up the context menu.</para>
-
- <figure>
- <title>The Properties View of selected Transition</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>For example, on the picture above the Properties view displays all the properties for
- a selected transition. Its name has been changed to <emphasis>
- <property>to_auction</property>. </emphasis> We've done it directly in
- active General tab of the view. The same way let's change the name for the
- second transition to <emphasis>
- <property>to_end</property>. </emphasis></para>
- <para>If no one item is selected, the view represents the properties of the whole process
- definition. </para>
-
- <figure>
- <title>The Properties View of Process Definition</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In this case, it contains six tabs. The first one is the <emphasis>
- <property>General</property>.</emphasis> It allows to specify a process name and add
- necessary description. To illustrate let's change the process definition name
- to <emphasis>
- <property>jbay</property>. </emphasis></para>
- </section>
-
- <section id="jbpm_gpd_editor">
- <?dbhtml filename="direct_editing.html"?>
- <title>The jBPM Graphical Process Designer editor.</title>
- <para>The <property>jBPM GPD editor</property> includes four modes: Diagram, Deployment,
- Design and Source, which are available as switchable tabs at the bottom of the editor.
- Let's dwell on each of them.</para>
-
- <section id="the_diagram_mode">
- <title>The Diagram mode</title>
- <para> In this mode we define the process in the form of a diagram by means of tools
- provided on the left-hand side of the jBPM GPD. </para>
-
- <figure>
- <title>The Diagram mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Besides, some properties can be directly edited in the <property>Diagram
- mode</property> of the graphical editor. One example of this is the <emphasis>
- <property>name</property>
- </emphasis> property of nodes. You can edit this directly by selecting the node of
- which you want to change the name and then click once inside this node. This enables
- an editor in the node. We change the name of the node to <emphasis>
- <property>auction</property>. </emphasis></para>
- </section>
-
- <section id="source_mode">
- <?dbhtml filename="the_source_view.html"?>
- <title>The Source Mode</title>
- <para>Now, that we have defined a simple process definition, we can have a look at the
- XML that is being generated under the covers. To see this XML click on the Source
- tab of the graphical process designer editor.</para>
-
- <figure>
- <title>The Source Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_6.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The <property>Source mode</property> enables to easily manipulate our XML. That is
- manually inserting and editing necessary elements or attributes. In addition, here
- you can take advantage of content assist.</para>
- </section>
-
- <section id="design_mode">
- <?dbhtml filename="the_design_view.html"?>
- <title>The Design Mode</title>
- <para>One more way to edit your file is to use <property>Design mode</property>. You can
- see it in the next picture:</para>
- <figure>
- <title>The Design Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As you can see above, this mode looks like a table in the first column of which
- the process structure is performed. Here, you can also insert, remove and edit
- elements or attributes, moreover add comments and instructions. Their values can be
- directly edited in the second column of the Design mode table.</para>
- <para>For instance, let’s add a comment on the second transition. For that, you should
- bring up the context menu for it and choose <emphasis>
- <property>Add Before > Comment</property>. </emphasis></para>
-
- <figure>
- <title>Adding a Comment</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_8.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Then, we can put the text <emphasis>This transition leads to the end
- state</emphasis> in the right column as its value.</para>
-
- <figure>
- <title>Comment is added</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_9.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="deployment_mode">
- <?dbhtml filename="the_deployment_view.html"?>
- <title>The Deployment Mode</title>
- <para>Finally, to adjust the deployment settings of the project you should switch on to
- the tab that opens the <property>Deployment mode</property>. On the picture below
- the <property>Deployment mode</property> is performed with default settings. Here,
- you can easily modify them or, if the settings won't match your needs, to
- reset defaults. </para>
- <figure>
- <title>The Deployment Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_10.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The button <emphasis>
- <property>Test Connections</property>
- </emphasis> is necessary to make sure whether all your settings are valid before
- deploying the process.</para>
- <para>Now that we've seen how to work with <property>jPDL
- perspective</property>, let's pass on to the project testing.</para>
- </section>
- </section>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="the_views" xreflabel="the_views">
+ <?dbhtml filename="the_views.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>The views</title>
+
+ <para>Here, it will be explained how to work with views and editors provided by JBDS.</para>
+ <para>The views are used for representation and navigation the resources you are working on at
+ the moment. One of the advantages of all the views is that all modifications made in the
+ current active file are immediately displayed in them. Let’s get acquainted more closely
+ with those that the <property>jPDL perspective</property> provides. </para>
+
+ <figure>
+ <title>The jPDL Perspective Views and Editors</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_0.png" scale="80"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see in the picture above, the <property>jPDL perspective</property> contains a
+ complete set of functionality that's necessary for working on the jBPM project.</para>
+
+ <section id="the_outline_view">
+ <?dbhtml filename="the_outline_view.html"?>
+ <title>The Outline View</title>
+ <para>To have a way to quickly see an outline of the process use the <emphasis>
+ <property>Outline view</property>
+ </emphasis> that is presented as the classical tree. If it is not visible select <emphasis>
+ <property>Window > Show view > Outline</property>. </emphasis></para>
+
+ <figure>
+ <title>The Overview View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="the_overview">
+ <?dbhtml filename="the_outline_view.html"?>
+ <title>The Overview</title>
+ <para>The main advantage of this view is that it gives visual representation of the whole
+ current developing process. Besides, the <emphasis>
+ <property>Overview</property>
+ </emphasis> comes as a scrollable thumbnail which enables a better navigation of the
+ process structure if it's too large.</para>
+
+ <figure>
+ <title>The Overview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="the_properties_view">
+ <?dbhtml filename="the_properties_view.html"?>
+ <title>The Properties View</title>
+ <para> Here, we dwell on the JBDS <property>Properties view</property>.</para>
+ <para>Notice if it's not visible you can access it by navigating <emphasis>
+ <property>Window > Show view > Properties</property>. </emphasis></para>
+ <para>The view shows the relevant properties of the selected item in the tabbed form. Every
+ item has its own set of properties, which can be directly editable in the Properties
+ view or by brining up the context menu.</para>
+
+ <figure>
+ <title>The Properties View of selected Transition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For example, on the picture above the Properties view displays all the properties for
+ a selected transition. Its name has been changed to <emphasis>
+ <property>to_auction</property>. </emphasis> We've done it directly in
+ active General tab of the view. The same way let's change the name for the
+ second transition to <emphasis>
+ <property>to_end</property>. </emphasis></para>
+ <para>If no one item is selected, the view represents the properties of the whole process
+ definition. </para>
+
+ <figure>
+ <title>The Properties View of Process Definition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In this case, it contains six tabs. The first one is the <emphasis>
+ <property>General</property>.</emphasis> It allows to specify a process name and add
+ necessary description. To illustrate let's change the process definition name
+ to <emphasis>
+ <property>jbay</property>. </emphasis></para>
+ </section>
+
+ <section id="jbpm_gpd_editor">
+ <?dbhtml filename="direct_editing.html"?>
+ <title>The jBPM Graphical Process Designer editor.</title>
+ <para>The <property>jBPM GPD editor</property> includes four modes: Diagram, Deployment,
+ Design and Source, which are available as switchable tabs at the bottom of the editor.
+ Let's dwell on each of them.</para>
+
+ <section id="the_diagram_mode">
+ <title>The Diagram mode</title>
+ <para> In this mode we define the process in the form of a diagram by means of tools
+ provided on the left-hand side of the jBPM GPD. </para>
+
+ <figure>
+ <title>The Diagram mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Besides, some properties can be directly edited in the <property>Diagram
+ mode</property> of the graphical editor. One example of this is the <emphasis>
+ <property>name</property>
+ </emphasis> property of nodes. You can edit this directly by selecting the node of
+ which you want to change the name and then click once inside this node. This enables
+ an editor in the node. We change the name of the node to <emphasis>
+ <property>auction</property>. </emphasis></para>
+ </section>
+
+ <section id="source_mode">
+ <?dbhtml filename="the_source_view.html"?>
+ <title>The Source Mode</title>
+ <para>Now, that we have defined a simple process definition, we can have a look at the
+ XML that is being generated under the covers. To see this XML click on the Source
+ tab of the graphical process designer editor.</para>
+
+ <figure>
+ <title>The Source Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The <property>Source mode</property> enables to easily manipulate our XML. That is
+ manually inserting and editing necessary elements or attributes. In addition, here
+ you can take advantage of content assist.</para>
+
+ <para>A template is added to better render the jBPM task forms in the Visual editor.
+ Now the jBPM Graphical Process designer can create facelets that are associated with tasks and are rendered in the jBPM console.</para>
+ <figure>
+ <title>A task form in VPE</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_6a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="design_mode">
+ <?dbhtml filename="the_design_view.html"?>
+ <title>The Design Mode</title>
+ <para>One more way to edit your file is to use <property>Design mode</property>. You can
+ see it in the next picture:</para>
+ <figure>
+ <title>The Design Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see above, this mode looks like a table in the first column of which
+ the process structure is performed. Here, you can also insert, remove and edit
+ elements or attributes, moreover add comments and instructions. Their values can be
+ directly edited in the second column of the Design mode table.</para>
+ <para>For instance, let’s add a comment on the second transition. For that, you should
+ bring up the context menu for it and choose <emphasis>
+ <property>Add Before > Comment</property>. </emphasis></para>
+
+ <figure>
+ <title>Adding a Comment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Then, we can put the text <emphasis>This transition leads to the end
+ state</emphasis> in the right column as its value.</para>
+
+ <figure>
+ <title>Comment is added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="deployment_mode">
+ <?dbhtml filename="the_deployment_view.html"?>
+ <title>The Deployment Mode</title>
+ <para>Finally, to adjust the deployment settings of the project you should switch on to
+ the tab that opens the <property>Deployment mode</property>. On the picture below
+ the <property>Deployment mode</property> is performed with default settings. Here,
+ you can easily modify them or, if the settings won't match your needs, to
+ reset defaults. </para>
+ <figure>
+ <title>The Deployment Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The button <emphasis>
+ <property>Test Connections</property>
+ </emphasis> is necessary to make sure whether all your settings are valid before
+ deploying the process.</para>
+ <para>Now that we've seen how to work with <property>jPDL
+ perspective</property>, let's pass on to the project testing.</para>
+ </section>
+ </section>
+</chapter>
\ No newline at end of file
15 years, 11 months
JBoss Tools SVN: r22090 - trunk/seam/docs/reference/en-US/images/seam_editors.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-05-14 14:51:08 -0400 (Fri, 14 May 2010)
New Revision: 22090
Modified:
trunk/seam/docs/reference/en-US/images/seam_editors/seam_editors_1c.png
Log:
TOOLSDOC-52-Added EL Code assist for @Named bean - description and image provided
Modified: trunk/seam/docs/reference/en-US/images/seam_editors/seam_editors_1c.png
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Tools SVN: r22089 - in trunk/seam/docs/reference/en-US: images/seam_editors and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-05-14 14:48:35 -0400 (Fri, 14 May 2010)
New Revision: 22089
Added:
trunk/seam/docs/reference/en-US/images/seam_editors/seam_editors_1c.png
Modified:
trunk/seam/docs/reference/en-US/seam_editors.xml
Log:
TOOLSDOC-52-Added EL Code assist for @Named bean - description and image provided
Added: trunk/seam/docs/reference/en-US/images/seam_editors/seam_editors_1c.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/docs/reference/en-US/images/seam_editors/seam_editors_1c.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/seam/docs/reference/en-US/seam_editors.xml
===================================================================
--- trunk/seam/docs/reference/en-US/seam_editors.xml 2010-05-14 14:55:26 UTC (rev 22088)
+++ trunk/seam/docs/reference/en-US/seam_editors.xml 2010-05-14 18:48:35 UTC (rev 22089)
@@ -1,682 +1,697 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="seam_editors" xreflabel="seam_editors" role="updated">
- <?dbhtml filename="seam_editors.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>JBDS</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Seam Editors</title>
-
-
- <para>This chapter tells about Seam Editors and their features.</para>
-
- <section>
- <title>Visual Page Editor</title>
- <para>Visual Page Editor fits perfectly for authoring view Seam pages. The major features of VPE are listed in <link linkend="SeamEditors">Main Features of Seam Editors</link> </para>
- <para>You can also read more about Visual Page Editor in <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf/html/editors.htm...">Visual Page Editor</ulink> chapter of "Visual Web Tools Reference Guide".</para>
- </section>
-
-
-
-
- <section>
- <title>Seam Pages Editor</title>
-
-
- <para>
- <property>Seam Pages Editor</property> provides a handy way to edit the <property>pages.xml</property> file.
-
- </para>
-
- <para>
- You can edit the pages.xml file in three modes: Graphical, Tree and Source.
-
- </para>
- <para>
- Seam Pages Editor supports synchronization with Package Explorer.This means that while renaming files in the Package Explorer all the changes immediately affect the pages.xml file.
-
- </para>
- <section>
- <title>Graphical Mode</title>
-
-
- <para>Graphical mode provides you with a set of visual tools to organize your project pageflow, exception handling etc.</para>
- <figure>
- <title>Seam Pages Editor: Graphical View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Graphical part of the editor has some visual elements. The table below shows graphical representation of the elements and explains their meanings. </para>
-
-<table>
- <title>Pages Editor: Graphical View. Visual elements</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Element</entry>
-
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/element_page.png"/>
- </imageobject>
- </mediaobject>
- </entry>
- <entry><para>A yellow box with a solid border represents a <code>
- <page>
- </code> element.
- </para></entry>
- </row>
- <row>
- <entry>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/element_param.png"/>
- </imageobject>
- </mediaobject></entry>
- <entry>
- <para>Pressing on the plus icon (<inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/icon_plus.png"/>
- </imageobject>
- </inlinemediaobject>)
-
-
- on the <code>
- <page>
- </code> element reveals a box that lists the parameters for the page.</para>
- </entry>
-
- </row>
-
- <row>
- <entry> <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/element_page2.png"/>
- </imageobject>
- </mediaobject></entry>
- <entry>
- <para>A red cross in the upper left corner of the page box indicates that the view-id is not found in the project.</para>
- </entry>
- </row>
-
- <row>
- <entry><mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/element_page1.png"/>
- </imageobject>
- </mediaobject></entry>
- <entry> <para>
- A gray box with a dashed border represents a page that has navigation
- (navigation rule) to but the page is not defined in the page.xml file.
- </para></entry>
- </row>
-
-
- <row>
- <entry> <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/element_exception.png"/>
- </imageobject>
- </mediaobject></entry>
- <entry> <para>An <code><exception></code> is represented by a blue box with a orange diamond.</para></entry>
- </row>
-
-
-
-
-
- </tbody>
- </tgroup>
-</table>
-
-
- <para>Pageflow relations are shown with gray arrows, when you select a relationship the arrow is changed to orange. </para>
-
-
-
- <para>On the lefthand side of the Graphical view of <property>Seam Page Editor</property> you can find a toolbar with a set of icons for the most frequently used commands. </para>
-
- <table>
- <title>Pages Editor: Graphical View. Commands Icons</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Icon Image</entry>
-
- <entry>Command</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/icon_select.png"/>
- </imageobject>
- </inlinemediaobject>
-
- </entry>
- <entry>Select a page element</entry>
-
- </row>
-
- <row>
- <entry><inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/icon_marquee.png"/>
- </imageobject>
- </inlinemediaobject></entry>
- <entry>Marquee a page item</entry>
- </row>
-
-
- <row>
- <entry>
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/icon_new_link.png"/>
- </imageobject>
- </inlinemediaobject>
-
- </entry>
- <entry>Add a page relationship</entry>
- </row>
-
-
- <row>
- <entry>
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/icon_exception.png"/>
- </imageobject>
- </inlinemediaobject>
-
- </entry>
- <entry>Add an exception rule</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
- <para>Context menus are also available when you click either on an item or a blank space.</para>
-
-
- <para>A context menu called on a blank space of the diagram provides the following options:</para>
- <itemizedlist>
- <listitem><para><emphasis role="bold">Page</emphasis> creates a new page element on the diagram</para></listitem>
- <listitem><para><emphasis role="bold">Exception</emphasis> creates a new exception element on the diagram</para></listitem>
- <listitem><para><emphasis role="bold">Auto Layout</emphasis> formats the layout of the diagram automatically</para></listitem>
- <listitem><para><emphasis role="bold">Select Element</emphasis> calls the <property>Select Element Wizard</property> with a filter to perform a quick search through the <property>pages.xml</property> file </para></listitem>
- </itemizedlist>
- <para>Rightclicking on a selected
- <code><page></code>
- element calls a context menu where you can choose the following options if you click on the <emphasis role="bold">New</emphasis> menu item: </para>
-
-
-
- <itemizedlist>
- <listitem><para><emphasis role="bold">Rule</emphasis> opens the <property>Add Navigation Rule</property> dialog in which you can browse your project for a view page to set the view-id in the navigation rule and specify <emphasis role="bold">render</emphasis> or <emphasis role="bold">redirect</emphasis> navigation options </para></listitem>
- <listitem><para><emphasis role="bold">Param</emphasis> calls a dialog box where you can define a parameter (using the
- <code><param></code>
- tag) for the
- <code><page></code>
- element</para></listitem>
- </itemizedlist>
-
-
- <section>
- <title>Seam Pages Diagram Preferences</title>
-
-
-
- <para>In order to customize the layout of Diagram you can go to
- <property>Window > Preferences > JBoss Tools > Web > Seam > Editors > Seam Pages Diagram</property>.
- </para>
-
- <figure>
- <title>Preferences of Seam Pages Diagram</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_11.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
-
-
- <section>
- <title>Tree Mode</title>
-
- <para>Tree Mode provides a wider range of options and way to edit and modify the pages.xml file.</para>
-
-
-
- <figure>
- <title>Seam Pages Editor: Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_8.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>
- In this mode all elements and attributes of the page.xml
- file can be viewed and edited in a visual, user friendly way.
- </para>
-
- </section>
-
-
- <section>
- <title>Outline Support for Seam Pages Editor</title>
-
-
- <para>Seam Pages Editor provides <property>Outline</property> view support.
- You can explore the pages.xml using Outline view in two modes: <property>Tree</property> ( <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/outline_tree.png"/>
- </imageobject>
- </inlinemediaobject> ) and <property>Diagram Navigation</property> ( <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/outline_navigation.png"/>
- </imageobject>
- </inlinemediaobject> ).</para>
-
- <para>
- The Diagram Navigation mode of Outline view gives a birds-view of the layout to allow quick navigation for large-scale applications.
- </para>
-
- <figure>
- <title>Outline view: Diagram Navigation mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_9.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>The Tree mode shows a tree for every element in the pages.xml file. You can get a quick overview of the whole file. When selecting an element in the Outline view the related element is highlighted in the Graphical, Tree or Source page of Seam Pages Editor.</para>
-
-
-
- <figure>
- <title>Outline view: Tree mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_10.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-
-
-
- </section>
-
-
-
- </section>
-
-
-
-
- <section>
-
-
- <title>Seam Components Editor</title>
-
- <para>When editing <property>components.xml</property> a structured tree editor is available
- in addition to pure source editing. It has a graphical view (Tree tab) and source
- (Source tab).</para>
-
- <figure>
- <title>component.xml Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <note>
- <title>Note:</title>
-
- <para>You can view and edit <property>components.xml</property> and other xml files
- directly in the Project Explorer and Properties sheet without opening the
- components.xml editor.</para>
- </note>
- <figure>
- <title>component.xml Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
-
-
- <section id="SeamEditors">
- <title>Main Features of Seam Editors</title>
-
- <para>In this chapter you will know what Seam Editors features are and how to work with them. </para>
-
- <section id="ContentAssist">
-
- <title>Content Assist</title>
-
- <para><property>Content Assist</property> (Ctrl + Space) is available when using EL expressions in the following file formats:</para>
- <itemizedlist>
- <listitem>
- <para>JSP</para>
- </listitem>
- <listitem>
- <para>XHTML</para>
- </listitem>
- <listitem>
- <para>XML</para>
- </listitem>
- <listitem>
- <para>JAVA</para>
- </listitem>
- </itemizedlist>
-
- <para>Notice, the code completion for the Seam components shows the proposals marked with Seam icon.</para>
-
- <figure>
- <title>Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_1.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para> Content Assist is also available for the <emphasis
- role="italic">
- <property>"jsfc "</property>
- </emphasis> attribute, it lets you select from a list of possible attribute values. Whereas, JSF components appear above all other components in the list.</para>
- <figure>
- <title>Content Assist for the "jsfc" attribute</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_12.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
- <note>
- <title>Note:</title>
-
- <para>To get Code Assist available for an externally generated and imported project,
- don't forget to enable Seam features and configure Seam Settings in <link linkend="project_pref">Project Preferences</link>.</para>
- </note>
-
- <section id="components_code_assist" role="new">
- <title>Content Assist for components.xml</title>
-
- <para>While you are editing a <emphasis>
- <property>components.xml</property>
- </emphasis> file you can make use of the Content Assist for inserting needed
- elements.</para>
-
- <figure>
- <title>Content Assist in the component.xml Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_1a.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The editor also makes code completion aware of methods/attributes for EntityQuery
- component.</para>
-
- <figure>
- <title>Content Assist for EntityQuery Component</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_1b.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
-
- </section>
- <section>
- <title>Content Assist for Page Descriptors</title>
-
- <para>Content Assist ( CA ) is available for Page Descriptors,
- <property>.page.xml</property> and <property>page.xml</property> files.
- Content Assist lets you easily compose a Page Descriptor file by suggesting elements and attributes. The suggestions are context dependent, which means that CA provides only the elements, attributes and in some cases values for the attributes, suitable in a particular place of your Page Descriptor.
-
- </para>
- <para>
- Seam Pages Editor also supports code completion in EL-expressions suggesting you possible bean properties and methods.
- </para>
- </section>
- <section id="OpenOn">
- <title>OpenOn</title>
-
- <para><property>OpenOn</property> lets you easily navigate through your project without
- using the Package Explorer or Project Explorer. After pressing <emphasis>
- <property>Ctrl + left click</property>
- </emphasis> (or just F3) you will see a corresponding method or class.</para>
-
- <figure>
- <title>OpenOn</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>OpenOn is available for the following files:</para>
- <itemizedlist>
- <listitem>
- <para>
- <link linkend="xmlFiles">XML files</link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link linkend="xhtmlFiles">JSP/XHTML Pages</link>
- </para>
- </listitem>
- <listitem>
- <para> <link linkend="javaFiles">Java files</link></para>
- </listitem>
- </itemizedlist>
- <note>
- <title>Note:</title>
-
- <para>In this section were described only use cases special for Seam applications.For general information please read
- <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf/html/editors.htm...">OpenOn section in Visual Web Tools Reference Guide</ulink>.</para>
- </note>
- <itemizedlist>
- <listitem id="xhtmlFiles"> <para>Using OpenOn in .xhtml files you can open:</para>
- <itemizedlist>
- <listitem><para>components or properties resolved using an EL expression;</para></listitem>
- <listitem><para>all actions described in pages.xml;</para></listitem>
- <listitem><para>other .xhtml files that paths are specified in a current file;</para></listitem>
- <listitem><para>image files that paths are set in the <emphasis>
- <property>value</property></emphasis> property.The files will be opened in the default system graphical editor.</para></listitem>
- </itemizedlist>
- </listitem>
- <listitem id="xmlFiles">
- <para>OpenOn is also supported in Page Descriptors (<property>.page.xml</property> and <property>pages.xml</property>). OpenOn allows you to navigate to Java beans as well as to view pages.
- You can <property>Ctrl + left click</property> on a bean or on view page file (e.g. XTML file) to navigate to the file you clicked on. </para>
-
- <figure>
- <title>OpenOn in .page.xml file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_2a.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>If you use Rule-based authorization with Drools in your Seam application you can apply OpenOn
- in <emphasis>
- <property>components.xml</property></emphasis> to open the files containing rule definitions in the <emphasis>
- <property>"rule-files"</property></emphasis> tag.
- </para>
- <figure>
- <title>OpenOn in components.xml file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_2c.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You can also use OpenOn to open jBPM components that are described in Seam component descriptor.
- Two places where it works are available: </para>
- <itemizedlist>
- <listitem><para>inside <emphasis>
- <property><component></property></emphasis> definition;</para>
- <figure>
- <title>OpenOn in components.xml file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_2d.png"/>
- </imageobject>
- </mediaobject>
- </figure></listitem>
- <listitem><para>inside <emphasis>
- <property>jbpm</property></emphasis> tags;</para>
- <figure>
- <title>OpenOn in components.xml file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_2e.png"/>
- </imageobject>
- </mediaobject>
- </figure></listitem>
- </itemizedlist>
- </listitem>
- <listitem id="javaFiles">
- <para>
- OpenOn is also supported in seam components where <property> In annotation</property> is presented.
- After pressing <property>Ctrl + left click</property> on the seam component specified in <code>@In </code> you will get the possibility to open the file where the component is declarated as well as
- all of the seam components where it is used in the next declarations:</para>
- <itemizedlist>
- <listitem><para>@Out</para></listitem>
- <listitem><para>@DataModel</para></listitem>
- <listitem><para>@Role</para></listitem>
- <listitem><para>@Roles</para></listitem>
- </itemizedlist>
-
- <figure>
- <title>OpenOn in Seam Component</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_2b.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="SeamValidation">
- <title>Seam Validation</title>
-
- <para>Validation of various possible problematic definitions is implemented for Seam
- applications.</para>
-
- <para>If an issue is found it will be shown in the standard <property>Problems
- View</property>.</para>
-
- <figure>
- <title>Seam Validation</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_6.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <note>
- <title>Note:</title>
- <para>Please note, only files within source path and web content are validated, meaning temporary files or test files are not included.</para>
- </note>
-
- <para>In the preferences page for Seam Validator you can see and modify the validator
- behavior. Go to <emphasis>
- <property>Window > Preferences > JBoss Tools > Web > Seam > Validator</property>
- </emphasis> and select the severity level for the optional Seam Validator
- problem.</para>
-
- <figure>
- <title>Seam Validator Preferences</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/seam_editors_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On WTP projects validation are enabled by default and thus executed automatically, but
- on normal Java projects you will have to go and add the Validation builder of your
- project . It is available in the properties of your project under
- <emphasis><property>Validation</property>.</emphasis></para>
-
- <figure>
- <title>Enabling the Validation Builder</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/validator1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The validations can be run manually by clicking
- <emphasis><property>Validate</property></emphasis> via the context menu on your project (folder or file inside your project) which will
- execute all the active WTP validations. Following to the project's preferences under <emphasis>
- <property>Validation</property></emphasis> it's possible to enable/disable any validator.
- </para>
-
- <para>It's also possible to turn off the validation for some resource (a file, folder) inside your project via the <emphasis>
- <property>Exclude Validation</property></emphasis> context menu option.</para>
-
- <figure>
- <title>Excluding Validation for the WebContent Folder</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/validator2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As a result, if you've turned off the validation for a folder (or file), it is put to the excluded group of the Validation filters and be ignored during the validation.</para>
-
- <figure>
- <title>Validation Filters</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_editors/validator3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
-</section>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="seam_editors" xreflabel="seam_editors" role="updated">
+ <?dbhtml filename="seam_editors.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Seam Editors</title>
+
+
+ <para>This chapter tells about Seam Editors and their features.</para>
+
+ <section>
+ <title>Visual Page Editor</title>
+ <para>Visual Page Editor fits perfectly for authoring view Seam pages. The major features of VPE are listed in <link linkend="SeamEditors">Main Features of Seam Editors</link> </para>
+ <para>You can also read more about Visual Page Editor in <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf/html/editors.htm...">Visual Page Editor</ulink> chapter of "Visual Web Tools Reference Guide".</para>
+ </section>
+
+
+
+
+ <section>
+ <title>Seam Pages Editor</title>
+
+
+ <para>
+ <property>Seam Pages Editor</property> provides a handy way to edit the <property>pages.xml</property> file.
+
+ </para>
+
+ <para>
+ You can edit the pages.xml file in three modes: Graphical, Tree and Source.
+
+ </para>
+ <para>
+ Seam Pages Editor supports synchronization with Package Explorer.This means that while renaming files in the Package Explorer all the changes immediately affect the pages.xml file.
+
+ </para>
+ <section>
+ <title>Graphical Mode</title>
+
+
+ <para>Graphical mode provides you with a set of visual tools to organize your project pageflow, exception handling etc.</para>
+ <figure>
+ <title>Seam Pages Editor: Graphical View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The Graphical part of the editor has some visual elements. The table below shows graphical representation of the elements and explains their meanings. </para>
+
+<table>
+ <title>Pages Editor: Graphical View. Visual elements</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Element</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/element_page.png"/>
+ </imageobject>
+ </mediaobject>
+ </entry>
+ <entry><para>A yellow box with a solid border represents a <code>
+ <page>
+ </code> element.
+ </para></entry>
+ </row>
+ <row>
+ <entry>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/element_param.png"/>
+ </imageobject>
+ </mediaobject></entry>
+ <entry>
+ <para>Pressing on the plus icon (<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/icon_plus.png"/>
+ </imageobject>
+ </inlinemediaobject>)
+
+
+ on the <code>
+ <page>
+ </code> element reveals a box that lists the parameters for the page.</para>
+ </entry>
+
+ </row>
+
+ <row>
+ <entry> <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/element_page2.png"/>
+ </imageobject>
+ </mediaobject></entry>
+ <entry>
+ <para>A red cross in the upper left corner of the page box indicates that the view-id is not found in the project.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry><mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/element_page1.png"/>
+ </imageobject>
+ </mediaobject></entry>
+ <entry> <para>
+ A gray box with a dashed border represents a page that has navigation
+ (navigation rule) to but the page is not defined in the page.xml file.
+ </para></entry>
+ </row>
+
+
+ <row>
+ <entry> <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/element_exception.png"/>
+ </imageobject>
+ </mediaobject></entry>
+ <entry> <para>An <code><exception></code> is represented by a blue box with a orange diamond.</para></entry>
+ </row>
+
+
+
+
+
+ </tbody>
+ </tgroup>
+</table>
+
+
+ <para>Pageflow relations are shown with gray arrows, when you select a relationship the arrow is changed to orange. </para>
+
+
+
+ <para>On the lefthand side of the Graphical view of <property>Seam Page Editor</property> you can find a toolbar with a set of icons for the most frequently used commands. </para>
+
+ <table>
+ <title>Pages Editor: Graphical View. Commands Icons</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Icon Image</entry>
+
+ <entry>Command</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/icon_select.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ </entry>
+ <entry>Select a page element</entry>
+
+ </row>
+
+ <row>
+ <entry><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/icon_marquee.png"/>
+ </imageobject>
+ </inlinemediaobject></entry>
+ <entry>Marquee a page item</entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/icon_new_link.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ </entry>
+ <entry>Add a page relationship</entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/icon_exception.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ </entry>
+ <entry>Add an exception rule</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>Context menus are also available when you click either on an item or a blank space.</para>
+
+
+ <para>A context menu called on a blank space of the diagram provides the following options:</para>
+ <itemizedlist>
+ <listitem><para><emphasis role="bold">Page</emphasis> creates a new page element on the diagram</para></listitem>
+ <listitem><para><emphasis role="bold">Exception</emphasis> creates a new exception element on the diagram</para></listitem>
+ <listitem><para><emphasis role="bold">Auto Layout</emphasis> formats the layout of the diagram automatically</para></listitem>
+ <listitem><para><emphasis role="bold">Select Element</emphasis> calls the <property>Select Element Wizard</property> with a filter to perform a quick search through the <property>pages.xml</property> file </para></listitem>
+ </itemizedlist>
+ <para>Rightclicking on a selected
+ <code><page></code>
+ element calls a context menu where you can choose the following options if you click on the <emphasis role="bold">New</emphasis> menu item: </para>
+
+
+
+ <itemizedlist>
+ <listitem><para><emphasis role="bold">Rule</emphasis> opens the <property>Add Navigation Rule</property> dialog in which you can browse your project for a view page to set the view-id in the navigation rule and specify <emphasis role="bold">render</emphasis> or <emphasis role="bold">redirect</emphasis> navigation options </para></listitem>
+ <listitem><para><emphasis role="bold">Param</emphasis> calls a dialog box where you can define a parameter (using the
+ <code><param></code>
+ tag) for the
+ <code><page></code>
+ element</para></listitem>
+ </itemizedlist>
+
+
+ <section>
+ <title>Seam Pages Diagram Preferences</title>
+
+
+
+ <para>In order to customize the layout of Diagram you can go to
+ <property>Window > Preferences > JBoss Tools > Web > Seam > Editors > Seam Pages Diagram</property>.
+ </para>
+
+ <figure>
+ <title>Preferences of Seam Pages Diagram</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_11.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+
+ <section>
+ <title>Tree Mode</title>
+
+ <para>Tree Mode provides a wider range of options and way to edit and modify the pages.xml file.</para>
+
+
+
+ <figure>
+ <title>Seam Pages Editor: Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ In this mode all elements and attributes of the page.xml
+ file can be viewed and edited in a visual, user friendly way.
+ </para>
+
+ </section>
+
+
+ <section>
+ <title>Outline Support for Seam Pages Editor</title>
+
+
+ <para>Seam Pages Editor provides <property>Outline</property> view support.
+ You can explore the pages.xml using Outline view in two modes: <property>Tree</property> ( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/outline_tree.png"/>
+ </imageobject>
+ </inlinemediaobject> ) and <property>Diagram Navigation</property> ( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/outline_navigation.png"/>
+ </imageobject>
+ </inlinemediaobject> ).</para>
+
+ <para>
+ The Diagram Navigation mode of Outline view gives a birds-view of the layout to allow quick navigation for large-scale applications.
+ </para>
+
+ <figure>
+ <title>Outline view: Diagram Navigation mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>The Tree mode shows a tree for every element in the pages.xml file. You can get a quick overview of the whole file. When selecting an element in the Outline view the related element is highlighted in the Graphical, Tree or Source page of Seam Pages Editor.</para>
+
+
+
+ <figure>
+ <title>Outline view: Tree mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+
+ </section>
+
+
+
+ </section>
+
+
+
+
+ <section>
+
+
+ <title>Seam Components Editor</title>
+
+ <para>When editing <property>components.xml</property> a structured tree editor is available
+ in addition to pure source editing. It has a graphical view (Tree tab) and source
+ (Source tab).</para>
+
+ <figure>
+ <title>component.xml Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+
+ <para>You can view and edit <property>components.xml</property> and other xml files
+ directly in the Project Explorer and Properties sheet without opening the
+ components.xml editor.</para>
+ </note>
+ <figure>
+ <title>component.xml Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+
+
+ <section id="SeamEditors">
+ <title>Main Features of Seam Editors</title>
+
+ <para>In this chapter you will know what Seam Editors features are and how to work with them. </para>
+
+ <section id="ContentAssist">
+
+ <title>Content Assist</title>
+
+ <para><property>Content Assist</property> (Ctrl + Space) is available when using EL expressions in the following file formats:</para>
+ <itemizedlist>
+ <listitem>
+ <para>JSP</para>
+ </listitem>
+ <listitem>
+ <para>XHTML</para>
+ </listitem>
+ <listitem>
+ <para>XML</para>
+ </listitem>
+ <listitem>
+ <para>JAVA</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Notice, the code completion for the Seam components shows the proposals marked with Seam icon.</para>
+
+ <figure>
+ <title>Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_1.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> Content Assist is also available for the <emphasis
+ role="italic">
+ <property>"jsfc "</property>
+ </emphasis> attribute, it lets you select from a list of possible attribute values. Whereas, JSF components appear above all other components in the list.</para>
+ <figure>
+ <title>Content Assist for the "jsfc" attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_12.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note>
+ <title>Note:</title>
+
+ <para>To get Code Assist available for an externally generated and imported project,
+ don't forget to enable Seam features and configure Seam Settings in <link linkend="project_pref">Project Preferences</link>.</para>
+ </note>
+
+ <section id="components_code_assist" role="new">
+ <title>Content Assist for components.xml</title>
+
+ <para>While you are editing a <emphasis>
+ <property>components.xml</property>
+ </emphasis> file you can make use of the Content Assist for inserting needed
+ elements.</para>
+
+ <figure>
+ <title>Content Assist in the component.xml Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_1a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The editor also makes code completion aware of methods/attributes for EntityQuery
+ component.</para>
+
+ <figure>
+ <title>Content Assist for EntityQuery Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_1b.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="named_beans_code_assist" role="new">
+ <title>Content assist for @Named beans</title>
+
+ <para>To the nice code completion you can also use Content assist for all occurrences where @Named beans are used.
+ </para>
+
+ <figure>
+ <title>Content assist for @Named beans</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_1c.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ </section>
+ <section>
+ <title>Content Assist for Page Descriptors</title>
+
+ <para>Content Assist ( CA ) is available for Page Descriptors,
+ <property>.page.xml</property> and <property>page.xml</property> files.
+ Content Assist lets you easily compose a Page Descriptor file by suggesting elements and attributes. The suggestions are context dependent, which means that CA provides only the elements, attributes and in some cases values for the attributes, suitable in a particular place of your Page Descriptor.
+
+ </para>
+ <para>
+ Seam Pages Editor also supports code completion in EL-expressions suggesting you possible bean properties and methods.
+ </para>
+ </section>
+ <section id="OpenOn">
+ <title>OpenOn</title>
+
+ <para><property>OpenOn</property> lets you easily navigate through your project without
+ using the Package Explorer or Project Explorer. After pressing <emphasis>
+ <property>Ctrl + left click</property>
+ </emphasis> (or just F3) you will see a corresponding method or class.</para>
+
+ <figure>
+ <title>OpenOn</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>OpenOn is available for the following files:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <link linkend="xmlFiles">XML files</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="xhtmlFiles">JSP/XHTML Pages</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para> <link linkend="javaFiles">Java files</link></para>
+ </listitem>
+ </itemizedlist>
+ <note>
+ <title>Note:</title>
+
+ <para>In this section were described only use cases special for Seam applications.For general information please read
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf/html/editors.htm...">OpenOn section in Visual Web Tools Reference Guide</ulink>.</para>
+ </note>
+ <itemizedlist>
+ <listitem id="xhtmlFiles"> <para>Using OpenOn in .xhtml files you can open:</para>
+ <itemizedlist>
+ <listitem><para>components or properties resolved using an EL expression;</para></listitem>
+ <listitem><para>all actions described in pages.xml;</para></listitem>
+ <listitem><para>other .xhtml files that paths are specified in a current file;</para></listitem>
+ <listitem><para>image files that paths are set in the <emphasis>
+ <property>value</property></emphasis> property.The files will be opened in the default system graphical editor.</para></listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem id="xmlFiles">
+ <para>OpenOn is also supported in Page Descriptors (<property>.page.xml</property> and <property>pages.xml</property>). OpenOn allows you to navigate to Java beans as well as to view pages.
+ You can <property>Ctrl + left click</property> on a bean or on view page file (e.g. XTML file) to navigate to the file you clicked on. </para>
+
+ <figure>
+ <title>OpenOn in .page.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_2a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If you use Rule-based authorization with Drools in your Seam application you can apply OpenOn
+ in <emphasis>
+ <property>components.xml</property></emphasis> to open the files containing rule definitions in the <emphasis>
+ <property>"rule-files"</property></emphasis> tag.
+ </para>
+ <figure>
+ <title>OpenOn in components.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_2c.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can also use OpenOn to open jBPM components that are described in Seam component descriptor.
+ Two places where it works are available: </para>
+ <itemizedlist>
+ <listitem><para>inside <emphasis>
+ <property><component></property></emphasis> definition;</para>
+ <figure>
+ <title>OpenOn in components.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_2d.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure></listitem>
+ <listitem><para>inside <emphasis>
+ <property>jbpm</property></emphasis> tags;</para>
+ <figure>
+ <title>OpenOn in components.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_2e.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure></listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem id="javaFiles">
+ <para>
+ OpenOn is also supported in seam components where <property> In annotation</property> is presented.
+ After pressing <property>Ctrl + left click</property> on the seam component specified in <code>@In </code> you will get the possibility to open the file where the component is declarated as well as
+ all of the seam components where it is used in the next declarations:</para>
+ <itemizedlist>
+ <listitem><para>@Out</para></listitem>
+ <listitem><para>@DataModel</para></listitem>
+ <listitem><para>@Role</para></listitem>
+ <listitem><para>@Roles</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>OpenOn in Seam Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_2b.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="SeamValidation">
+ <title>Seam Validation</title>
+
+ <para>Validation of various possible problematic definitions is implemented for Seam
+ applications.</para>
+
+ <para>If an issue is found it will be shown in the standard <property>Problems
+ View</property>.</para>
+
+ <figure>
+ <title>Seam Validation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_6.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+ <para>Please note, only files within source path and web content are validated, meaning temporary files or test files are not included.</para>
+ </note>
+
+ <para>In the preferences page for Seam Validator you can see and modify the validator
+ behavior. Go to <emphasis>
+ <property>Window > Preferences > JBoss Tools > Web > Seam > Validator</property>
+ </emphasis> and select the severity level for the optional Seam Validator
+ problem.</para>
+
+ <figure>
+ <title>Seam Validator Preferences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On WTP projects validation are enabled by default and thus executed automatically, but
+ on normal Java projects you will have to go and add the Validation builder of your
+ project . It is available in the properties of your project under
+ <emphasis><property>Validation</property>.</emphasis></para>
+
+ <figure>
+ <title>Enabling the Validation Builder</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/validator1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The validations can be run manually by clicking
+ <emphasis><property>Validate</property></emphasis> via the context menu on your project (folder or file inside your project) which will
+ execute all the active WTP validations. Following to the project's preferences under <emphasis>
+ <property>Validation</property></emphasis> it's possible to enable/disable any validator.
+ </para>
+
+ <para>It's also possible to turn off the validation for some resource (a file, folder) inside your project via the <emphasis>
+ <property>Exclude Validation</property></emphasis> context menu option.</para>
+
+ <figure>
+ <title>Excluding Validation for the WebContent Folder</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/validator2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As a result, if you've turned off the validation for a folder (or file), it is put to the excluded group of the Validation filters and be ignored during the validation.</para>
+
+ <figure>
+ <title>Validation Filters</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/validator3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+</section>
+</chapter>
\ No newline at end of file
15 years, 11 months
JBoss Tools SVN: r22088 - in trunk/cdi: plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-05-14 10:55:26 -0400 (Fri, 14 May 2010)
New Revision: 22088
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added new CDI validation rule: session bean class annotated @Specializes does not directly extend the bean class of another session bean
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-14 14:11:58 UTC (rev 22087)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-14 14:55:26 UTC (rev 22088)
@@ -771,6 +771,21 @@
CDICorePlugin.getDefault().logError(e);
}
}
+ /*
+ * 3.2.4. Specializing a session bean
+ * - session bean class annotated @Specializes does not directly extend the bean class of another session bean
+ */
+ IAnnotationDeclaration specializesDeclaration = bean.getSpecializesAnnotationDeclaration();
+ if(specializesDeclaration!=null) {
+ IBean sBean = bean.getSpecializedBean();
+ if(sBean==null) {
+ // The specializing bean extends nothing
+ addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, CDIPreferences.ILLEGAL_SPECIALIZING_SESSION_BEAN, specializesDeclaration, bean.getResource());
+ } else if(!CDIUtil.isSessionBean(sBean)) {
+ // The specializing bean directly extends a non-session bean class
+ addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, CDIPreferences.ILLEGAL_SPECIALIZING_SESSION_BEAN, specializesDeclaration, bean.getResource());
+ }
+ }
}
private void validateManagedBean(IClassBean bean) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-05-14 14:11:58 UTC (rev 22087)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-05-14 14:55:26 UTC (rev 22088)
@@ -39,11 +39,6 @@
- managed bean class annotated @Specializes does not directly extend
the bean class of another managed bean
-
-
-
-
-
3.2. Session beans
- session bean specifies an illegal scope (a stateless session bean must belong
to the @Dependent pseudo-scope; a singleton bean must belong to either the
@@ -52,14 +47,14 @@
- bean class of a session bean is annotated @Interceptor or @Decorator
- session bean with a parameterized bean class declares any scope other than @Dependent
+3.2.4. Specializing a session bean
+- session bean class annotated @Specializes does not directly extend
+ the bean class of another session bean
-3.2.4. Specializing a session bean
-- session bean class annotated @Specializes does not directly extend
- the bean class of another session bean
3.3. Producer methods
- producer method return type contains a wildcard type parameter
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-05-14 14:11:58 UTC (rev 22087)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-05-14 14:55:26 UTC (rev 22088)
@@ -123,7 +123,7 @@
CDIPreferencesMessages.CDIValidatorConfigurationBlock_section_specializing,
new String[][]{
{CDIPreferences.ILLEGAL_SPECIALIZING_MANAGED_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalSpecializingManagedBean_label},
-// {CDIPreferences.ILLEGAL_SPECIALIZING_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalSpecializingSessionBean_label},
+ {CDIPreferences.ILLEGAL_SPECIALIZING_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalSpecializingSessionBean_label},
// {CDIPreferences.ILLEGAL_SPECIALIZING_PRODUCER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalSpecializingProducer_label},
// {CDIPreferences.MISSING_TYPE_IN_SPECIALIZING_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingTypeInSpecializingBean_label},
// {CDIPreferences.CONFLICTING_NAME_IN_SPECIALIZING_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_conflictingNameInSpecializingBean_label},
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-14 14:11:58 UTC (rev 22087)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-14 14:55:26 UTC (rev 22088)
@@ -384,6 +384,39 @@
}
/**
+ * 3.2.4. Specializing a session bean
+ * - session bean class annotated @Specializes does not directly extend the bean class of another session bean
+ *
+ * @throws Exception
+ */
+ public void testSpecializingClassDirectlyExtendsSimpleBean() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/directlyExtendsSimpleBean/Tractor_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, 22);
+ }
+
+ /**
+ * 3.2.4. Specializing a session bean
+ * - session bean class annotated @Specializes does not directly extend the bean class of another session bean
+ *
+ * @throws Exception
+ */
+ public void testSpecializingEnterpriseClassImplementsInterfaceAndExtendsNothing() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/implementInterfaceAndExtendsNothing/Donkey_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, 22);
+ }
+
+ /**
+ * 3.2.4. Specializing a session bean
+ * - session bean class annotated @Specializes does not directly extend the bean class of another session bean
+ *
+ * @throws Exception
+ */
+ public void testSpecializingEnterpriseClassDirectlyExtendsNothing() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/broken/directlyExtendsNothing/Cow_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, 22);
+ }
+
+ /**
* 3.5.1. Declaring a resource
* - producer field declaration specifies an EL name (together with one of @Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
*
15 years, 11 months
JBoss Tools SVN: r22087 - trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-05-14 10:11:58 -0400 (Fri, 14 May 2010)
New Revision: 22087
Added:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/HyperlinkDetectorTest.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/ProducerDisposerHyperlinkDetectorTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6251
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java 2010-05-14 14:03:26 UTC (rev 22086)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java 2010-05-14 14:11:58 UTC (rev 22087)
@@ -8,6 +8,7 @@
public static Test suite() {
TestSuite suite = new TestSuite(CdiTextExtAllTests.class.getName());
suite.addTest(InjectedPointHyperlinkDetectorTest.suite());
+ suite.addTest(ProducerDisposerHyperlinkDetectorTest.suite());
return suite;
}
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/HyperlinkDetectorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/HyperlinkDetectorTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/HyperlinkDetectorTest.java 2010-05-14 14:11:58 UTC (rev 22087)
@@ -0,0 +1,140 @@
+package org.jboss.tools.cdi.text.ext.test;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jdt.internal.ui.text.JavaWordFinder;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import org.jboss.tools.common.text.ext.util.AxisUtil;
+
+import junit.framework.TestCase;
+
+public class HyperlinkDetectorTest extends TestCase {
+ protected boolean findOffsetInRegions(int offset, ArrayList<Region> regionList){
+ for(Region region : regionList){
+ if(offset >= region.getOffset() && offset <= region.getOffset()+region.getLength())
+ return true;
+ }
+ return false;
+ }
+
+ protected IEditorPart openFileInEditor(IFile input) {
+ if (input != null && input.exists()) {
+ try {
+ IWorkbenchPage page = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage();
+ return IDE.openEditor(page, input, true);
+ } catch (PartInitException pie) {
+
+ }
+ }
+ return null;
+ }
+
+ class TestData {
+ IDocument document;
+ int offset;
+ IRegion region;
+ String contentType;
+ private IHyperlinkRegion hyperlinkRegion = null;
+
+ TestData (IDocument document, int offset) {
+ this.document = document;
+ this.offset = offset;
+ init();
+ }
+
+ private void init() {
+ this.region = getDocumentRegion();
+ this.contentType = getContentType();
+ this.hyperlinkRegion = getHyperlinkRegion();
+ }
+
+ private IRegion getDocumentRegion() {
+ IRegion region = null;
+ try {
+ region = JavaWordFinder.findWord(document, offset);
+ } catch (Exception x) {}
+
+ return region;
+ }
+
+ public IHyperlinkRegion getHyperlinkRegion() {
+ if (hyperlinkRegion != null)
+ return hyperlinkRegion;
+
+ return new IHyperlinkRegion() {
+ public String getAxis() {
+ return AxisUtil.getAxis(document, region.getOffset());
+ }
+ public String getContentType() {
+ return contentType;
+ }
+ public String getType() {
+ return region.toString();
+ }
+ public int getLength() {
+ return region.getLength();
+ }
+ public int getOffset() {
+ return region.getOffset();
+ }
+ public String toString() {
+ return "[" + getOffset() + "-" + (getOffset() + getLength() - 1) + ":" + getType() + ":" + getContentType() + "]";
+ }
+ };
+ }
+
+ /**
+ * Returns the content type of document
+ *
+ * @param document -
+ * assumes document is not null
+ * @return String content type of given document
+ */
+ private String getContentType() {
+ String type = null;
+
+ IModelManager mgr = StructuredModelManager.getModelManager();
+ IStructuredModel model = null;
+ try {
+ model = mgr.getExistingModelForRead(document);
+ if (model != null) {
+ type = model.getContentTypeIdentifier();
+ }
+ } finally {
+ if (model != null) {
+ model.releaseFromRead();
+ }
+ }
+ return type;
+ }
+ }
+
+ class TestContext implements IAdaptable{
+ ITextEditor editor;
+
+ public TestContext(ITextEditor editor){
+ this.editor = editor;
+ }
+
+ public Object getAdapter(Class adapter) {
+ if(adapter.equals(ITextEditor.class))
+ return editor;
+ return null;
+ }
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/HyperlinkDetectorTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2010-05-14 14:03:26 UTC (rev 22086)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2010-05-14 14:11:58 UTC (rev 22087)
@@ -33,7 +33,7 @@
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
import org.jboss.tools.common.text.ext.util.AxisUtil;
-public class InjectedPointHyperlinkDetectorTest extends TestCase {
+public class InjectedPointHyperlinkDetectorTest extends HyperlinkDetectorTest {
private static final String PROJECT_NAME = "/tests/lookup/injectionpoint";
private static final String FILE_NAME = "JavaSource/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java";
@@ -111,7 +111,7 @@
} else {
for(Region region : regionList){
if(i >= region.getOffset() && i <= region.getOffset()+region.getLength())
- fail("Wrong detection for region - "+region.getOffset()+" : "+region.getLength()+region.getLength()+" region - "+i);
+ fail("Wrong detection for region - "+region.getOffset()+" : "+region.getLength()+" region - "+i);
}
}
}
@@ -121,118 +121,5 @@
documentProvider.disconnect(editorInput);
}
- private boolean findOffsetInRegions(int offset, ArrayList<Region> regionList){
- for(Region region : regionList){
- if(offset >= region.getOffset() && offset <= region.getOffset()+region.getLength())
- return true;
- }
- return false;
- }
- private IEditorPart openFileInEditor(IFile input) {
- if (input != null && input.exists()) {
- try {
- IWorkbenchPage page = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage();
- return IDE.openEditor(page, input, true);
- } catch (PartInitException pie) {
-
- }
- }
- return null;
- }
-
- class TestData {
- IDocument document;
- int offset;
- IRegion region;
- String contentType;
- private IHyperlinkRegion hyperlinkRegion = null;
-
- TestData (IDocument document, int offset) {
- this.document = document;
- this.offset = offset;
- init();
- }
-
- private void init() {
- this.region = getDocumentRegion();
- this.contentType = getContentType();
- this.hyperlinkRegion = getHyperlinkRegion();
- }
-
- private IRegion getDocumentRegion() {
- IRegion region = null;
- try {
- region = JavaWordFinder.findWord(document, offset);
- } catch (Exception x) {}
-
- return region;
- }
-
- public IHyperlinkRegion getHyperlinkRegion() {
- if (hyperlinkRegion != null)
- return hyperlinkRegion;
-
- return new IHyperlinkRegion() {
- public String getAxis() {
- return AxisUtil.getAxis(document, region.getOffset());
- }
- public String getContentType() {
- return contentType;
- }
- public String getType() {
- return region.toString();
- }
- public int getLength() {
- return region.getLength();
- }
- public int getOffset() {
- return region.getOffset();
- }
- public String toString() {
- return "[" + getOffset() + "-" + (getOffset() + getLength() - 1) + ":" + getType() + ":" + getContentType() + "]";
- }
- };
- }
-
- /**
- * Returns the content type of document
- *
- * @param document -
- * assumes document is not null
- * @return String content type of given document
- */
- private String getContentType() {
- String type = null;
-
- IModelManager mgr = StructuredModelManager.getModelManager();
- IStructuredModel model = null;
- try {
- model = mgr.getExistingModelForRead(document);
- if (model != null) {
- type = model.getContentTypeIdentifier();
- }
- } finally {
- if (model != null) {
- model.releaseFromRead();
- }
- }
- return type;
- }
- }
-
- class TestContext implements IAdaptable{
- ITextEditor editor;
-
- public TestContext(ITextEditor editor){
- this.editor = editor;
- }
-
- public Object getAdapter(Class adapter) {
- if(adapter.equals(ITextEditor.class))
- return editor;
- return null;
- }
- }
}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/ProducerDisposerHyperlinkDetectorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/ProducerDisposerHyperlinkDetectorTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/ProducerDisposerHyperlinkDetectorTest.java 2010-05-14 14:11:58 UTC (rev 22087)
@@ -0,0 +1,110 @@
+package org.jboss.tools.cdi.text.ext.test;
+
+import java.util.ArrayList;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.DocumentProviderRegistry;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.jboss.tools.cdi.core.test.tck.TCKTest;
+import org.jboss.tools.cdi.text.ext.hyperlink.ProducerDisposerHyperlinkDetector;
+
+public class ProducerDisposerHyperlinkDetectorTest extends HyperlinkDetectorTest{
+ private static final String PROJECT_NAME = "/tests/decorators/invocation/producer/method";
+ private static final String FILE_NAME = "JavaSource/org/jboss/jsr299/tck/tests/decorators/invocation/producer/method/ProducerImpl.java";
+
+ public static Test suite() {
+ return new TestSuite(ProducerDisposerHyperlinkDetectorTest.class);
+ }
+
+ public void testProducerDisposerHyperlinkDetector() throws Exception {
+ IProject project = TCKTest.importPreparedProject(PROJECT_NAME);
+ doTest(project);
+ TCKTest.cleanProject(PROJECT_NAME);
+ }
+
+ private void doTest(IProject project) throws Exception {
+ IFile javaFile = project.getFile(FILE_NAME);
+
+ TCKTest.assertTrue("The file \"" + FILE_NAME + "\" is not found", (javaFile != null));
+ TCKTest.assertTrue("The file \"" + FILE_NAME + "\" is not found", (javaFile.exists()));
+
+ FileEditorInput editorInput = new FileEditorInput(javaFile);
+
+ IDocumentProvider documentProvider = null;
+ Throwable exception = null;
+ try {
+ documentProvider = DocumentProviderRegistry.getDefault().getDocumentProvider(editorInput);
+ } catch (Exception x) {
+ exception = x;
+ x.printStackTrace();
+ }
+ assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
+
+ assertNotNull("The document provider for the file \"" + FILE_NAME + "\" is not loaded", documentProvider);
+
+ try {
+ documentProvider.connect(editorInput);
+ } catch (Exception x) {
+ exception = x;
+ x.printStackTrace();
+ assertTrue("The document provider is not able to be initialized with the editor input", false);
+ }
+ assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
+
+ IDocument document = documentProvider.getDocument(editorInput);
+
+ assertNotNull("The document for the file \"" + FILE_NAME + "\" is not loaded", document);
+
+ ProducerDisposerHyperlinkDetector elPartitioner = new ProducerDisposerHyperlinkDetector();
+
+ ArrayList<Region> regionList = new ArrayList<Region>();
+ regionList.add(new Region(1199, 8)); // @Produces
+ regionList.add(new Region(1222, 7)); // producer
+ regionList.add(new Region(1291, 7)); // disposer
+
+ IEditorPart part = openFileInEditor(javaFile);
+ ISourceViewer viewer = null;
+ if(part instanceof JavaEditor){
+ viewer = ((JavaEditor)part).getViewer();
+ }
+
+ elPartitioner.setContext(new TestContext((ITextEditor)part));
+
+ int counter = 0;
+ for (int i = 0; i < document.getLength(); i++) {
+ TestData testData = new TestData(document, i);
+ IHyperlink[] links = elPartitioner.detectHyperlinks(viewer, testData.getHyperlinkRegion(), true);
+
+ boolean recognized = links != null;
+
+ if (recognized) {
+ counter++;
+ if(!findOffsetInRegions(i, regionList)){
+ fail("Wrong detection for offset - "+i);
+ }
+ } else {
+ for(Region region : regionList){
+ if(i >= region.getOffset() && i <= region.getOffset()+region.getLength())
+ fail("Wrong detection for region - "+region.getOffset()+" : "+region.getLength()+" region - "+i);
+ }
+ }
+ }
+
+ assertEquals("Wrong recognized region count: ", 25, counter);
+
+ documentProvider.disconnect(editorInput);
+ }
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/ProducerDisposerHyperlinkDetectorTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 11 months
JBoss Tools SVN: r22086 - in trunk/jsf/docs/userguide/en-US: images/editors_features and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2010-05-14 10:03:26 -0400 (Fri, 14 May 2010)
New Revision: 22086
Added:
trunk/jsf/docs/userguide/en-US/images/editors_features/editors_features_27b.png
Modified:
trunk/jsf/docs/userguide/en-US/editors.xml
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/TOOLSDOC-10 -Investigated JBIDE-2118: Added info about EL support of CA to "3.1.2. Content Assist". </p>
</body></html>
Modified: trunk/jsf/docs/userguide/en-US/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/editors.xml 2010-05-14 12:44:22 UTC (rev 22085)
+++ trunk/jsf/docs/userguide/en-US/editors.xml 2010-05-14 14:03:26 UTC (rev 22086)
@@ -819,6 +819,21 @@
</mediaobject>
</figure>
</section>
+ <section id="ContentAssistForEL">
+ <title>Content Assist for EL expressions</title>
+ <para><property>Content Assist</property> also provides an expression language (JSF EL) support.
+ It is used in web application pages to access the <property>JavaBeans</property> components
+ in the page bean and in other beans associated with the web application,
+ such as the session bean and the application bean.</para>
+ <figure>
+ <title>EL Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_27b.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
</section>
@@ -834,6 +849,7 @@
</imageobject>
</mediaobject>
</figure>
+
<para>If XHTML file uses custom Facelets components, the Content Assist should also
be available for them. For details, see <link
linkend="contentAssistForCustomFacelets">"Content Assist for Custom
Added: trunk/jsf/docs/userguide/en-US/images/editors_features/editors_features_27b.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en-US/images/editors_features/editors_features_27b.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 11 months
JBoss Tools SVN: r22085 - in trunk/cdi: tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-05-14 08:44:22 -0400 (Fri, 14 May 2010)
New Revision: 22085
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/FooBroken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/LocalFoo.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added new CDI validation rule: session bean with a parameterized bean class declares any scope other than @Dependent
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-14 12:34:39 UTC (rev 22084)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-14 12:44:22 UTC (rev 22085)
@@ -732,29 +732,44 @@
}
private void validateSessionBean(ISessionBean bean) {
- if(bean.isStateless()) {
- /*
- * 3.2. Session beans
- * - session bean specifies an illegal scope
- * (a stateless session bean must belong to the @Dependent pseudo-scope)
- */
- ITextSourceReference declaration = CDIUtil.getDifferentScopeDeclarationThanDepentend(bean);
- if(declaration!=null) {
- addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, CDIPreferences.ILLEGAL_SCOPE_FOR_SESSION_BEAN, declaration, bean.getResource());
+ IAnnotationDeclaration declaration = CDIUtil.getDifferentScopeDeclarationThanDepentend(bean);
+ if(declaration!=null) {
+ IType type = bean.getBeanClass();
+ try {
+ /*
+ * 3.2. Session beans
+ * - session bean with a parameterized bean class declares any scope other than @Dependent
+ */
+ String[] typeVariables = type.getTypeParameterSignatures();
+ if(typeVariables.length>0) {
+ addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_SESSION_BEAN_WITH_GENERIC_TYPE, CDIPreferences.ILLEGAL_SCOPE_FOR_SESSION_BEAN, declaration, bean.getResource());
+ } else {
+ if(bean.isStateless()) {
+ /*
+ * 3.2. Session beans
+ * - session bean specifies an illegal scope
+ * (a stateless session bean must belong to the @Dependent pseudo-scope)
+ */
+ if(declaration!=null) {
+ addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, CDIPreferences.ILLEGAL_SCOPE_FOR_SESSION_BEAN, declaration, bean.getResource());
+ }
+ } else if(bean.isSingleton()) {
+ /*
+ * 3.2. Session beans
+ * - session bean specifies an illegal scope
+ * (a singleton bean must belong to either the @ApplicationScoped scope or to the @Dependent pseudo-scope)
+ */
+ if(declaration!=null) {
+ declaration = CDIUtil.getDifferentScopeDeclarationThanApplicationScoped(bean);
+ }
+ if(declaration!=null) {
+ addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, CDIPreferences.ILLEGAL_SCOPE_FOR_SESSION_BEAN, declaration, bean.getResource());
+ }
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
}
- } else if(bean.isSingleton()) {
- /*
- * 3.2. Session beans
- * - session bean specifies an illegal scope
- * (a singleton bean must belong to either the @ApplicationScoped scope or to the @Dependent pseudo-scope)
- */
- ITextSourceReference declaration = CDIUtil.getDifferentScopeDeclarationThanDepentend(bean);
- if(declaration!=null) {
- declaration = CDIUtil.getDifferentScopeDeclarationThanApplicationScoped(bean);
- }
- if(declaration!=null) {
- addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, CDIPreferences.ILLEGAL_SCOPE_FOR_SESSION_BEAN, declaration, bean.getResource());
- }
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2010-05-14 12:34:39 UTC (rev 22084)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2010-05-14 12:44:22 UTC (rev 22085)
@@ -43,6 +43,7 @@
public static String STEREOTYPE_DECLARES_MORE_THAN_ONE_SCOPE;
public static String ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD;
public static String ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_GENERIC_TYPE;
+ public static String ILLEGAL_SCOPE_FOR_SESSION_BEAN_WITH_GENERIC_TYPE;
public static String ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN;
public static String ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN;
public static String ILLEGAL_SCOPE_FOR_PRODUCER_METHOD;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-05-14 12:34:39 UTC (rev 22084)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-05-14 12:44:22 UTC (rev 22085)
@@ -22,6 +22,7 @@
STEREOTYPE_DECLARES_MORE_THAN_ONE_SCOPE=Stereotype declares more than one scope
ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD=Managed bean with a public field declares any scope other than @Dependent
ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_GENERIC_TYPE=Managed bean with a parameterized bean class declares any scope other than @Dependent
+ILLEGAL_SCOPE_FOR_SESSION_BEAN_WITH_GENERIC_TYPE=Session bean with a parameterized bean class declares any scope other than @Dependent
ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN=Session bean specifies an illegal scope. A stateless session bean must belong to the @Dependent pseudo-scope.
ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN=Session bean specifies an illegal scope. A singleton bean must belong to either the @ApplicationScoped scope or to the @Dependent pseudo-scope.
ILLEGAL_SCOPE_FOR_PRODUCER_METHOD=Producer method with a parameterized return type with a type variable declares any scope other than @Dependent
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/FooBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/FooBroken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/FooBroken.java 2010-05-14 12:44:22 UTC (rev 22085)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.sessionbeans;
+
+import javax.ejb.Stateful;
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+@Stateful
+class FooBroken<T> implements LocalFoo {
+
+ public void foo() {
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/FooBroken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/LocalFoo.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/LocalFoo.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/LocalFoo.java 2010-05-14 12:44:22 UTC (rev 22085)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.sessionbeans;
+
+import javax.ejb.Local;
+
+@Local
+public interface LocalFoo {
+
+ void foo();
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/sessionbeans/LocalFoo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-14 12:34:39 UTC (rev 22084)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-14 12:44:22 UTC (rev 22085)
@@ -373,6 +373,17 @@
}
/**
+ * 3.2. Session beans
+ * - session bean with a parameterized bean class declares any scope other than @Dependent
+ *
+ * @throws Exception
+ */
+ public void testNonDependentGenericSessionBeanNotOk() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/sessionbeans/FooBroken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.ILLEGAL_SCOPE_FOR_SESSION_BEAN_WITH_GENERIC_TYPE, 6);
+ }
+
+ /**
* 3.5.1. Declaring a resource
* - producer field declaration specifies an EL name (together with one of @Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
*
15 years, 11 months