JBoss Tools SVN: r14080 - 03.04.2009 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: aklimkovich
Date: 2009-03-06 11:43:59 -0500 (Fri, 06 Mar 2009)
New Revision: 14080
Added:
trunk/documentation/qa/reports/Tests 03.04.2009/FileManagement.htm
Log:
Added a file remotely
Added: trunk/documentation/qa/reports/Tests 03.04.2009/FileManagement.htm
===================================================================
--- trunk/documentation/qa/reports/Tests 03.04.2009/FileManagement.htm (rev 0)
+++ trunk/documentation/qa/reports/Tests 03.04.2009/FileManagement.htm 2009-03-06 16:43:59 UTC (rev 14080)
@@ -0,0 +1,172 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD><TITLE>File Management</TITLE>
+<STYLE>H1 {
+ COLOR: #4a5d75; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; BACKGROUND-COLOR: transparent
+}
+H2 {
+ COLOR: #4a5d75; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; BACKGROUND-COLOR: transparent
+}
+TR {
+ BACKGROUND-COLOR: #f5f5f5
+}
+TD {
+ BORDER-RIGHT: dimgray 1px solid; PADDING-RIGHT: 0.5em; BORDER-TOP: dimgray 1px solid; PADDING-LEFT: 0.5em; PADDING-BOTTOM: 0.15em; BORDER-LEFT: dimgray 1px solid; PADDING-TOP: 0.15em; BORDER-BOTTOM: dimgray 1px solid; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; BACKGROUND-COLOR: transparent
+}
+HR {
+ COLOR: #999; BORDER-COLLAPSE: collapse
+}
+BODY {
+ PADDING-RIGHT: 2em; PADDING-LEFT: 2em; FONT-SIZE: 12px; PADDING-BOTTOM: 0em; COLOR: #333; LINE-HEIGHT: 100%; PADDING-TOP: 0em; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; max-width: 55em
+}
+TABLE {
+ BORDER-RIGHT: dimgray 0px solid; BORDER-TOP: dimgray 0px solid; BORDER-LEFT: dimgray 0px solid; COLOR: #4a5d75; BORDER-BOTTOM: dimgray 0px solid; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif
+}
+</STYLE>
+
+<META http-equiv=Content-Type content="text/html; charset=ISO-8859-5">
+<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
+<BODY bgColor=#f5f5f5>
+<CENTER>
+<H1>File Management</H1>
+<TABLE
+style="BORDER-TOP-WIDTH: 1pt; BORDER-LEFT-WIDTH: 1pt; BORDER-BOTTOM-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"
+cellSpacing=0 cellPadding=4 width="100%" align=center>
+ <TBODY>
+ <TR bgColor=gray>
+ <TD><B>Test Name</B></TD>
+ <TD><B>Status</B></TD>
+ <TD><B>Bug Number</B></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Web Descriptor file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Tag Library file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit ANT file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Any Extension file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit JSP file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit HTML file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit XML file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Properties file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Faces Config file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Css file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Struts Config file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit JS file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Tiles file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit XHTML file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Seam Components file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: red; BORDER-RIGHT-WIDTH: 1pt">Failed</TD>
+ <TD
+style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">JBIDE-3963</TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Hibernate 3.0 file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Hibernate 3.0 Configuration file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Hibernate Reverse Engineering File</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt">Create and
+ Edit Validation file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white
+size=1> </FONT></TD></TR></TBODY></TABLE></CENTER></BODY></HTML>
17 years, 1 month
JBoss Tools SVN: r14079 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-03-06 10:49:54 -0500 (Fri, 06 Mar 2009)
New Revision: 14079
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TabbedJavaChoicerFieldEditor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3938
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TabbedJavaChoicerFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TabbedJavaChoicerFieldEditor.java 2009-03-06 14:00:58 UTC (rev 14078)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TabbedJavaChoicerFieldEditor.java 2009-03-06 15:49:54 UTC (rev 14079)
@@ -146,7 +146,7 @@
public void store() {
super.store();
- if (selectedTab==1) eclipseEditor.doStore(); // bugfix 8136 && 8155
+ //if (selectedTab==1) eclipseEditor.doStore(); // bugfix 8136 && 8155
IValueProvider valueProvider = (IValueProvider)propertyEditor.getAdapter(IValueProvider.class);
String selectedClass = (String)valueProvider.getValue();
FavoritesClassController.push(selectedClass);
17 years, 1 month
JBoss Tools SVN: r14078 - trunk/esb/docs/esb_ref_guide/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-03-06 09:00:58 -0500 (Fri, 06 Mar 2009)
New Revision: 14078
Modified:
trunk/esb/docs/esb_ref_guide/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-640 - updating the master_output.xml;
Modified: trunk/esb/docs/esb_ref_guide/en/master_output.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en/master_output.xml 2009-03-06 13:26:50 UTC (rev 14077)
+++ trunk/esb/docs/esb_ref_guide/en/master_output.xml 2009-03-06 14:00:58 UTC (rev 14078)
@@ -18,840 +18,874 @@
<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
-]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
-
- <bookinfo>
- <title>ESB Tools Reference Guide</title>
- <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
- <author><firstname>Tatyana</firstname><surname>Romanovich</surname></author>
-
- <pubdate>April 2008</pubdate>
- <copyright>
- <year>2007</year>
- <year>2009</year>
- <holder>JBoss, a division of Red Hat</holder>
- </copyright>
- <releaseinfo>
- Version: 1.1.0.GA
- </releaseinfo>
-
-<abstract>
- <title></title>
- <para>
- <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/esb_ref_guide/pdf/ES...">PDF version</ulink>
- </para>
-</abstract>
-
-</bookinfo>
- <toc></toc>
-
-
-<chapter id="introduction" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/esb/docs/esb_ref_guide/en/modules/introduction.xml">
- <?dbhtml filename="introduction.html"?>
-
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- <keyword>JBoss Tools</keyword>
- <keyword>JBDS</keyword>
- <keyword>ESB</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Introduction</title>
-
- <section>
-
- <title>What is ESB?</title>
-
- <para>ESB (Enterprise Service Bus) - an abstraction layer on top of implementation of an
- enterprise messaging system that provides the features Service Oriented
- Architectures may be implemented with.</para>
- <para>If you want to develop applications using ESB technology JBoss ESB also meets your
- needs. The JBoss Tools provide an ESB editor and all necessary wizards for creating an ESB
- file.</para>
- <para>In this guide we provide you with the information on JBoss ESB support (installation, configuration and deployment) and usage of ESB Editor which allows you to
- develop an ESB file much faster and with far fewer errors so sparing your time.</para>
-
- </section>
-
- <section>
- <title>Other relevant resources on the topic</title>
-
- <para>You can find a set of benefits and other extra information on:</para>
- <itemizedlist>
- <listitem>
- <para>
- <ulink url="http://www.jboss.org/jbossesb">JBoss ESB</ulink>
- </para>
- </listitem>
- <listitem>
- <para>
- <ulink url="http://wiki.jboss.org/wiki/JBossESB">JBoss Wiki</ulink>
- </para>
- </listitem>
- <listitem>
- <para>
- <ulink url="http://www.jboss.org/jbossesb/docs/index.html">JBoss ESB
- Documentation Library</ulink>
- </para>
- </listitem>
- </itemizedlist>
-
- <para>The latest <property moreinfo="none">JBoss Tools/JBoss Developer Studio</property> documentation
- builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
-
- </section>
-</chapter>
-
-
-<chapter id="esb_support" role="updated" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml">
- <?dbhtml filename="esb_support.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>ESB</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>ESB Support</title>
-
- <para>In this section we will focus on all concepts that <property moreinfo="none">JBoss Tools</property>
- integrate for working with JBoss ESB.</para>
-
- <section>
- <title>ESB Tools Installation</title>
-
- <para>This chapter will provide you with the information on how to install
- JBoss ESB plugin into Eclipse.</para>
-
- <para>ESB Tools come as one module of JBoss Tools project. Since ESB Tools have a
- dependence on other JBoss Tools modules we recommend you to install a bundle
- of all <ulink url="http://labs.jboss.com/tools/download/index.html">JBoss
- Tools plug-ins</ulink>. You can find all necessary installation instructions on JBoss Wiki in the <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">InstallingJBossTools</ulink> section.</para>
- </section>
-
- <section>
- <title>Creating a ESB Project</title>
- <para>In this chapter we suggest a step-by-step walk-through of creating a new
- ESB project. Let's try to create a new JBoss ESB project.</para>
-
- <para>We will show you how to use the ESB Project Creation wizard for creating a new ESB project and setting basic ESB classpath.</para>
-
- <para>Select <emphasis>
- <property moreinfo="none">File >New > Project...</property>
- </emphasis> in the main menu bar or context menu for selected project and
- then <emphasis>
- <property moreinfo="none">ESB > ESB Project</property>
- </emphasis> in the dialog opened:</para>
-
- <figure float="0">
- <title>Select a Wizard dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/01_create_esb_project.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> Clicking <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> brings you to the JBoss ESB Project wizard page where a project name, ESB version and target JBoss Runtime are to be specified. Specify, for example, <emphasis>
- <property moreinfo="none">helloworld</property>
- </emphasis> as a Project name and accept the default ESB version.</para>
- <figure float="0">
- <title>JBoss ESB Project wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/02_create_esb_project.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> Clicking <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> brings you to the ESB facet installation page where you can
- specify Java Source Directory and ESB Content Directory. ESB Content Directory is a folder that contains the most of
- artifacts that an ESB archive needs. You also can configure ESB libraries to the project by selecting a ESB runtime using one of the options:
- </para>
- <para>1. Use <emphasis>
- <property moreinfo="none">Server Supplied ESB Runtime</property>
- </emphasis>
-
- </para>
- <para> 2. Select a ESB runtime from the JBoss ESB runtime list predefined in the preferences
- </para>
- <para>If you choose the first option, make sure that the project has the Target JBoss Runtime set and this runtime has a ESB runtime installed.
- </para>
- <figure float="0">
- <title>Install ESB facet step</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/03_create_esb_project.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Click <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> and a ESB project with the default <emphasis><property moreinfo="none">jboss-esb.xml</property></emphasis>
- will be created. </para>
-
- <figure float="0">
- <title>The generated ESB project structure</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/04_create_esb_project.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="ESB_project_wizard" xreflabel="here">
- <title>Creating ESB Project using JBoss Tools Project Examples Wizard</title>
- <para>JBoss Tools provides a Project Example wizard that is an easy way for users to create some kinds of projects to be used as examples with some predefined structure. Let's start
- creating a ESB project using this wizard.</para>
-
- <para>Before creating a ESB project example create JBoss Runtime with name <emphasis><property moreinfo="none">
- JBoss 4.2 Runtime</property></emphasis>, it will be used by your ESB project example. </para>
-
- <para>Select <emphasis>
- <property moreinfo="none">File >New > Others </property>
- </emphasis> , in the main menu bar or context menu for selected project and
- then <emphasis>
- <property moreinfo="none">JBoss Tools > Project Examples</property>
- </emphasis> in the New dialog:</para>
-
- <figure float="0">
- <title>Select a wizard - Project Examples</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/05_esb_project_example.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> Clicking <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> brings you to the wizard page where you can select a ESB project example from the example list.
- Every ESB example has two projects, one is a ESB project and another is a Java project used to test the ESB project.</para>
- <para>Here is a list of ready examples available:</para>
-
- <itemizedlist>
-
- <listitem><para><emphasis role="bold">JBoss ESB HelloWorld Example</emphasis> - demonstrates the minimal files necessary to make a basic ESB component execute as well as to prove that the ESB os properly configured.</para></listitem>
- <listitem><para><emphasis role="bold">JBoss ESB HelloWorld Action Example</emphasis> - demonstrates the use of multiple action invocations from a single configuration. You can use a single Action class and make multiple method calls or use multiple Action classes. </para></listitem>
- <listitem><para><emphasis role="bold">JBoss ESB HelloWorld File Action Example</emphasis> - demonstrates using the File gateway feature of the JBoss ESB. Files that are found in a particular directory with a particular extension are sent to a JMS queue with actions for processing.</para></listitem>
- <listitem><para><emphasis role="bold">JBoss ESB Web Service consumer1 Example</emphasis> - demonstrates how to consume a 181 Web Service in an ESB action.</para></listitem>
- <listitem><para><emphasis role="bold">JBoss ESB Web Service producer Example</emphasis> - demonstrates how to deploy a JSR181 Webservice endpoint on JBossESB using the SOAPProcessor action.</para></listitem>
- <listitem><para><emphasis role="bold">JBoss ESB Smooks CSV -> XML Example</emphasis> - demonstrates how to transform a comma separated value (CSV) file to an XML.</para></listitem>
- <listitem><para><emphasis role="bold">JBoss ESB Smooks XML -> POJO Example</emphasis> - demonstrates the use of Smooks performing a simpe transformation by converting an XML file into Java POJOs.</para></listitem>
- <listitem><para><emphasis role="bold">JBoss ESB Smooks XML -> XML date-manipulation Example</emphasis> - demonstrates how to manually define and apply a Message Transformation within JBoss ESB.</para></listitem>
- <listitem><para><emphasis role="bold">JBoss ESB Smooks XML -> XML Example</emphasis> - a very basic example of how to manually define and apply a Message Transformation within JBoss ESB. It applies a very simple XSLT to a SampleOrder.xml message and prints the before and after XML to the console. </para></listitem>
-
- </itemizedlist>
-
-
-
- <para>We will take as our example <emphasis><property moreinfo="none">JBoss ESB HelloWorld Example</property> </emphasis> ESB and Client project:</para>
-
-
- <figure float="0">
- <title>JBoss Tools ESB Project Examples</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/06_esb_project_example.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>Choose them using the Ctrl button and then click
- <emphasis><property moreinfo="none">Finish</property></emphasis>. As a result you will get two projects created:</para>
- <figure float="0">
- <title>JBoss ESB Project Examples: helloworld and helloworld_testclient</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/07_esb_project_example.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> Deploy the HelloWorld ESB project and run a test class in the client Java project to see the test result in the Console view.</para>
- </section>
-
- <section>
- <title>Deploying a ESB Project</title>
- <para>In this chapter youwill see how to deploy a ESB project using the WTP deployment framework.</para>
-
- <para>Before deploying the project, open the JBoss Server View by selecting <emphasis><property moreinfo="none">Window > Show View > Other >
- Server > JBoss Server View</property></emphasis>,
- create a JBoss Server in the Server view and start it, and then right click the created JBoss server,
- select <emphasis><property moreinfo="none"> </property> Add and Remove Projects</emphasis>,
- and add the ESB projects you want to deploy from the left side to the right side in the opened dialog. </para>
-
- <figure float="0">
- <title>Add and Remove Projects</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/08_esb_project_deploy.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Click <emphasis><property moreinfo="none">Finish</property> </emphasis> to add the project to the server.
- You also can drag the ESB project from the Project View to the server.</para>
-
- <figure float="0">
- <title>JBoss Server View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/09_esb_runtime_new.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Thus, you have just added the ESB project to the JBoss server module list. Right click the JBoss Server and select <emphasis><property moreinfo="none">Publish</property></emphasis> to publish the project on the server.
- You can check the deploying result in the Console view.</para>
- <para>The <emphasis><property moreinfo="none">Run</property></emphasis> and <emphasis><property moreinfo="none">Debug</property></emphasis> options work on ESB projects causing a (re)deploy for a user designated server.</para>
- <para>You can also use the "Finger touch" for a quick restart of the project without restarting the server:</para>
- <figure float="0">
- <title>Finger Touch button</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/23_finger_touch.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The "Finger" touches descriptors dependent on project (i.e. web.xml for WAR, application.xml for EAR) and now it is also available for jboss-esb.xml in ESB projects.</para>
-
- </section>
-
- <section>
- <title>Creating a ESB File</title>
- <para>In this chapter we suggest a step-by-step walk-through of creating your own
- simple file. Let's try to organize a new ESB file.</para>
-
- <para>We will show you how to use the Creation wizard for creating a new ESB file.</para>
-
- <para>At first you should open any project. Select <emphasis>
- <property moreinfo="none">File >New > Other...</property>
- </emphasis> in the main menu bar or context menu for selected project and
- then <emphasis>
- <property moreinfo="none">ESB > ESB File</property>
- </emphasis> in the New dialog:</para>
-
- <figure float="0">
- <title>Select a wizard - ESB File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_support/01_create_esb.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> Clicking <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> brings you to the wizard page where a folder, a name and a version for the file should be specified. Choose, for example, <emphasis>
- <property moreinfo="none">jboss-esb.xml</property>
- </emphasis> as the name and accept the selected projects folder and the default
- version.</para>
- <figure float="0">
- <title>Folder, Name and Version for ESB file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_support/02_create_esb.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Thus, your file will be created in the selected projects folder by default. If
- you want to change the folder for your future file click <emphasis>
- <property moreinfo="none">Browse...</property>
- </emphasis> button to set needed folder or simply type it.</para>
-
- <para>Clicking on <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> results in the file being generated. The wizard creates one xml
- file.</para>
-
- </section>
-
- <section role="updated">
- <title>Configuring ESB Runtime in Preferences</title>
- <para>In this chapter you will know how to predefine a JBoss ESB runtime on the Preferences page.</para>
-
- <para>You may already know, there are two ways to set JBoss ESB runtime when creating a ESB project,
- one is to use the project target JBoss runtime, and another is to select a JBoss ESB runtime predefined in JBoss Tools preferences.
- Let's configure it.</para>
-
- <para>Select <emphasis>
- <property moreinfo="none">Window >Preferences > JBoss Tools > JBoss ESB Runtime</property>
- </emphasis>, to open the JBoss ESB Runtime Preferences page where you can add, remove and Edit a JBoss ESB runtime.</para>
-
- <figure float="0">
- <title>JBoss ESB Runtimes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/10_esb_runtime.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> Select <emphasis><property moreinfo="none">Add</property></emphasis> to open a dialog where you can specify the JBoss ESB runtime location, name and version number.
- You also can customize the libraries of the runtime by checking the <emphasis><property moreinfo="none">Customize JBoss ESB Runtime jars</property> </emphasis> checkbox. </para>
-
- <figure float="0">
- <title>Configure new JBoss ESB Runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/11_esb_runtime_new.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The new JBoss ESB Runtime will be configured. Click <emphasis> <property moreinfo="none">OK</property> </emphasis> to finish and save the preferences.
- You can use the configuration when creating a JBoss ESB project. </para>
- <para>When a ESB runtime is configured for your ESB project you are able to change it to any other using the classpath container page for ESB runtime. To do that, turn to the Package Explorer view and right-click the "JBoss ESB Runtime" library. Select <emphasis><property moreinfo="none">Properties</property></emphasis> and a table listing all available JBoss ESB runtimes will appear:</para>
-
- <figure float="0">
- <title>Classpath Container Page to change ESB runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/20_classpath_container.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
-
- <para>Choose one of them to set to the ESB project and click <emphasis><property moreinfo="none">Ok</property></emphasis>.</para>
- <para>ESB container allows Source and JavaDoc locations to be set via the Properties dialog on each contained .jar: right-click on any .jar file, select <emphasis><property moreinfo="none">Properties</property></emphasis>. Choose <emphasis><property moreinfo="none">Java Source Attachment</property></emphasis> and select location (folder, JAR or zip) containing new source for the chosen .jar using one of the suggested options (workspace, external folder or file) or enter the path manually:</para>
-
- <figure float="0">
- <title>Classpath Container: Java Source Attachment</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/21_source.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Click on <emphasis><property moreinfo="none">Apply</property></emphasis> and then on <emphasis><property moreinfo="none">Ok</property></emphasis>.</para>
- <para>To change Javadoc Location choose <emphasis><property moreinfo="none">Javadoc Location</property></emphasis> and specify URL to the documentation generated by Javadoc. The Javadoc location will contain a file called <emphasis><property moreinfo="none">package-list</property></emphasis>:</para>
-
- <figure float="0">
- <title>Classpath Container: Javadoc Location</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/22_Javadoc.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Click on <emphasis><property moreinfo="none">Apply</property></emphasis> and then on <emphasis><property moreinfo="none">Ok</property></emphasis>.</para>
-
- </section>
-
-
- <section id="using_SOA">
- <title>Using and Configuring SOA Platform</title>
-
- <para>In this chapter you will know what is JBoss Enterprise SOA Platform and how you can configure it to use for your ESB projects. </para>
-
- <para>JBoss Enterprise SOA Platform delivers a flexible, standards-based platform to integrate applications, SOA services, business events and automate business processes. The SOA Platform integrates specific versions of JBoss ESB, jBPM, Drools and the JBoss Enterprise Application Platform that are certified to work together in a single supported enterprise distribution.</para>
- <para>Having configured JBoss Enterprise SOA Platform for your ESB project you don't need to install and configure ESB server and runtime as they are already included.</para>
-
- <para>Check here to find more details on the platform: <ulink url="http://www.jboss.com/products/platforms/soa">JBoss Enterprise SOA Platform</ulink> and <ulink url="http://www.jboss.com/products/platforms/soa/components">JBoss Enterprise SOA Platform Component Details</ulink>.</para>
- <para>You can find out what is SOA here: <ulink url="http://www.jboss.org/jbossesb/resources/SOABasics.html">Basics of SOA</ulink> and <ulink url="http://www.jboss.org/jbossesb/resources/SOAEOA.html">SOA and EOA</ulink>.</para>
-
- <para>To configure the JBoss Enterprise SOA platform select <emphasis>
- <property moreinfo="none">Window > Preferences > Server > Runtime Enironments</property></emphasis>, that will open the Server Runtime Environments Preferences page where you can add, remove and edit a Server Runtime Environment.</para>
-
- <figure float="0">
- <title>Configure new Server Runtime Environment</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/13NewServerRuntimeEnv.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Select <emphasis><property moreinfo="none">Add</property></emphasis>, choose <emphasis><property moreinfo="none">JBoss 4.2 Runtime</property></emphasis> as a type of runtime environment, check the <emphasis><property moreinfo="none">Create a new local server</property></emphasis> checkbox and click <emphasis><property moreinfo="none">Next</property></emphasis>:</para>
- <figure float="0">
- <title>Type of Server Runtime Environment</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/14typeOfRuntime.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the next step you can specify a name of the server runtime environement and browse to its location. Click <emphasis><property moreinfo="none">Finish</property></emphasis> to add the server runtime environment.</para>
-
-
- <figure float="0">
- <title>New Server Runtime Environment Details</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/15AddNew.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Now you have your SOA platform configured. To check the configuration create a ESB Project using instructions described <xref linkend="ESB_project_wizard"></xref>. As a result you will have two projects created:</para>
-
- <figure float="0">
- <title>Helloworld Projects Created</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/16HelloworldProjects.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Then you will need to add JBoss ESB libraries to your projects to configure the SOA server runtime exactly for your projects. Right-click on your project, select <emphasis><property moreinfo="none">Build Path > Add Libraries</property></emphasis>:</para>
-
- <figure float="0">
- <title>Add Libraries</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/17_Add_new_libraries.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Choose <emphasis><property moreinfo="none">JBoss ESB Libraries</property></emphasis> and click <emphasis><property moreinfo="none">Next</property></emphasis>:</para>
-
- <figure float="0">
- <title>ESB Libraries</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/18_select_libraries.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Select the necessary runtime to add to the project classpath:</para>
-
-
- <figure float="0">
- <title>Select a ESB runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_project/19_select_runtime.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Click <emphasis><property moreinfo="none">Finish</property></emphasis>.</para>
- <para>Now you can deploy your Helloworld project to the server and run a test class in the client Java project to see the test result in the Console view.</para>
-
-
-
-</section>
-
-
-
-
-
-
-
-
-
-
-</chapter>
-
-
-<chapter id="esb_editor" role="updated" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/esb/docs/esb_ref_guide/en/modules/esb_editor.xml" xreflabel="esb_editor">
- <?dbhtml filename="esbEditor.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss ESB</keyword>
- <keyword>Editor</keyword>
- <keyword>ESB</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>ESB Editor</title>
-
- <para> ESB editor has lots of useful features, they are described in details in this chapter. In
- addition you'll get to know with how <property moreinfo="none">ESB Editor</property> uses combined
- visual and source editing of esb files.</para>
-
- <section id="esb_file" role="updated">
-
- <title>ESB File Editor</title>
- <para><property moreinfo="none">ESB File Editor</property> is a powerful and customizable tool. ESB File
- Editor allows developing an application using ESB technology.</para>
-
- <para>ESB file editor has two tabs: Tree and Source.</para>
-
- <para>You can switch to Tree. The Tree view for the editor displays all ESB artifacts in a
- tree format. By selecting any node you can see and edit its properties which will appear
- in the right-hand area. For example, a Provider:</para>
- <figure float="0">
- <title>Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/01_esb_tree_view.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can easily switch from Tree to Source by selecting the Source tab at the bottom of
- the editor and work in <property moreinfo="none">Source view</property>.</para>
-
- <figure float="0" id="sourceView">
- <title>Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/02_esb_source_view.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Source view for the editor displays a text content of the ESB file. It is always
- synchronized with <property moreinfo="none">Tree view</property>, so any changes made in one of the
- views will immediately appear in the other.</para>
-
- <para>No matter what view you select, you get full integration with <property moreinfo="none">Outline
- view</property>. For example, you can work in the Source view with the help of the
- Outline view. The Outline view shows a tree structure of the ESB file. Simply select any
- element in the <property moreinfo="none">Outline view</property> and it will jump to the same place in
- the Source editor, so you can navigate through the source code with Outline view.</para>
- <figure float="0">
- <title>Outline View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/03_esb_outline_view.png" scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Adding, editing or deleting of some artifacts operations are available right in the
- <property moreinfo="none">Tree view</property> . Right-click any node and select one of the
- available actions in the context menu. For example, you can easily add a new Provider:</para>
- <para></para>
- <figure float="0">
- <title>Adding New Provider</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/04_esb_add_provider.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Then you can add Channels and Properties for the Providers the same way or using the forms with <property moreinfo="none">Add</property>, <property moreinfo="none">Edit</property> and
- <property moreinfo="none">Remove</property> buttons to the right.</para>
-
- <para>You can easily add a new Service too:</para>
- <figure float="0">
- <title>Adding New Service</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/05_esb_add_service.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The same way you can create a listener for service and other elements of ESB:</para>
- <figure float="0">
- <title>Adding New Listener for Service</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/06_esb_add_listener.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The same actions can be done in the right part of <property moreinfo="none">Tree view</property> tab
- (Form editor) using <property moreinfo="none">Add</property>, <property moreinfo="none">Edit</property> and
- <property moreinfo="none">Remove</property> buttons.</para>
-
-
- <para>In order to add a new generic Action to your ESB XML file you should select the
- Actions node under the Services, then right-click and choose <emphasis>
- <property moreinfo="none">New > Generic Action</property>. </emphasis></para>
-
- <figure float="0">
- <title>Adding New Action in the Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/11_esb_editor.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Or instead make use of <emphasis>
- <property moreinfo="none">Add...</property>
- </emphasis> button in the <property moreinfo="none">Form editor</property> on the left.</para>
- <figure float="0">
- <title>Adding New Action in the Form Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/12_esb_editor.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As you can see on the bath figures above, the context menu will also prompt you to
- insert one of the Actions that are supplied out-of-the-box with <property moreinfo="none">JBoss
- ESB</property>. After choosing one an appeared <property moreinfo="none">New Action wizard</property>
- will ask you to fill out a name field and other fields specific for each Action
- property. For example, for <emphasis>
- <property moreinfo="none">Content Based Router</property>
- </emphasis> Action the wizard looks as follows:</para>
-
- <figure float="0">
- <title>New Action Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/13_esb_editor.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After confirming creating the Action you can see it in the Tree under the <emphasis>
- <property moreinfo="none">Actions</property>
- </emphasis> node and preview as well as edit its settings in the <property moreinfo="none">Form
- editor</property> on the left.</para>
-
- <figure float="0">
- <title>Form Editor for Content Based Router</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/14_esb_editor.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para><property moreinfo="none">ESB editor</property> can recognize some specific objects. On the figure you
- can see <emphasis>org.jboss.soa.esb.actions.ContentBasedRouter</emphasis> in the <emphasis>
- <property moreinfo="none">Class</property>
- </emphasis> section.</para>
-
- </section>
-
- <section id="esb_editors_features">
-
- <title>ESB Editors Features</title>
- <para>JBoss ESB tooling has powerful editor features that help you easily make use of
- content and code assist.</para>
- <para>This last chapter covers capabilities on how you can use ESB editor.</para>
-
- <section id="ESBsyntaxvalidation84">
-
- <title>ESB syntax validation</title>
- <para>When working in <property moreinfo="none">JBoss ESB editor</property> you are constantly provided
- with feedback and contextual error checking as you type. In the Source viewer, if at
- any point a tag is incorrect or incomplete, an error will be indicated next to the
- line and also in the <property moreinfo="none">Problems view</property> below.</para>
- </section>
-
- <section id="ESBSupportXMLSchema">
- <title>Support for XML Schema</title>
-
- <para>JBoss ESB Framework fully <link linkend="sourceView">supports XML files based on
- schemas as well as DTDs</link>.</para>
- <note><title>Note:</title>
- <para>The schema used behind ESB editor now uses the latest version available (from SOA-P 4.3). This removes the errors/warnings some users have reported seeing when using SOA-P specific esb.xml files.</para> </note>
-
- </section>
-
- <!--<section id="OpenOnSelection">
-
- <title>OpenOn</title>
-
- <para><property>OpenOn</property> let's you easily navigate through your
- project without using the Package Explorer view (project tree). With OpenOn, you can
- simply click on a reference to another file and that file will be opened.</para>
-
- <para>OpenOn is available for the XML files </para>
-
- <para>Press and hold down the Ctrl key. As you move the mouse cursor over different
- file references in the file, they display an underline. When you have the mouse
- cursor over the name of the file you want to open, click and the file will open
- in its own editor. In this example the managed bean NameBean will open.</para>
-
- </section>
- -->
-
- <section id="ESBContentAssist">
-
- <title>Content Assist for ESB XML file</title>
-
- <para>When you work with any ESB XML file <property moreinfo="none">Content Assist</property> is
- available to help you. It provides pop-up tip to help you complete your code
- statements. It allows you to write your code faster and with more accuracy. Content
- assist is always available in the Source mode. Simply type <emphasis>
- <property moreinfo="none">Ctrl-Space</property>
- </emphasis> to see what is available.</para>
-
- <para>Content Assist for ESB XML file:</para>
- <figure float="0">
- <title>Content Assist for ESB XML file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/08_esb_features.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Content Assist for attributes:</para>
- <figure float="0">
- <title>Content Assist for attributes:</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/09_esb_features.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <!-- </section>
-
- <section id="ContentAssistWithinTreeEditor">
-
- <title>Content Assist within Tree ESB Editor</title>
-
- <para>JBoss Developer Studio also provides Content Assist when working within the Tree ESB editor.
- Just click <emphasis><property>Ctrl-Space</property>.</emphasis></para>
- <figure>
- <title>Content Assist in Tree ESB Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/esb_file/09_editors_features.png" scale="85"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section> -->
- </section>
-
- <section id="FullControlOverSourceFiles-SynchronizedSourcAndVisualEditing">
-
- <title>Synchronized Source and Visual Editing</title>
-
- <para>ESB file can be edited in either source or extra visual modes at the same time.</para>
-
- <para>JBoss Tools provide you two different editors to speed your development: a
- graphical view (<property moreinfo="none">Tree</property>) and source (<property moreinfo="none">Source</property>).
- At the same time, you always have full control over esb source file. Any changes you
- make in the source view will immediately appear in the tree view. Both views are
- synchronized, you can edit the file in any view.</para>
-
- <figure float="0">
- <title>Two Views are Synchronized</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/esb_editor/10_esb_features.png" scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In summary, this reference supplies you with all necessary information on the
- functionality that JBoss ESB Editor provides for work with JBoss ESB.</para>
- </section>
- </section>
-</chapter>
-
-
-</book>
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>ESB Tools Reference Guide</title>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+ <author><firstname>Tatyana</firstname><surname>Romanovich</surname></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2009</year>
+ <holder>JBoss, a division of Red Hat</holder>
+ </copyright>
+ <releaseinfo>
+ Version: 1.1.0.GA
+ </releaseinfo>
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/esb_ref_guide/pdf/ES...">PDF version</ulink>
+ </para>
+</abstract>
+
+</bookinfo>
+ <toc></toc>
+
+
+<chapter id="introduction" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/esb/docs/esb_ref_guide/en/modules/introduction.xml">
+ <?dbhtml filename="introduction.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>ESB</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Introduction</title>
+
+ <section>
+
+ <title>What is ESB?</title>
+
+ <para>ESB (Enterprise Service Bus) - an abstraction layer on top of implementation of an
+ enterprise messaging system that provides the features Service Oriented
+ Architectures may be implemented with.</para>
+ <para>If you want to develop applications using ESB technology JBoss ESB also meets your
+ needs. The JBoss Tools provide an ESB editor and all necessary wizards for creating an ESB
+ file.</para>
+ <para>In this guide we provide you with the information on JBoss ESB support (installation, configuration and deployment) and usage of ESB Editor which allows you to
+ develop an ESB file much faster and with far fewer errors so sparing your time.</para>
+
+ </section>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+
+ <para>You can find a set of benefits and other extra information on:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.org/jbossesb">JBoss ESB</ulink>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://wiki.jboss.org/wiki/JBossESB">JBoss Wiki</ulink>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.org/jbossesb/docs/index.html">JBoss ESB
+ Documentation Library</ulink>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The latest <property moreinfo="none">JBoss Tools/JBoss Developer Studio</property> documentation
+ builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+
+ </section>
+</chapter>
+
+
+<chapter id="esb_support" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml">
+ <?dbhtml filename="esb_support.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>ESB</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>ESB Support</title>
+
+ <para>In this section we will focus on all concepts that <property moreinfo="none">JBoss Tools</property>
+ integrate for working with JBoss ESB.</para>
+
+ <section>
+ <title>ESB Tools Installation</title>
+
+ <para>This chapter will provide you with the information on how to install
+ JBoss ESB plugin into Eclipse.</para>
+
+ <para>ESB Tools come as one module of JBoss Tools project. Since ESB Tools have a
+ dependence on other JBoss Tools modules we recommend you to install a bundle
+ of all <ulink url="http://labs.jboss.com/tools/download/index.html">JBoss
+ Tools plug-ins</ulink>. You can find all necessary installation instructions on JBoss Wiki in the <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">InstallingJBossTools</ulink> section.</para>
+ </section>
+
+ <section>
+ <title>Creating a ESB Project</title>
+ <para>In this chapter we suggest a step-by-step walk-through of creating a new
+ ESB project. Let's try to create a new JBoss ESB project.</para>
+
+ <para>We will show you how to use the ESB Project Creation wizard for creating a new ESB project and setting basic ESB classpath.</para>
+
+ <para>Select <emphasis>
+ <property moreinfo="none">File >New > Project...</property>
+ </emphasis> in the main menu bar or context menu for selected project and
+ then <emphasis>
+ <property moreinfo="none">ESB > ESB Project</property>
+ </emphasis> in the dialog opened:</para>
+
+ <figure float="0">
+ <title>Select a Wizard dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/01_create_esb_project.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Clicking <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> brings you to the JBoss ESB Project wizard page where a project name, ESB version and target JBoss Runtime are to be specified. Specify, for example, <emphasis>
+ <property moreinfo="none">helloworld</property>
+ </emphasis> as a Project name and accept the default ESB version.</para>
+ <figure float="0">
+ <title>JBoss ESB Project wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/02_create_esb_project.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Clicking <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> brings you to the ESB facet installation page where you can
+ specify Java Source Directory and ESB Content Directory. ESB Content Directory is a folder that contains the most of
+ artifacts that an ESB archive needs. You also can configure ESB libraries to the project by selecting a ESB runtime using one of the options:
+ </para>
+ <para>1. Use <emphasis>
+ <property moreinfo="none">Server Supplied ESB Runtime</property>
+ </emphasis>
+
+ </para>
+ <para> 2. Select a ESB runtime from the JBoss ESB runtime list predefined in the preferences
+ </para>
+ <para>If you choose the first option, make sure that the project has the Target JBoss Runtime set and this runtime has a ESB runtime installed.
+ </para>
+ <figure float="0">
+ <title>Install ESB facet step</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/03_create_esb_project.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> and a ESB project with the default <emphasis><property moreinfo="none">jboss-esb.xml</property></emphasis>
+ will be created. </para>
+
+ <figure float="0">
+ <title>The generated ESB project structure</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/04_create_esb_project.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="ESB_project_wizard" xreflabel="here">
+ <title>Creating ESB Project using JBoss Tools Project Examples Wizard</title>
+ <para>JBoss Tools provides a Project Example wizard that is an easy way for users to create some kinds of projects to be used as examples with some predefined structure. Let's start
+ creating a ESB project using this wizard.</para>
+
+ <para>Before creating a ESB project example create JBoss Runtime with name <emphasis><property moreinfo="none">
+ JBoss 4.2 Runtime</property></emphasis>, it will be used by your ESB project example. </para>
+
+ <para>Select <emphasis>
+ <property moreinfo="none">File >New > Others </property>
+ </emphasis> , in the main menu bar or context menu for selected project and
+ then <emphasis>
+ <property moreinfo="none">JBoss Tools > Project Examples</property>
+ </emphasis> in the New dialog:</para>
+
+ <figure float="0">
+ <title>Select a wizard - Project Examples</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/05_esb_project_example.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Clicking <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> brings you to the wizard page where you can select a ESB project example from the example list.
+ Every ESB example has two projects, one is a ESB project and another is a Java project used to test the ESB project.</para>
+ <para>Here is a list of ready examples available:</para>
+
+ <itemizedlist>
+
+ <listitem><para><emphasis role="bold">JBoss ESB HelloWorld Example</emphasis> - demonstrates the minimal files necessary to make a basic ESB component execute as well as to prove that the ESB os properly configured.</para></listitem>
+ <listitem><para><emphasis role="bold">JBoss ESB HelloWorld Action Example</emphasis> - demonstrates the use of multiple action invocations from a single configuration. You can use a single Action class and make multiple method calls or use multiple Action classes. </para></listitem>
+ <listitem><para><emphasis role="bold">JBoss ESB HelloWorld File Action Example</emphasis> - demonstrates using the File gateway feature of the JBoss ESB. Files that are found in a particular directory with a particular extension are sent to a JMS queue with actions for processing.</para></listitem>
+ <listitem><para><emphasis role="bold">JBoss ESB Web Service consumer1 Example</emphasis> - demonstrates how to consume a 181 Web Service in an ESB action.</para></listitem>
+ <listitem><para><emphasis role="bold">JBoss ESB Web Service producer Example</emphasis> - demonstrates how to deploy a JSR181 Webservice endpoint on JBossESB using the SOAPProcessor action.</para></listitem>
+ <listitem><para><emphasis role="bold">JBoss ESB Smooks CSV -> XML Example</emphasis> - demonstrates how to transform a comma separated value (CSV) file to an XML.</para></listitem>
+ <listitem><para><emphasis role="bold">JBoss ESB Smooks XML -> POJO Example</emphasis> - demonstrates the use of Smooks performing a simpe transformation by converting an XML file into Java POJOs.</para></listitem>
+ <listitem><para><emphasis role="bold">JBoss ESB Smooks XML -> XML date-manipulation Example</emphasis> - demonstrates how to manually define and apply a Message Transformation within JBoss ESB.</para></listitem>
+ <listitem><para><emphasis role="bold">JBoss ESB Smooks XML -> XML Example</emphasis> - a very basic example of how to manually define and apply a Message Transformation within JBoss ESB. It applies a very simple XSLT to a SampleOrder.xml message and prints the before and after XML to the console. </para></listitem>
+
+ </itemizedlist>
+
+
+
+ <para>We will take as our example <emphasis><property moreinfo="none">JBoss ESB HelloWorld Example</property> </emphasis> ESB and Client project:</para>
+
+
+ <figure float="0">
+ <title>JBoss Tools ESB Project Examples</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/06_esb_project_example.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>Choose them using the Ctrl button and then click
+ <emphasis><property moreinfo="none">Finish</property></emphasis>. As a result you will get two projects created:</para>
+ <figure float="0">
+ <title>JBoss ESB Project Examples: helloworld and helloworld_testclient</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/07_esb_project_example.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Deploy the HelloWorld ESB project and run a test class in the client Java project to see the test result in the Console view.</para>
+ </section>
+
+ <section>
+ <title>Deploying a ESB Project</title>
+ <para>In this chapter youwill see how to deploy a ESB project using the WTP deployment framework.</para>
+
+ <para>Before deploying the project, open the JBoss Server View by selecting <emphasis><property moreinfo="none">Window > Show View > Other >
+ Server > JBoss Server View</property></emphasis>,
+ create a JBoss Server in the Server view and start it, and then right click the created JBoss server,
+ select <emphasis><property moreinfo="none"> </property> Add and Remove Projects</emphasis>,
+ and add the ESB projects you want to deploy from the left side to the right side in the opened dialog. </para>
+
+ <figure float="0">
+ <title>Add and Remove Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/08_esb_project_deploy.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click <emphasis><property moreinfo="none">Finish</property> </emphasis> to add the project to the server.
+ You also can drag the ESB project from the Project View to the server.</para>
+
+ <figure float="0">
+ <title>JBoss Server View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/09_esb_runtime_new.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Thus, you have just added the ESB project to the JBoss server module list. Right click the JBoss Server and select <emphasis><property moreinfo="none">Publish</property></emphasis> to publish the project on the server.
+ You can check the deploying result in the Console view.</para>
+ <para>The <emphasis><property moreinfo="none">Run</property></emphasis> and <emphasis><property moreinfo="none">Debug</property></emphasis> options work on ESB projects causing a (re)deploy for a user designated server.</para>
+ <para>You can also use the "Finger touch" for a quick restart of the project without restarting the server:</para>
+ <figure float="0">
+ <title>Finger Touch button</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/23_finger_touch.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The "Finger" touches descriptors dependent on project (i.e. web.xml for WAR, application.xml for EAR) and now it is also available for jboss-esb.xml in ESB projects.</para>
+ <para>You can also deploy your ESB project as an .esb archive. Right-click on the project, choose <emphasis><property moreinfo="none">Export</property></emphasis>:</para>
+
+ <figure float="0">
+ <title>Export of ESB project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/24_export_button.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Choose <emphasis><property moreinfo="none">ESB</property></emphasis> > <emphasis><property moreinfo="none">ESB File</property></emphasis> and click <emphasis><property moreinfo="none">Next</property></emphasis>:</para>
+
+ <figure float="0"><title>Choosing ESB File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/25_esb_file.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>And finally export the ESB project to the file system: choose the destination, choose the target runtime if need a specific one and make the appropriate settings for the archive. Then click <emphasis><property moreinfo="none">Finish</property></emphasis>.</para>
+
+ <figure float="0"><title>ESB Export</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/26_esb_export.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Your project is deployed as an .esb archive.</para>
+ <para>An ESB archive can be created for ESB projects only. It is also possible to deploy an .esb archive to a JBoss AS based server with JBoss ESB installed.</para>
+
+
+ </section>
+
+ <section>
+ <title>Creating a ESB File</title>
+ <para>In this chapter we suggest a step-by-step walk-through of creating your own
+ simple file. Let's try to organize a new ESB file.</para>
+
+ <para>We will show you how to use the Creation wizard for creating a new ESB file.</para>
+
+ <para>At first you should open any project. Select <emphasis>
+ <property moreinfo="none">File >New > Other...</property>
+ </emphasis> in the main menu bar or context menu for selected project and
+ then <emphasis>
+ <property moreinfo="none">ESB > ESB File</property>
+ </emphasis> in the New dialog:</para>
+
+ <figure float="0">
+ <title>Select a wizard - ESB File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_support/01_create_esb.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Clicking <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> brings you to the wizard page where a folder, a name and a version for the file should be specified. Choose, for example, <emphasis>
+ <property moreinfo="none">jboss-esb.xml</property>
+ </emphasis> as the name and accept the selected projects folder and the default
+ version.</para>
+ <figure float="0">
+ <title>Folder, Name and Version for ESB file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_support/02_create_esb.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Thus, your file will be created in the selected projects folder by default. If
+ you want to change the folder for your future file click <emphasis>
+ <property moreinfo="none">Browse...</property>
+ </emphasis> button to set needed folder or simply type it.</para>
+
+ <para>Clicking on <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> results in the file being generated. The wizard creates one xml
+ file.</para>
+
+ </section>
+
+ <section>
+ <title>Configuring ESB Runtime in Preferences</title>
+ <para>In this chapter you will know how to predefine a JBoss ESB runtime on the Preferences page.</para>
+
+ <para>You may already know, there are two ways to set JBoss ESB runtime when creating a ESB project,
+ one is to use the project target JBoss runtime, and another is to select a JBoss ESB runtime predefined in JBoss Tools preferences.
+ Let's configure it.</para>
+
+ <para>Select <emphasis>
+ <property moreinfo="none">Window >Preferences > JBoss Tools > JBoss ESB Runtime</property>
+ </emphasis>, to open the JBoss ESB Runtime Preferences page where you can add, remove and Edit a JBoss ESB runtime.</para>
+
+ <figure float="0">
+ <title>JBoss ESB Runtimes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/10_esb_runtime.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Select <emphasis><property moreinfo="none">Add</property></emphasis> to open a dialog where you can specify the JBoss ESB runtime location, name and version number.
+ You also can customize the libraries of the runtime by checking the <emphasis><property moreinfo="none">Customize JBoss ESB Runtime jars</property> </emphasis> checkbox. </para>
+
+ <figure float="0">
+ <title>Configure new JBoss ESB Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/11_esb_runtime_new.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The new JBoss ESB Runtime will be configured. Click <emphasis> <property moreinfo="none">OK</property> </emphasis> to finish and save the preferences.
+ You can use the configuration when creating a JBoss ESB project. </para>
+ <para>When a ESB runtime is configured for your ESB project you are able to change it to any other using the classpath container page for ESB runtime. To do that, turn to the Package Explorer view and right-click the "JBoss ESB Runtime" library. Select <emphasis><property moreinfo="none">Properties</property></emphasis> and a table listing all available JBoss ESB runtimes will appear:</para>
+
+ <figure float="0">
+ <title>Classpath Container Page to change ESB runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/20_classpath_container.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+ <para>Choose one of them to set to the ESB project and click <emphasis><property moreinfo="none">Ok</property></emphasis>.</para>
+ <para>ESB container allows Source and JavaDoc locations to be set via the Properties dialog on each contained .jar: right-click on any .jar file, select <emphasis><property moreinfo="none">Properties</property></emphasis>. Choose <emphasis><property moreinfo="none">Java Source Attachment</property></emphasis> and select location (folder, JAR or zip) containing new source for the chosen .jar using one of the suggested options (workspace, external folder or file) or enter the path manually:</para>
+
+ <figure float="0">
+ <title>Classpath Container: Java Source Attachment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/21_source.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on <emphasis><property moreinfo="none">Apply</property></emphasis> and then on <emphasis><property moreinfo="none">Ok</property></emphasis>.</para>
+ <para>To change Javadoc Location choose <emphasis><property moreinfo="none">Javadoc Location</property></emphasis> and specify URL to the documentation generated by Javadoc. The Javadoc location will contain a file called <emphasis><property moreinfo="none">package-list</property></emphasis>:</para>
+
+ <figure float="0">
+ <title>Classpath Container: Javadoc Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/22_Javadoc.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on <emphasis><property moreinfo="none">Apply</property></emphasis> and then on <emphasis><property moreinfo="none">Ok</property></emphasis>.</para>
+
+ </section>
+
+
+ <section id="using_SOA">
+ <title>Using and Configuring SOA Platform</title>
+
+ <para>In this chapter you will know what is JBoss Enterprise SOA Platform and how you can configure it to use for your ESB projects. </para>
+
+ <para>JBoss Enterprise SOA Platform delivers a flexible, standards-based platform to integrate applications, SOA services, business events and automate business processes. The SOA Platform integrates specific versions of JBoss ESB, jBPM, Drools and the JBoss Enterprise Application Platform that are certified to work together in a single supported enterprise distribution.</para>
+ <para>Having configured JBoss Enterprise SOA Platform for your ESB project you don't need to install and configure ESB server and runtime as they are already included.</para>
+
+ <para>Check here to find more details on the platform: <ulink url="http://www.jboss.com/products/platforms/soa">JBoss Enterprise SOA Platform</ulink> and <ulink url="http://www.jboss.com/products/platforms/soa/components">JBoss Enterprise SOA Platform Component Details</ulink>.</para>
+ <para>You can find out what is SOA here: <ulink url="http://www.jboss.org/jbossesb/resources/SOABasics.html">Basics of SOA</ulink> and <ulink url="http://www.jboss.org/jbossesb/resources/SOAEOA.html">SOA and EOA</ulink>.</para>
+
+ <para>To configure the JBoss Enterprise SOA platform select <emphasis>
+ <property moreinfo="none">Window > Preferences > Server > Runtime Enironments</property></emphasis>, that will open the Server Runtime Environments Preferences page where you can add, remove and edit a Server Runtime Environment.</para>
+
+ <figure float="0">
+ <title>Configure new Server Runtime Environment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/13NewServerRuntimeEnv.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select <emphasis><property moreinfo="none">Add</property></emphasis>, choose <emphasis><property moreinfo="none">JBoss 4.2 Runtime</property></emphasis> as a type of runtime environment, check the <emphasis><property moreinfo="none">Create a new local server</property></emphasis> checkbox and click <emphasis><property moreinfo="none">Next</property></emphasis>:</para>
+ <figure float="0">
+ <title>Type of Server Runtime Environment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/14typeOfRuntime.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the next step you can specify a name of the server runtime environement and browse to its location. Click <emphasis><property moreinfo="none">Finish</property></emphasis> to add the server runtime environment.</para>
+
+
+ <figure float="0">
+ <title>New Server Runtime Environment Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/15AddNew.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now you have your SOA platform configured. To check the configuration create a ESB Project using instructions described <xref linkend="ESB_project_wizard"></xref>. As a result you will have two projects created:</para>
+
+ <figure float="0">
+ <title>Helloworld Projects Created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/16HelloworldProjects.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Then you will need to add JBoss ESB libraries to your projects to configure the SOA server runtime exactly for your projects. Right-click on your project, select <emphasis><property moreinfo="none">Build Path > Add Libraries</property></emphasis>:</para>
+
+ <figure float="0">
+ <title>Add Libraries</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/17_Add_new_libraries.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Choose <emphasis><property moreinfo="none">JBoss ESB Libraries</property></emphasis> and click <emphasis><property moreinfo="none">Next</property></emphasis>:</para>
+
+ <figure float="0">
+ <title>ESB Libraries</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/18_select_libraries.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select the necessary runtime to add to the project classpath:</para>
+
+
+ <figure float="0">
+ <title>Select a ESB runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/19_select_runtime.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click <emphasis><property moreinfo="none">Finish</property></emphasis>.</para>
+ <para>Now you can deploy your Helloworld project to the server and run a test class in the client Java project to see the test result in the Console view.</para>
+
+
+
+</section>
+
+
+
+
+
+
+
+
+
+
+</chapter>
+
+
+<chapter id="esb_editor" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/esb/docs/esb_ref_guide/en/modules/esb_editor.xml" xreflabel="esb_editor">
+ <?dbhtml filename="esbEditor.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss ESB</keyword>
+ <keyword>Editor</keyword>
+ <keyword>ESB</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>ESB Editor</title>
+
+ <para> ESB editor has lots of useful features, they are described in details in this chapter. In
+ addition you'll get to know with how <property moreinfo="none">ESB Editor</property> uses combined
+ visual and source editing of esb files.</para>
+
+ <section id="esb_file">
+
+ <title>ESB File Editor</title>
+ <para><property moreinfo="none">ESB File Editor</property> is a powerful and customizable tool. ESB File
+ Editor allows developing an application using ESB technology.</para>
+
+ <para>ESB file editor has two tabs: Tree and Source.</para>
+
+ <para>You can switch to Tree. The Tree view for the editor displays all ESB artifacts in a
+ tree format. By selecting any node you can see and edit its properties which will appear
+ in the right-hand area. For example, a Provider:</para>
+ <figure float="0">
+ <title>Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/01_esb_tree_view.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can easily switch from Tree to Source by selecting the Source tab at the bottom of
+ the editor and work in <property moreinfo="none">Source view</property>.</para>
+
+ <figure float="0" id="sourceView">
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/02_esb_source_view.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The Source view for the editor displays a text content of the ESB file. It is always
+ synchronized with <property moreinfo="none">Tree view</property>, so any changes made in one of the
+ views will immediately appear in the other.</para>
+
+ <para>No matter what view you select, you get full integration with <property moreinfo="none">Outline
+ view</property>. For example, you can work in the Source view with the help of the
+ Outline view. The Outline view shows a tree structure of the ESB file. Simply select any
+ element in the <property moreinfo="none">Outline view</property> and it will jump to the same place in
+ the Source editor, so you can navigate through the source code with Outline view.</para>
+ <figure float="0">
+ <title>Outline View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/03_esb_outline_view.png" scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Adding, editing or deleting of some artifacts operations are available right in the
+ <property moreinfo="none">Tree view</property> . Right-click any node and select one of the
+ available actions in the context menu. For example, you can easily add a new Provider:</para>
+ <para></para>
+ <figure float="0">
+ <title>Adding New Provider</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/04_esb_add_provider.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Then you can add Channels and Properties for the Providers the same way or using the forms with <property moreinfo="none">Add</property>, <property moreinfo="none">Edit</property> and
+ <property moreinfo="none">Remove</property> buttons to the right.</para>
+
+ <para>You can easily add a new Service too:</para>
+ <figure float="0">
+ <title>Adding New Service</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/05_esb_add_service.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The same way you can create a listener for service and other elements of ESB:</para>
+ <figure float="0">
+ <title>Adding New Listener for Service</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/06_esb_add_listener.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The same actions can be done in the right part of <property moreinfo="none">Tree view</property> tab
+ (Form editor) using <property moreinfo="none">Add</property>, <property moreinfo="none">Edit</property> and
+ <property moreinfo="none">Remove</property> buttons.</para>
+
+
+ <para>In order to add a new generic Action to your ESB XML file you should select the
+ Actions node under the Services, then right-click and choose <emphasis>
+ <property moreinfo="none">New > Generic Action</property>. </emphasis></para>
+
+ <figure float="0">
+ <title>Adding New Action in the Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/11_esb_editor.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Or instead make use of <emphasis>
+ <property moreinfo="none">Add...</property>
+ </emphasis> button in the <property moreinfo="none">Form editor</property> on the left.</para>
+ <figure float="0">
+ <title>Adding New Action in the Form Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/12_esb_editor.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see on the bath figures above, the context menu will also prompt you to
+ insert one of the Actions that are supplied out-of-the-box with <property moreinfo="none">JBoss
+ ESB</property>. After choosing one an appeared <property moreinfo="none">New Action wizard</property>
+ will ask you to fill out a name field and other fields specific for each Action
+ property. For example, for <emphasis>
+ <property moreinfo="none">Content Based Router</property>
+ </emphasis> Action the wizard looks as follows:</para>
+
+ <figure float="0">
+ <title>New Action Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/13_esb_editor.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After confirming creating the Action you can see it in the Tree under the <emphasis>
+ <property moreinfo="none">Actions</property>
+ </emphasis> node and preview as well as edit its settings in the <property moreinfo="none">Form
+ editor</property> on the left.</para>
+
+ <figure float="0">
+ <title>Form Editor for Content Based Router</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/14_esb_editor.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><property moreinfo="none">ESB editor</property> can recognize some specific objects. On the figure you
+ can see <emphasis>org.jboss.soa.esb.actions.ContentBasedRouter</emphasis> in the <emphasis>
+ <property moreinfo="none">Class</property>
+ </emphasis> section.</para>
+
+ </section>
+
+ <section id="esb_editors_features">
+
+ <title>ESB Editors Features</title>
+ <para>JBoss ESB tooling has powerful editor features that help you easily make use of
+ content and code assist.</para>
+ <para>This last chapter covers capabilities on how you can use ESB editor.</para>
+
+ <section id="ESBsyntaxvalidation84">
+
+ <title>ESB syntax validation</title>
+ <para>When working in <property moreinfo="none">JBoss ESB editor</property> you are constantly provided
+ with feedback and contextual error checking as you type. In the Source viewer, if at
+ any point a tag is incorrect or incomplete, an error will be indicated next to the
+ line and also in the <property moreinfo="none">Problems view</property> below.</para>
+ </section>
+
+ <section id="ESBSupportXMLSchema">
+ <title>Support for XML Schema</title>
+
+ <para>JBoss ESB Framework fully <link linkend="sourceView">supports XML files based on
+ schemas as well as DTDs</link>.</para>
+ <note><title>Note:</title>
+ <para>The schema used behind ESB editor now uses the latest version available (from SOA-P 4.3). This removes the errors/warnings some users have reported seeing when using SOA-P specific esb.xml files.</para> </note>
+
+ </section>
+
+ <!--<section id="OpenOnSelection">
+
+ <title>OpenOn</title>
+
+ <para><property>OpenOn</property> let's you easily navigate through your
+ project without using the Package Explorer view (project tree). With OpenOn, you can
+ simply click on a reference to another file and that file will be opened.</para>
+
+ <para>OpenOn is available for the XML files </para>
+
+ <para>Press and hold down the Ctrl key. As you move the mouse cursor over different
+ file references in the file, they display an underline. When you have the mouse
+ cursor over the name of the file you want to open, click and the file will open
+ in its own editor. In this example the managed bean NameBean will open.</para>
+
+ </section>
+ -->
+
+ <section id="ESBContentAssist">
+
+ <title>Content Assist for ESB XML file</title>
+
+ <para>When you work with any ESB XML file <property moreinfo="none">Content Assist</property> is
+ available to help you. It provides pop-up tip to help you complete your code
+ statements. It allows you to write your code faster and with more accuracy. Content
+ assist is always available in the Source mode. Simply type <emphasis>
+ <property moreinfo="none">Ctrl-Space</property>
+ </emphasis> to see what is available.</para>
+
+ <para>Content Assist for ESB XML file:</para>
+ <figure float="0">
+ <title>Content Assist for ESB XML file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/08_esb_features.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Content Assist for attributes:</para>
+ <figure float="0">
+ <title>Content Assist for attributes:</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/09_esb_features.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <!-- </section>
+
+ <section id="ContentAssistWithinTreeEditor">
+
+ <title>Content Assist within Tree ESB Editor</title>
+
+ <para>JBoss Developer Studio also provides Content Assist when working within the Tree ESB editor.
+ Just click <emphasis><property>Ctrl-Space</property>.</emphasis></para>
+ <figure>
+ <title>Content Assist in Tree ESB Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/esb_file/09_editors_features.png" scale="85"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section> -->
+ </section>
+
+ <section id="FullControlOverSourceFiles-SynchronizedSourcAndVisualEditing">
+
+ <title>Synchronized Source and Visual Editing</title>
+
+ <para>ESB file can be edited in either source or extra visual modes at the same time.</para>
+
+ <para>JBoss Tools provide you two different editors to speed your development: a
+ graphical view (<property moreinfo="none">Tree</property>) and source (<property moreinfo="none">Source</property>).
+ At the same time, you always have full control over esb source file. Any changes you
+ make in the source view will immediately appear in the tree view. Both views are
+ synchronized, you can edit the file in any view.</para>
+
+ <figure float="0">
+ <title>Two Views are Synchronized</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/10_esb_features.png" scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In summary, this reference supplies you with all necessary information on the
+ functionality that JBoss ESB Editor provides for work with JBoss ESB.</para>
+ </section>
+ </section>
+</chapter>
+
+
+</book>
17 years, 1 month
JBoss Tools SVN: r14077 - trunk/esb/docs/esb_ref_guide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-03-06 08:26:50 -0500 (Fri, 06 Mar 2009)
New Revision: 14077
Modified:
trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-448, https://jira.jboss.org/jira/browse/JBDS-468 - .esb archive deployment described, necessary screenshots provided.
Modified: trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml 2009-03-06 13:20:10 UTC (rev 14076)
+++ trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml 2009-03-06 13:26:50 UTC (rev 14077)
@@ -222,7 +222,41 @@
</mediaobject>
</figure>
<para>The "Finger" touches descriptors dependent on project (i.e. web.xml for WAR, application.xml for EAR) and now it is also available for jboss-esb.xml in ESB projects.</para>
+ <para>You can also deploy your ESB project as an .esb archive. Right-click on the project, choose <emphasis><property>Export</property></emphasis>:</para>
+ <figure>
+ <title>Export of ESB project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/24_export_button.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Choose <emphasis><property>ESB</property></emphasis> > <emphasis><property>ESB File</property></emphasis> and click <emphasis><property>Next</property></emphasis>:</para>
+
+ <figure><title>Choosing ESB File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/25_esb_file.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>And finally export the ESB project to the file system: choose the destination, choose the target runtime if need a specific one and make the appropriate settings for the archive. Then click <emphasis><property>Finish</property></emphasis>.</para>
+
+ <figure><title>ESB Export</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/26_esb_export.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Your project is deployed as an .esb archive.</para>
+ <para>An ESB archive can be created for ESB projects only. It is also possible to deploy an .esb archive to a JBoss AS based server with JBoss ESB installed.</para>
+
+
</section>
<section>
17 years, 1 month
JBoss Tools SVN: r14076 - trunk/esb/docs/esb_ref_guide/en/images/esb_project.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-03-06 08:20:10 -0500 (Fri, 06 Mar 2009)
New Revision: 14076
Added:
trunk/esb/docs/esb_ref_guide/en/images/esb_project/24_export_button.png
trunk/esb/docs/esb_ref_guide/en/images/esb_project/25_esb_file.png
trunk/esb/docs/esb_ref_guide/en/images/esb_project/26_esb_export.png
Log:
https://jira.jboss.org/jira/browse/JBDS-468, https://jira.jboss.org/jira/browse/JBDS-448 - ESB archive export/deployment
Added: trunk/esb/docs/esb_ref_guide/en/images/esb_project/24_export_button.png
===================================================================
(Binary files differ)
Property changes on: trunk/esb/docs/esb_ref_guide/en/images/esb_project/24_export_button.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/esb/docs/esb_ref_guide/en/images/esb_project/25_esb_file.png
===================================================================
(Binary files differ)
Property changes on: trunk/esb/docs/esb_ref_guide/en/images/esb_project/25_esb_file.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/esb/docs/esb_ref_guide/en/images/esb_project/26_esb_export.png
===================================================================
(Binary files differ)
Property changes on: trunk/esb/docs/esb_ref_guide/en/images/esb_project/26_esb_export.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 1 month
JBoss Tools SVN: r14075 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-03-06 04:31:28 -0500 (Fri, 06 Mar 2009)
New Revision: 14075
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/messages.properties
Log:
JBIDE-3943
Change it to be Smooks configuration stuffs
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/messages.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/messages.properties 2009-03-06 09:30:49 UTC (rev 14074)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/messages.properties 2009-03-06 09:31:28 UTC (rev 14075)
@@ -22,7 +22,7 @@
SmooksNormalContentEditFormPage.ConfigurationPageText=Configuration Page
SmooksNormalContentEditFormPage.SmooksParseType=Other Configurations
SmooksResourceConfigFormBlock.BeanPopulator=BeanPopulator \:
-SmooksResourceConfigFormBlock.DateType=Date Type
+SmooksResourceConfigFormBlock.DateType=Smooks configuration stuffs
SmooksResourceConfigFormBlock.DeleteButton=Delete
SmooksResourceConfigFormBlock.DownButton=Down
SmooksResourceConfigFormBlock.NewButton=New
17 years, 1 month
JBoss Tools SVN: r14074 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-03-06 04:30:49 -0500 (Fri, 06 Mar 2009)
New Revision: 14074
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/messages.properties
Log:
JBIDE-3946
Change it to be Locale-Country
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/messages.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/messages.properties 2009-03-06 09:18:32 UTC (rev 14073)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/messages.properties 2009-03-06 09:30:49 UTC (rev 14074)
@@ -1,6 +1,6 @@
AbstractSmooksModelDetailPage.DetailSectionTitle=Detail Information
DateTypeDetailPage.DateTypeFormatText=Format:
-DateTypeDetailPage.DateTypeLocaleContryText=Locale-Contry:
+DateTypeDetailPage.DateTypeLocaleContryText=Locale-Country:
DateTypeDetailPage.DateTypeLocaleLanguageText=Locale-Language:
DocumentResourceTypeDetailPage.BrowseFile=Browse...
DocumentResourceTypeDetailPage.DocPath=Document Path:
17 years, 1 month
JBoss Tools SVN: r14073 - trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-03-06 04:18:32 -0500 (Fri, 06 Mar 2009)
New Revision: 14073
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetDialog.java
Log:
JBIDE-3050 - speedier incremental fileset matching! =D
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetDialog.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetDialog.java 2009-03-06 09:08:59 UTC (rev 14072)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetDialog.java 2009-03-06 09:18:32 UTC (rev 14073)
@@ -10,6 +10,10 @@
******************************************************************************/
package org.jboss.ide.eclipse.archives.webtools.ui;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.dialogs.TitleAreaDialog;
@@ -32,6 +36,7 @@
import org.eclipse.swt.widgets.Text;
import org.jboss.ide.eclipse.archives.core.asf.DirectoryScanner;
import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory;
+import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.DirectoryScannerExtension.FileWrapper;
import org.jboss.ide.eclipse.archives.ui.util.composites.FilesetPreviewComposite;
import org.jboss.ide.eclipse.archives.webtools.Messages;
@@ -186,21 +191,26 @@
private static IPath[] findPaths(String dir, String includes, String excludes) {
- IPath[] paths = new IPath[0];
try {
if( dir != null ) {
DirectoryScanner scanner =
- DirectoryScannerFactory.createDirectoryScanner(dir, null, includes, excludes, null, false, 1, true);
+ DirectoryScannerFactory.createDirectoryScanner(dir, null, includes, excludes, null, false, 1, false);
if( scanner != null ) {
- String[] files = scanner.getIncludedFiles();
- paths = new IPath[files.length];
- for( int i = 0; i < files.length; i++ ) {
- paths[i] = new Path(files[i]);
+ Iterator<File> i = scanner.iterator();
+ ArrayList<IPath> paths2 = new ArrayList<IPath>();
+ while(i.hasNext() && paths2.size() < 30) {
+ FileWrapper fw = (FileWrapper)i.next();
+ paths2.add(new Path(fw.getFilesetRelative()));
}
+
+ return (IPath[]) paths2.toArray(new IPath[paths2.size()]);
}
}
} catch( IllegalStateException ise ) {}
- return paths;
+ catch(Exception e) {
+ e.printStackTrace();
+ }
+ return new IPath[]{};
}
}
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r14072 - in trunk/archives: plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-03-06 04:08:59 -0500 (Fri, 06 Mar 2009)
New Revision: 14072
Added:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/DirectoryScannerTest.java
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/asf/DirectoryScanner.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/DirectoryScannerFactory.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/ArchivesTestSuite.java
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/projects/JBIDE1406Test.java
Log:
JBIDE-3050 - speedier incremental fileset matching! =D
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/asf/DirectoryScanner.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/asf/DirectoryScanner.java 2009-03-06 08:21:05 UTC (rev 14071)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/asf/DirectoryScanner.java 2009-03-06 09:08:59 UTC (rev 14072)
@@ -40,13 +40,10 @@
import java.util.Vector;
import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.FileScanner;
import org.apache.tools.ant.taskdefs.condition.Os;
import org.apache.tools.ant.types.Resource;
-import org.apache.tools.ant.types.ResourceFactory;
import org.apache.tools.ant.types.resources.FileResource;
import org.apache.tools.ant.types.selectors.FileSelector;
-import org.apache.tools.ant.types.selectors.SelectorScanner;
import org.apache.tools.ant.types.selectors.SelectorUtils;
import org.apache.tools.ant.util.FileUtils;
@@ -138,25 +135,14 @@
* Note: This class ideally should be translated, but since
* it was stolen from ant, I'd rather leave it as close to the ant
* version as possible.
+ *
+ * Started to diverge quite a bit in preparation for
*/
-public class DirectoryScanner
- implements FileScanner, SelectorScanner, ResourceFactory {
+public class DirectoryScanner {
/** Is OpenVMS the operating system we're running on? */
private static final boolean ON_VMS = Os.isFamily("openvms");//$NON-NLS-1$
- /**
- * Patterns which should be excluded by default.
- *
- * <p>Note that you can now add patterns to the list of default
- * excludes. Added patterns will not become part of this array
- * that has only been kept around for backwards compatibility
- * reasons.</p>
- *
- * @deprecated since 1.6.x.
- * Use the {@link #getDefaultExcludes getDefaultExcludes}
- * method instead.
- */
protected static final String[] DEFAULTEXCLUDES = {
// Miscellaneous typical temporary files
"**/*~", //$NON-NLS-1$
@@ -260,21 +246,12 @@
*/
protected Vector<String> dirsDeselected;
- /** Whether or not our results were built by a slow scan. */
- protected boolean haveSlowResults = false;
-
/**
* Whether or not the file system should be treated as a case sensitive
* one.
*/
protected boolean isCaseSensitive = true;
- /**
- * Whether or not symbolic links should be followed.
- *
- * @since Ant 1.5
- */
- private boolean followSymlinks = true;
/** Whether or not everything tested so far has been included. */
protected boolean everythingIncluded = true;
@@ -363,180 +340,68 @@
private boolean scanning = false;
/**
- * Scanning lock.
- *
- * @since Ant 1.6.3
+ * Has this scan finished?
*/
- private Object scanLock = new Object();
+ private boolean complete = false;
/**
- * Slow scanning flag.
+ * Scanning lock.
*
* @since Ant 1.6.3
*/
- private boolean slowScanning = false;
+ private Object scanLock = new Object();
/**
- * Slow scanning lock.
- *
- * @since Ant 1.6.3
- */
- private Object slowScanLock = new Object();
-
- /**
* Exception thrown during scan.
*
* @since Ant 1.6.3
*/
private IllegalStateException illegal = null;
-
+
+ private DirectoryScannerIterator iterator = null;
+
/**
* Sole constructor.
*/
public DirectoryScanner() {
}
- /**
- * Test whether or not a given path matches the start of a given
- * pattern up to the first "**".
- * <p>
- * This is not a general purpose test and should only be used if you
- * can live with false positives. For example, <code>pattern=**\a</code>
- * and <code>str=b</code> will yield <code>true</code>.
- *
- * @param pattern The pattern to match against. Must not be
- * <code>null</code>.
- * @param str The path to match, as a String. Must not be
- * <code>null</code>.
- *
- * @return whether or not a given path matches the start of a given
- * pattern up to the first "**".
- */
+ /* Protected static class delegators to SelectorUtils */
+
protected static boolean matchPatternStart(String pattern, String str) {
return SelectorUtils.matchPatternStart(pattern, str);
}
- /**
- * Test whether or not a given path matches the start of a given
- * pattern up to the first "**".
- * <p>
- * This is not a general purpose test and should only be used if you
- * can live with false positives. For example, <code>pattern=**\a</code>
- * and <code>str=b</code> will yield <code>true</code>.
- *
- * @param pattern The pattern to match against. Must not be
- * <code>null</code>.
- * @param str The path to match, as a String. Must not be
- * <code>null</code>.
- * @param isCaseSensitive Whether or not matching should be performed
- * case sensitively.
- *
- * @return whether or not a given path matches the start of a given
- * pattern up to the first "**".
- */
protected static boolean matchPatternStart(String pattern, String str,
boolean isCaseSensitive) {
return SelectorUtils.matchPatternStart(pattern, str, isCaseSensitive);
}
- /**
- * Test whether or not a given path matches a given pattern.
- *
- * @param pattern The pattern to match against. Must not be
- * <code>null</code>.
- * @param str The path to match, as a String. Must not be
- * <code>null</code>.
- *
- * @return <code>true</code> if the pattern matches against the string,
- * or <code>false</code> otherwise.
- */
protected static boolean matchPath(String pattern, String str) {
return SelectorUtils.matchPath(pattern, str);
}
- /**
- * Test whether or not a given path matches a given pattern.
- *
- * @param pattern The pattern to match against. Must not be
- * <code>null</code>.
- * @param str The path to match, as a String. Must not be
- * <code>null</code>.
- * @param isCaseSensitive Whether or not matching should be performed
- * case sensitively.
- *
- * @return <code>true</code> if the pattern matches against the string,
- * or <code>false</code> otherwise.
- */
protected static boolean matchPath(String pattern, String str,
boolean isCaseSensitive) {
return SelectorUtils.matchPath(pattern, str, isCaseSensitive);
}
- /**
- * Test whether or not a string matches against a pattern.
- * The pattern may contain two special characters:<br>
- * '*' means zero or more characters<br>
- * '?' means one and only one character
- *
- * @param pattern The pattern to match against.
- * Must not be <code>null</code>.
- * @param str The string which must be matched against the pattern.
- * Must not be <code>null</code>.
- *
- * @return <code>true</code> if the string matches against the pattern,
- * or <code>false</code> otherwise.
- */
public static boolean match(String pattern, String str) {
return SelectorUtils.match(pattern, str);
}
- /**
- * Test whether or not a string matches against a pattern.
- * The pattern may contain two special characters:<br>
- * '*' means zero or more characters<br>
- * '?' means one and only one character
- *
- * @param pattern The pattern to match against.
- * Must not be <code>null</code>.
- * @param str The string which must be matched against the pattern.
- * Must not be <code>null</code>.
- * @param isCaseSensitive Whether or not matching should be performed
- * case sensitively.
- *
- *
- * @return <code>true</code> if the string matches against the pattern,
- * or <code>false</code> otherwise.
- */
protected static boolean match(String pattern, String str,
boolean isCaseSensitive) {
return SelectorUtils.match(pattern, str, isCaseSensitive);
}
- /**
- * Get the list of patterns that should be excluded by default.
- *
- * @return An array of <code>String</code> based on the current
- * contents of the <code>defaultExcludes</code>
- * <code>Vector</code>.
- *
- * @since Ant 1.6
- */
+ /* Working with default excludes */
public static String[] getDefaultExcludes() {
- return defaultExcludes.toArray(new String[defaultExcludes
- .size()]);
+ return defaultExcludes.toArray(
+ new String[defaultExcludes.size()]);
}
- /**
- * Add a pattern to the default excludes unless it is already a
- * default exclude.
- *
- * @param s A string to add as an exclude pattern.
- * @return <code>true</code> if the string was added;
- * <code>false</code> if it already existed.
- *
- * @since Ant 1.6
- */
public static boolean addDefaultExclude(String s) {
if (defaultExcludes.indexOf(s) == -1) {
defaultExcludes.add(s);
@@ -545,121 +410,44 @@
return false;
}
- /**
- * Remove a string if it is a default exclude.
- *
- * @param s The string to attempt to remove.
- * @return <code>true</code> if <code>s</code> was a default
- * exclude (and thus was removed);
- * <code>false</code> if <code>s</code> was not
- * in the default excludes list to begin with.
- *
- * @since Ant 1.6
- */
public static boolean removeDefaultExclude(String s) {
return defaultExcludes.remove(s);
}
- /**
- * Go back to the hardwired default exclude patterns.
- *
- * @since Ant 1.6
- */
public static void resetDefaultExcludes() {
defaultExcludes = new Vector<String>();
for (int i = 0; i < DEFAULTEXCLUDES.length; i++) {
defaultExcludes.add(DEFAULTEXCLUDES[i]);
}
}
+ /* End default excludes */
- /**
- * Set the base directory to be scanned. This is the directory which is
- * scanned recursively. All '/' and '\' characters are replaced by
- * <code>File.separatorChar</code>, so the separator used need not match
- * <code>File.separatorChar</code>.
- *
- * @param basedir The base directory to scan.
- */
+
+ /* Base dir */
public void setBasedir(String basedir) {
setBasedir(basedir == null ? (File) null
: new File(basedir.replace('/', File.separatorChar).replace(
'\\', File.separatorChar)));
}
- /**
- * Set the base directory to be scanned. This is the directory which is
- * scanned recursively.
- *
- * @param basedir The base directory for scanning.
- */
public synchronized void setBasedir(File basedir) {
this.basedir = basedir;
}
- /**
- * Return the base directory to be scanned.
- * This is the directory which is scanned recursively.
- *
- * @return the base directory to be scanned.
- */
public synchronized File getBasedir() {
return basedir;
}
+ /* end Base dir */
- /**
- * Find out whether include exclude patterns are matched in a
- * case sensitive way.
- * @return whether or not the scanning is case sensitive.
- * @since Ant 1.6
- */
+
public synchronized boolean isCaseSensitive() {
return isCaseSensitive;
}
- /**
- * Set whether or not include and exclude patterns are matched
- * in a case sensitive way.
- *
- * @param isCaseSensitive whether or not the file system should be
- * regarded as a case sensitive one.
- */
public synchronized void setCaseSensitive(boolean isCaseSensitive) {
this.isCaseSensitive = isCaseSensitive;
}
- /**
- * Get whether or not a DirectoryScanner follows symbolic links.
- *
- * @return flag indicating whether symbolic links should be followed.
- *
- * @since Ant 1.6
- */
- public synchronized boolean isFollowSymlinks() {
- return followSymlinks;
- }
-
- /**
- * Set whether or not symbolic links should be followed.
- *
- * @param followSymlinks whether or not symbolic links should be followed.
- */
- public synchronized void setFollowSymlinks(boolean followSymlinks) {
- this.followSymlinks = followSymlinks;
- }
-
- /**
- * Set the list of include patterns to use. All '/' and '\' characters
- * are replaced by <code>File.separatorChar</code>, so the separator used
- * need not match <code>File.separatorChar</code>.
- * <p>
- * When a pattern ends with a '/' or '\', "**" is appended.
- *
- * @param includes A list of include patterns.
- * May be <code>null</code>, indicating that all files
- * should be included. If a non-<code>null</code>
- * list is given, all elements must be
- * non-<code>null</code>.
- */
public synchronized void setIncludes(String[] includes) {
if (includes == null) {
this.includes = null;
@@ -671,18 +459,6 @@
}
}
- /**
- * Set the list of exclude patterns to use. All '/' and '\' characters
- * are replaced by <code>File.separatorChar</code>, so the separator used
- * need not match <code>File.separatorChar</code>.
- * <p>
- * When a pattern ends with a '/' or '\', "**" is appended.
- *
- * @param excludes A list of exclude patterns.
- * May be <code>null</code>, indicating that no files
- * should be excluded. If a non-<code>null</code> list is
- * given, all elements must be non-<code>null</code>.
- */
public synchronized void setExcludes(String[] excludes) {
if (excludes == null) {
this.excludes = null;
@@ -694,19 +470,6 @@
}
}
- /**
- * Add to the list of exclude patterns to use. All '/' and '\'
- * characters are replaced by <code>File.separatorChar</code>, so
- * the separator used need not match <code>File.separatorChar</code>.
- * <p>
- * When a pattern ends with a '/' or '\', "**" is appended.
- *
- * @param excludes A list of exclude patterns.
- * May be <code>null</code>, in which case the
- * exclude patterns don't get changed at all.
- *
- * @since Ant 1.6.3
- */
public synchronized void addExcludes(String[] excludes) {
if (excludes != null && excludes.length > 0) {
if (this.excludes != null && this.excludes.length > 0) {
@@ -725,15 +488,6 @@
}
}
- /**
- * All '/' and '\' characters are replaced by
- * <code>File.separatorChar</code>, so the separator used need not
- * match <code>File.separatorChar</code>.
- *
- * <p> When a pattern ends with a '/' or '\', "**" is appended.
- *
- * @since Ant 1.6.3
- */
private static String normalizePattern(String p) {
String pattern = p.replace('/', File.separatorChar)
.replace('\\', File.separatorChar);
@@ -743,37 +497,11 @@
return pattern;
}
- /**
- * Set the selectors that will select the filelist.
- *
- * @param selectors specifies the selectors to be invoked on a scan.
- */
- public synchronized void setSelectors(FileSelector[] selectors) {
- this.selectors = selectors;
- }
-
- /**
- * Return whether or not the scanner has included all the files or
- * directories it has come across so far.
- *
- * @return <code>true</code> if all files and directories which have
- * been found so far have been included.
- */
public synchronized boolean isEverythingIncluded() {
return everythingIncluded;
}
-
- /**
- * Scan for files which match at least one include pattern and don't match
- * any exclude patterns. If there are selectors then the files must pass
- * muster there, as well. Scans under basedir, if set; otherwise the
- * include patterns without leading wildcards specify the absolute paths of
- * the files that may be included.
- *
- * @exception IllegalStateException if the base directory was set
- * incorrectly (i.e. if it doesn't exist or isn't a directory).
- */
- public void scan() throws IllegalStateException {
+
+ protected void scanWait() {
synchronized (scanLock) {
if (scanning) {
while (scanning) {
@@ -789,94 +517,101 @@
return;
}
scanning = true;
+ complete = false;
}
- try {
- synchronized (this) {
- illegal = null;
- clearResults();
+ }
- // set in/excludes to reasonable defaults if needed:
- boolean nullIncludes = (includes == null);
- includes = nullIncludes ? new String[] {"**"} : includes;//$NON-NLS-1$
- boolean nullExcludes = (excludes == null);
- excludes = nullExcludes ? new String[0] : excludes;
+ protected void scanPrepare() {
+ tmpNullIncludes = (includes == null);
+ tmpNullExcludes = (excludes == null);
+ illegal = null;
+ clearResults();
+ boolean nullIncludes = includes == null;
+ includes = includes == null ? new String[] {"**"} : includes;//$NON-NLS-1$
+ excludes = excludes == null ? new String[0] : excludes;
- if (basedir == null) {
- // if no basedir and no includes, nothing to do:
- if (nullIncludes) {
- return;
- }
+ if (basedir == null ) {
+ // if no basedir and no includes, nothing to do:
+ if (nullIncludes) {
+ return;
+ }
+ } else {
+ if (!basedir.exists()) {
+ illegal = new IllegalStateException("basedir " + basedir//$NON-NLS-1$
+ + " does not exist");//$NON-NLS-1$
+ }
+ if (!basedir.isDirectory()) {
+ illegal = new IllegalStateException("basedir " + basedir//$NON-NLS-1$
+ + " is not a directory");//$NON-NLS-1$
+ }
+ if (illegal != null) {
+ throw illegal;
+ }
+ }
+ if (isIncluded("")) {//$NON-NLS-1$
+ if (!isExcluded("")) {//$NON-NLS-1$
+ if (isSelected("", basedir)) {//$NON-NLS-1$
+ dirsIncluded.addElement("");//$NON-NLS-1$
} else {
- if (!basedir.exists()) {
- illegal = new IllegalStateException("basedir " + basedir//$NON-NLS-1$
- + " does not exist");//$NON-NLS-1$
- }
- if (!basedir.isDirectory()) {
- illegal = new IllegalStateException("basedir " + basedir//$NON-NLS-1$
- + " is not a directory");//$NON-NLS-1$
- }
- if (illegal != null) {
- throw illegal;
- }
+ dirsDeselected.addElement("");//$NON-NLS-1$
}
- if (isIncluded("")) {//$NON-NLS-1$
- if (!isExcluded("")) {//$NON-NLS-1$
- if (isSelected("", basedir)) {//$NON-NLS-1$
- dirsIncluded.addElement("");//$NON-NLS-1$
- } else {
- dirsDeselected.addElement("");//$NON-NLS-1$
- }
- } else {
- dirsExcluded.addElement("");//$NON-NLS-1$
- }
- } else {
- dirsNotIncluded.addElement("");//$NON-NLS-1$
- }
- checkIncludePatterns();
- clearCaches();
- includes = nullIncludes ? null : includes;
- excludes = nullExcludes ? null : excludes;
+ } else {
+ dirsExcluded.addElement("");//$NON-NLS-1$
}
- } finally {
- synchronized (scanLock) {
- scanning = false;
- scanLock.notifyAll();
+ } else {
+ dirsNotIncluded.addElement("");//$NON-NLS-1$
+ }
+ }
+
+ private boolean tmpNullIncludes, tmpNullExcludes;
+ /**
+ * Scan for files which match at least one include pattern and don't match
+ * any exclude patterns. If there are selectors then the files must pass
+ * muster there, as well. Scans under basedir, if set; otherwise the
+ * include patterns without leading wildcards specify the absolute paths of
+ * the files that may be included.
+ *
+ * @exception IllegalStateException if the base directory was set
+ * incorrectly (i.e. if it doesn't exist or isn't a directory).
+ */
+ public void scan() throws IllegalStateException {
+ scanWait();
+ try {
+ synchronized (this) {
+ scanPrepare();
+ runScan();
}
+ } finally {
+ release();
}
}
-
+
+ protected void release() {
+ synchronized (scanLock) {
+ clearCaches();
+ iterator = null;
+ includes = tmpNullIncludes ? null : includes;
+ excludes = tmpNullExcludes ? null : excludes;
+ complete = true;
+ scanning = false;
+ scanLock.notifyAll();
+ }
+ }
+
/**
* This routine is actually checking all the include patterns in
* order to avoid scanning everything under base dir.
- * @since Ant 1.6
+ *
+ * if a pattern says scan it all, though, we scan it all
*/
- private void checkIncludePatterns() {
- Map<String, String> newroots = new HashMap<String, String>();
- // put in the newroots map the include patterns without
- // wildcard tokens
- for (int i = 0; i < includes.length; i++) {
- if (FileUtils.isAbsolutePath(includes[i])) {
- //skip abs. paths not under basedir, if set:
- if (basedir != null
- && !SelectorUtils.matchPatternStart(includes[i],
- basedir.getAbsolutePath(), isCaseSensitive())) {
- continue;
- }
- } else if (basedir == null) {
- //skip non-abs. paths if basedir == null:
- continue;
- }
- newroots.put(SelectorUtils.rtrimWildcardTokens(
- includes[i]), includes[i]);
- }
+ private void runScan() {
+ Map<String, String> newroots = getNewRoots();
if (newroots.containsKey("") && basedir != null) {//$NON-NLS-1$
// we are going to scan everything anyway
- scandir(basedir, "", true);//$NON-NLS-1$
+ scandirWrap(basedir, "");//$NON-NLS-1$
} else {
// only scan directories that can include matched files or
// directories
- Iterator it = newroots.entrySet().iterator();
-
File canonBase = null;
if (basedir != null) {
try {
@@ -885,79 +620,115 @@
throw new BuildException(ex);
}
}
+
+ Iterator it = newroots.entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
- String currentelement = (String) entry.getKey();
- if (basedir == null && !FileUtils.isAbsolutePath(currentelement)) {
- continue;
- }
- String originalpattern = (String) entry.getValue();
- File myfile = getChild(basedir, currentelement);
+ handleOneEntry(entry, canonBase);
+ }
+ }
+ }
- if (myfile.exists()) {
- // may be on a case insensitive file system. We want
- // the results to show what's really on the disk, so
- // we need to double check.
- try {
- String path = (basedir == null)
- ? myfile.getCanonicalPath()
- : FILE_UTILS.removeLeadingPath(canonBase,
- myfile.getCanonicalFile());
- if (!path.equals(currentelement) || ON_VMS) {
- myfile = findFile(basedir, currentelement, true);
- if (myfile != null && basedir != null) {
- currentelement = FILE_UTILS.removeLeadingPath(
- basedir, myfile);
- }
+ protected void handleOneEntry(Map.Entry entry, File canonBase) {
+ String[] currentelement_ = new String[] { (String) entry.getKey() };
+ if (basedir == null && !FileUtils.isAbsolutePath(currentelement_[0])) {
+ return;
+ }
+ String originalpattern = (String) entry.getValue();
+ File[] myfile_ = new File[] { getChild(basedir, currentelement_[0])};
+ perfectOneEntry(canonBase, myfile_, currentelement_);
+ File myfile = myfile_[0];
+ String currentelement = currentelement_[0];
+
+ if (myfile != null && myfile.exists()) {
+ if (myfile.isDirectory()) {
+ if (isIncluded(currentelement)
+ && currentelement.length() > 0) {
+ accountForIncludedDir(currentelement, myfile);
+ } else {
+ if (currentelement.length() > 0) {
+ if (currentelement.charAt(currentelement
+ .length() - 1)
+ != File.separatorChar) {
+ currentelement =
+ currentelement + File.separatorChar;
}
- } catch (IOException ex) {
- throw new BuildException(ex);
}
+ scandirWrap(myfile, currentelement);
}
- if ((myfile == null || !myfile.exists()) && !isCaseSensitive()) {
- File f = findFile(basedir, currentelement, false);
- if (f != null && f.exists()) {
- // adapt currentelement to the case we've
- // actually found
- currentelement = (basedir == null)
- ? f.getAbsolutePath()
- : FILE_UTILS.removeLeadingPath(basedir, f);
- myfile = f;
- }
+ } else {
+ boolean included = isCaseSensitive()
+ ? originalpattern.equals(currentelement)
+ : originalpattern.equalsIgnoreCase(currentelement);
+ if (included) {
+ accountForIncludedFile(currentelement, myfile);
}
- if (myfile != null && myfile.exists()) {
- if (!followSymlinks
- && isSymlink(basedir, currentelement)) {
- continue;
+ }
+ }
+ }
+
+ protected void perfectOneEntry(File canonBase, File[] myfile_, String[] currentelement_) {
+ File myfile = myfile_[0];
+ String currentelement = currentelement_[0];
+
+ if (myfile.exists()) {
+ // may be on a case insensitive file system. We want
+ // the results to show what's really on the disk, so
+ // we need to double check.
+ try {
+ String path = (basedir == null)
+ ? myfile.getCanonicalPath()
+ : FILE_UTILS.removeLeadingPath(canonBase,
+ myfile.getCanonicalFile());
+ if (!path.equals(currentelement) || ON_VMS) {
+ myfile = findFile(basedir, currentelement, true);
+ if (myfile != null && basedir != null) {
+ currentelement = FILE_UTILS.removeLeadingPath(
+ basedir, myfile);
}
- if (myfile.isDirectory()) {
- if (isIncluded(currentelement)
- && currentelement.length() > 0) {
- accountForIncludedDir(currentelement, myfile, true);
- } else {
- if (currentelement.length() > 0) {
- if (currentelement.charAt(currentelement
- .length() - 1)
- != File.separatorChar) {
- currentelement =
- currentelement + File.separatorChar;
- }
- }
- scandir(myfile, currentelement, true);
- }
- } else {
- boolean included = isCaseSensitive()
- ? originalpattern.equals(currentelement)
- : originalpattern.equalsIgnoreCase(currentelement);
- if (included) {
- accountForIncludedFile(currentelement, myfile);
- }
- }
}
+ } catch (IOException ex) {
+ throw new BuildException(ex);
}
}
+ if ((myfile == null || !myfile.exists()) && !isCaseSensitive()) {
+ File f = findFile(basedir, currentelement, false);
+ if (f != null && f.exists()) {
+ // adapt currentelement to the case we've
+ // actually found
+ currentelement = (basedir == null)
+ ? f.getAbsolutePath()
+ : FILE_UTILS.removeLeadingPath(basedir, f);
+ myfile = f;
+ }
+ }
+
+ myfile_[0] = myfile;
+ currentelement_[0] = currentelement;
}
-
+
+ protected Map<String, String> getNewRoots() {
+ Map<String, String> newroots = new HashMap<String, String>();
+ // put in the newroots map the include patterns without
+ // wildcard tokens
+ for (int i = 0; i < includes.length; i++) {
+ if (FileUtils.isAbsolutePath(includes[i])) {
+ //skip abs. paths not under basedir, if set:
+ if (basedir != null
+ && !SelectorUtils.matchPatternStart(includes[i],
+ basedir.getAbsolutePath(), isCaseSensitive())) {
+ continue;
+ }
+ } else if (basedir == null) {
+ //skip non-abs. paths if basedir == null:
+ continue;
+ }
+ newroots.put(SelectorUtils.rtrimWildcardTokens(
+ includes[i]), includes[i]);
+ }
+ return newroots;
+ }
+
/**
* Clear the result caches for a scan.
*/
@@ -974,70 +745,14 @@
scannedDirs.clear();
}
- /**
- * Top level invocation for a slow scan. A slow scan builds up a full
- * list of excluded/included files/directories, whereas a fast scan
- * will only have full results for included files, as it ignores
- * directories which can't possibly hold any included files/directories.
- * <p>
- * Returns immediately if a slow scan has already been completed.
- */
- protected void slowScan() {
- synchronized (slowScanLock) {
- if (haveSlowResults) {
- return;
- }
- if (slowScanning) {
- while (slowScanning) {
- try {
- slowScanLock.wait();
- } catch (InterruptedException e) {
- // Empty
- }
- }
- return;
- }
- slowScanning = true;
- }
- try {
- synchronized (this) {
-
- // set in/excludes to reasonable defaults if needed:
- boolean nullIncludes = (includes == null);
- includes = nullIncludes ? new String[] {"**"} : includes;//$NON-NLS-1$
- boolean nullExcludes = (excludes == null);
- excludes = nullExcludes ? new String[0] : excludes;
-
- String[] excl = new String[dirsExcluded.size()];
- dirsExcluded.copyInto(excl);
-
- String[] notIncl = new String[dirsNotIncluded.size()];
- dirsNotIncluded.copyInto(notIncl);
-
- processSlowScan(excl);
- processSlowScan(notIncl);
- clearCaches();
- includes = nullIncludes ? null : includes;
- excludes = nullExcludes ? null : excludes;
- }
- } finally {
- synchronized (slowScanLock) {
- haveSlowResults = true;
- slowScanning = false;
- slowScanLock.notifyAll();
- }
- }
+
+ protected void scandirWrap(File dir, String vpath) {
+ if( iterator == null )
+ scandirImpl(dir,vpath);
+ else
+ iterator.addFileToScanList(dir, vpath);
}
-
- private void processSlowScan(String[] arr) {
- for (int i = 0; i < arr.length; i++) {
- if (!couldHoldIncluded(arr[i])) {
- scandir(getChild(basedir, arr[i]),
- arr[i] + File.separator, false);
- }
- }
- }
-
+
/**
* Scan the given directory for files and directories. Found files and
* directories are placed in their respective collections, based on the
@@ -1058,7 +773,7 @@
* @see #dirsExcluded
* @see #slowScan
*/
- protected void scandir(File dir, String vpath, boolean fast) {
+ protected void scandirImpl(File dir, String vpath) {
if (dir == null) {
throw new BuildException("dir must not be null.");//$NON-NLS-1$
} else if (!dir.exists()) {
@@ -1067,7 +782,7 @@
throw new BuildException(dir + " is not a directory.");//$NON-NLS-1$
}
// avoid double scanning of directories, can only happen in fast mode
- if (fast && hasBeenScanned(vpath)) {
+ if (hasBeenScanned(vpath)) {
return;
}
@@ -1085,44 +800,19 @@
throw new BuildException("IO error scanning directory '"//$NON-NLS-1$
+ dir.getAbsolutePath() + "'");//$NON-NLS-1$
}
- if (!followSymlinks) {
- Vector<File> noLinks = new Vector<File>();
- for (int i = 0; i < newfiles.length; i++) {
- try {
- if (FILE_UTILS.isSymbolicLink(dir, newfiles[i].getName())) {
- String name = vpath + newfiles[i].getName();
- File file = newfiles[i];
- (file.isDirectory()
- ? dirsExcluded : filesExcluded).addElement(name);
- } else {
- noLinks.addElement(newfiles[i]);
- }
- } catch (IOException ioe) {
- String msg = "IOException caught while checking "//$NON-NLS-1$
- + "for links, couldn't get canonical path!";//$NON-NLS-1$
- // will be caught and redirected to Ant's logging system
- System.err.println(msg);
- noLinks.addElement(newfiles[i]);
- }
- }
- newfiles = (noLinks.toArray(new File[noLinks.size()]));
- }
for (int i = 0; i < newfiles.length; i++) {
String name = vpath + getName(newfiles[i]);
File file = newfiles[i];
if (file.isDirectory()) {
if (isIncluded(name)) {
- accountForIncludedDir(name, file, fast);
+ accountForIncludedDir(name, file);
} else {
everythingIncluded = false;
dirsNotIncluded.addElement(name);
- if (fast && couldHoldIncluded(name)) {
- scandir(file, name + File.separator, fast);
+ if (couldHoldIncluded(name)) {
+ scandirWrap(file, name + File.separator);
}
}
- if (!fast) {
- scandir(file, name + File.separator, fast);
- }
} else if (file.isFile()) {
if (isIncluded(name)) {
accountForIncludedFile(name, file);
@@ -1154,10 +844,10 @@
* @param file directory as File.
* @param fast whether to perform fast scans.
*/
- private void accountForIncludedDir(String name, File file, boolean fast) {
+ private void accountForIncludedDir(String name, File file) {
processIncluded(name, file, dirsIncluded, dirsExcluded, dirsDeselected);
- if (fast && couldHoldIncluded(name) && !contentsExcluded(name)) {
- scandir(file, name + File.separator, fast);
+ if (couldHoldIncluded(name) && !contentsExcluded(name)) {
+ scandirWrap(file, name + File.separator);
}
}
@@ -1180,7 +870,9 @@
}
protected void postInclude(File f, String name) {
- // do nothing
+ if( iterator != null ) {
+ iterator.addMatch(f, name);
+ }
}
protected void postExclude(File f, String name) {
@@ -1360,59 +1052,6 @@
}
/**
- * Return the names of the files which matched none of the include
- * patterns. The names are relative to the base directory. This involves
- * performing a slow scan if one has not already been completed.
- *
- * @return the names of the files which matched none of the include
- * patterns.
- *
- * @see #slowScan
- */
- public synchronized String[] getNotIncludedFiles() {
- slowScan();
- String[] files = new String[filesNotIncluded.size()];
- filesNotIncluded.copyInto(files);
- return files;
- }
-
- /**
- * Return the names of the files which matched at least one of the
- * include patterns and at least one of the exclude patterns.
- * The names are relative to the base directory. This involves
- * performing a slow scan if one has not already been completed.
- *
- * @return the names of the files which matched at least one of the
- * include patterns and at least one of the exclude patterns.
- *
- * @see #slowScan
- */
- public synchronized String[] getExcludedFiles() {
- slowScan();
- String[] files = new String[filesExcluded.size()];
- filesExcluded.copyInto(files);
- return files;
- }
-
- /**
- * <p>Return the names of the files which were selected out and
- * therefore not ultimately included.</p>
- *
- * <p>The names are relative to the base directory. This involves
- * performing a slow scan if one has not already been completed.</p>
- *
- * @return the names of the files which were deselected.
- *
- * @see #slowScan
- */
- public synchronized String[] getDeselectedFiles() {
- slowScan();
- String[] files = new String[filesDeselected.size()];
- filesDeselected.copyInto(files);
- return files;
- }
-
- /**
* Return the names of the directories which matched at least one of the
* include patterns and none of the exclude patterns.
* The names are relative to the base directory.
@@ -1443,59 +1082,6 @@
}
/**
- * Return the names of the directories which matched none of the include
- * patterns. The names are relative to the base directory. This involves
- * performing a slow scan if one has not already been completed.
- *
- * @return the names of the directories which matched none of the include
- * patterns.
- *
- * @see #slowScan
- */
- public synchronized String[] getNotIncludedDirectories() {
- slowScan();
- String[] directories = new String[dirsNotIncluded.size()];
- dirsNotIncluded.copyInto(directories);
- return directories;
- }
-
- /**
- * Return the names of the directories which matched at least one of the
- * include patterns and at least one of the exclude patterns.
- * The names are relative to the base directory. This involves
- * performing a slow scan if one has not already been completed.
- *
- * @return the names of the directories which matched at least one of the
- * include patterns and at least one of the exclude patterns.
- *
- * @see #slowScan
- */
- public synchronized String[] getExcludedDirectories() {
- slowScan();
- String[] directories = new String[dirsExcluded.size()];
- dirsExcluded.copyInto(directories);
- return directories;
- }
-
- /**
- * <p>Return the names of the directories which were selected out and
- * therefore not ultimately included.</p>
- *
- * <p>The names are relative to the base directory. This involves
- * performing a slow scan if one has not already been completed.</p>
- *
- * @return the names of the directories which were deselected.
- *
- * @see #slowScan
- */
- public synchronized String[] getDeselectedDirectories() {
- slowScan();
- String[] directories = new String[dirsDeselected.size()];
- dirsDeselected.copyInto(directories);
- return directories;
- }
-
- /**
* Add default exclusions to the current exclusions set.
*/
public synchronized void addDefaultExcludes() {
@@ -1725,6 +1311,68 @@
protected File getChild(File file, String element) {
return new File(file, element);
}
+
+ public Iterator<File> iterator() {
+ iterator = new DirectoryScannerIterator();
+ return iterator;
+ }
+
+ public class DirectoryScannerIterator implements Iterator<File> {
+ protected ArrayList<DSPair> matches;
+ protected ArrayList<DSPair> toScan;
+ protected DirectoryScanner scanner;
+ protected int pointer;
+ public DirectoryScannerIterator() {
+ this.matches = new ArrayList<DSPair>();
+ this.toScan = new ArrayList<DSPair>();
+ pointer = 0;
+ iterator = this;
+ scanPrepare();
+ runScan();
+ }
+
+ protected void addFileToScanList(File file, String vpath) {
+ toScan.add(0, new DSPair(file, vpath));
+ }
+
+ protected void addMatch(File file, String vpath) {
+ matches.add(pointer, new DSPair(file, vpath));
+ }
+
+ public boolean hasNext() {
+ if( pointer <= matches.size() -1 ) return true;
+ if( toScan.isEmpty()) return false;
+
+ while( !toScan.isEmpty() && pointer == matches.size()) {
+ DSPair pair = toScan.remove(0);
+ scandirImpl(pair.file, pair.vpath);
+ }
+
+ boolean hasNext = pointer <= matches.size() -1 ||
+ (pointer == matches.size() && !toScan.isEmpty());
+ if( !hasNext )
+ release();
+ return hasNext;
+ }
+ public File next() {
+ if( pointer <= (matches.size()-1))
+ return matches.get(pointer++).file;
+ return null;
+ }
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+
+ }
+
+ protected class DSPair {
+ private File file;
+ private String vpath;
+ public DSPair(File file, String vpath) {
+ this.file = file;
+ this.vpath = vpath;
+ }
+ }
}
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/DirectoryScannerFactory.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/DirectoryScannerFactory.java 2009-03-06 08:21:05 UTC (rev 14071)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/DirectoryScannerFactory.java 2009-03-06 09:08:59 UTC (rev 14072)
@@ -144,17 +144,21 @@
protected File[] list2absolute(File file) {
File[] children = file.listFiles();
- FileWrapper[] children2 = new FileWrapper[children.length];
- for( int i = 0; i < children.length; i++ )
- children2[i] = new FileWrapper(children[i], new Path(children[i].getAbsolutePath()));
- return children2;
+ if( children != null ) {
+ FileWrapper[] children2 = new FileWrapper[children.length];
+ for( int i = 0; i < children.length; i++ )
+ children2[i] = new FileWrapper(children[i], new Path(children[i].getAbsolutePath()));
+ return children2;
+ }
+ return new FileWrapper[]{};
}
protected void postInclude(File f, String relative) {
- if( f.isFile() ) {
- if( f instanceof FileWrapper ) {
- FileWrapper f2 = ((FileWrapper)f);
- f2.setFilesetRelative(relative);
+ super.postInclude(f, relative);
+ if( f instanceof FileWrapper ) {
+ FileWrapper f2 = ((FileWrapper)f);
+ f2.setFilesetRelative(relative);
+ if( f.isFile() ) {
matches.add(f2);
ArrayList<FileWrapper> l = matchesMap.get(f2);
if( l == null ) {
@@ -165,7 +169,12 @@
}
}
}
+
+ protected boolean isSelected(String name, File file) {
+ return super.isSelected(name, file) && file.isFile();
+ }
+
// what files are being added
public FileWrapper[] getMatchedArray() {
return (FileWrapper[]) matches.toArray(new FileWrapper[matches.size()]);
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java 2009-03-06 08:21:05 UTC (rev 14071)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java 2009-03-06 09:08:59 UTC (rev 14072)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.ide.eclipse.archives.ui.wizards.pages;
+import java.io.File;
import java.util.ArrayList;
+import java.util.Iterator;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -39,6 +41,7 @@
import org.jboss.ide.eclipse.archives.core.model.IArchiveFileSet;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.DirectoryScannerExtension;
+import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.DirectoryScannerExtension.FileWrapper;
import org.jboss.ide.eclipse.archives.ui.ArchivesSharedImages;
import org.jboss.ide.eclipse.archives.ui.ArchivesUIMessages;
import org.jboss.ide.eclipse.archives.ui.util.composites.ArchiveFilesetDestinationComposite;
@@ -340,15 +343,20 @@
try {
ds = DirectoryScannerFactory.createDirectoryScanner(
replaceVariables(), null, includes, excludes, parentNode.getProjectName(),
- srcDestComposite.isWorkspaceRelative(), parentNode.getModelRootNode().getDescriptorVersion(), true);
- String[] fsRelative = ds.getIncludedFiles();
+ srcDestComposite.isWorkspaceRelative(), parentNode.getModelRootNode().getDescriptorVersion(), false);
+ Iterator<File> it = ds.iterator();
+ ArrayList<String> paths2 = new ArrayList<String>();
+ while(it.hasNext() && paths2.size() < 30) {
+ FileWrapper fw = (FileWrapper)it.next();
+ paths2.add(fw.getFilesetRelative());
+ }
IPath filesetRelative;
final ArrayList<IPath> list = new ArrayList<IPath>();
- for( int i = 0; i < fsRelative.length; i++ ) {
+ for( int i = 0; i < paths2.size(); i++ ) {
if( flattened )
- filesetRelative = new Path(new Path(fsRelative[i]).lastSegment());
+ filesetRelative = new Path(new Path(paths2.get(i)).lastSegment());
else
- filesetRelative = new Path(fsRelative[i]);
+ filesetRelative = new Path(paths2.get(i));
if( !list.contains(filesetRelative))
list.add(filesetRelative);
}
Modified: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/ArchivesTestSuite.java
===================================================================
--- trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/ArchivesTestSuite.java 2009-03-06 08:21:05 UTC (rev 14071)
+++ trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/ArchivesTestSuite.java 2009-03-06 09:08:59 UTC (rev 14072)
@@ -15,6 +15,7 @@
import org.jboss.ide.eclipse.archives.test.core.ArchivesCoreTest;
import org.jboss.ide.eclipse.archives.test.core.ant.SimpleAntTest;
+import org.jboss.ide.eclipse.archives.test.model.DirectoryScannerTest;
import org.jboss.ide.eclipse.archives.test.model.ModelCreationTest;
import org.jboss.ide.eclipse.archives.test.model.ModelTruezipBridgeTest;
import org.jboss.ide.eclipse.archives.test.model.ModelUtilTest;
@@ -37,6 +38,7 @@
suite.addTestSuite(XBUnmarshallTest.class);
suite.addTestSuite(TruezipUtilTest.class);
suite.addTestSuite(ModelUtilTest.class);
+ suite.addTestSuite(DirectoryScannerTest.class);
suite.addTestSuite(ModelCreationTest.class);
suite.addTestSuite(ModelTruezipBridgeTest.class);
suite.addTestSuite(SimpleAntTest.class);
Added: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/DirectoryScannerTest.java
===================================================================
--- trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/DirectoryScannerTest.java (rev 0)
+++ trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/DirectoryScannerTest.java 2009-03-06 09:08:59 UTC (rev 14072)
@@ -0,0 +1,78 @@
+package org.jboss.ide.eclipse.archives.test.model;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory;
+import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.DirectoryScannerExtension;
+import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.DirectoryScannerExtension.FileWrapper;
+import org.jboss.ide.eclipse.archives.test.ArchivesTest;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+import org.osgi.framework.Bundle;
+
+public class DirectoryScannerTest extends TestCase {
+ IProject proj = null;
+ private Bundle bundle;
+ private IPath bundlePath;
+ protected void setUp() throws Exception {
+ if( bundlePath == null ) {
+ try {
+ bundle = ArchivesTest.getDefault().getBundle();
+ URL bundleURL = FileLocator.toFileURL(bundle.getEntry(""));
+ bundlePath = new Path(bundleURL.getFile());
+ } catch( IOException ioe) {
+ fail("Failed to set up " + getClass().getName());
+ }
+ }
+
+ proj = ResourcesUtils.importProject("org.jboss.ide.eclipse.archives.test", "/inputs/projects/GenericProject");
+ proj.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ JobUtils.waitForIdle();
+ }
+ protected void tearDown() throws Exception {
+ ResourcesUtils.deleteProject(proj.getName());
+ }
+
+ public void testScanner() {
+ DirectoryScannerExtension scanner1 =
+ DirectoryScannerFactory.createDirectoryScanner(
+ proj.getLocation().toOSString(), null,
+ "**", "**/bin/**", null,
+ false, 1.2, false);
+ DirectoryScannerExtension scanner2 =
+ DirectoryScannerFactory.createDirectoryScanner(
+ proj.getLocation().toOSString(), null,
+ "**", "**/bin/**", null,
+ false, 1.2, false);
+
+ // We have two exact scanners.
+ // Make the first one scan, get the results
+ scanner1.scan();
+ FileWrapper[] results = scanner1.getMatchedArray();
+
+
+ ArrayList<FileWrapper> iterated = new ArrayList<FileWrapper>();
+ Iterator<File> i = scanner2.iterator();
+ Object next;
+ while( i.hasNext()) {
+ next = i.next();
+ assertTrue(next != null);
+ assertTrue(next instanceof FileWrapper);
+ iterated.add((FileWrapper)next);
+ }
+
+ assertEquals(results.length, iterated.size());
+ }
+}
Modified: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java
===================================================================
--- trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java 2009-03-06 08:21:05 UTC (rev 14071)
+++ trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTruezipBridgeTest.java 2009-03-06 09:08:59 UTC (rev 14072)
@@ -61,7 +61,7 @@
proj.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
}
protected void tearDown() throws Exception {
- proj.delete(true,true,null);
+ ResourcesUtils.deleteProject(proj.getName());
File out = outputs.toFile();
File[] children = out.listFiles();
for( int i = 0; i < children.length; i++ ) {
Modified: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/projects/JBIDE1406Test.java
===================================================================
--- trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/projects/JBIDE1406Test.java 2009-03-06 08:21:05 UTC (rev 14071)
+++ trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/projects/JBIDE1406Test.java 2009-03-06 09:08:59 UTC (rev 14072)
@@ -19,7 +19,6 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.jboss.ide.eclipse.archives.core.build.ArchiveBuildDelegate;
-import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory;
import org.jboss.ide.eclipse.archives.core.util.PathUtils;
import org.jboss.ide.eclipse.archives.test.ArchivesTest;
import org.jboss.tools.common.test.util.TestProjectProvider;
17 years, 1 month
JBoss Tools SVN: r14071 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-03-06 03:21:05 -0500 (Fri, 06 Mar 2009)
New Revision: 14071
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksNewWizardPage.java
Log:
JBIDE-3948
when create a new file , the tool will generate the "stream.filter.type";
when open a file , if the file don't have the "stream.filter.type" , the tool will add that automatically
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2009-03-06 07:47:33 UTC (rev 14070)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2009-03-06 08:21:05 UTC (rev 14071)
@@ -123,9 +123,14 @@
import org.jboss.tools.smooks.graphical.Param;
import org.jboss.tools.smooks.graphical.Params;
import org.jboss.tools.smooks.graphical.util.GraphicalInformationSaver;
+import org.jboss.tools.smooks.model.AbstractResourceConfig;
import org.jboss.tools.smooks.model.DocumentRoot;
+import org.jboss.tools.smooks.model.ParamType;
+import org.jboss.tools.smooks.model.ResourceConfigType;
+import org.jboss.tools.smooks.model.SmooksFactory;
import org.jboss.tools.smooks.model.SmooksResourceListType;
import org.jboss.tools.smooks.model.util.SmooksModelConstants;
+import org.jboss.tools.smooks.model.util.SmooksModelUtils;
import org.jboss.tools.smooks.model.util.SmooksResourceFactoryImpl;
import org.jboss.tools.smooks.ui.AnalyzeResult;
import org.jboss.tools.smooks.ui.IAnalyzeListener;
@@ -1328,9 +1333,47 @@
return;
SmooksResourceListType listType = ((DocumentRoot) smooksResource
.getContents().get(0)).getSmooksResourceList();
+ checkSmooksConfigFileModel(listType);
this.analyzeGraphicalModel(listType, graphinformations, file);
}
}
+
+ /**
+ *
+ * @param listType
+ */
+ protected void checkSmooksConfigFileModel(SmooksResourceListType listType){
+ List<AbstractResourceConfig> list = listType.getAbstractResourceConfig();
+ ResourceConfigType globalParameterResource = null;
+ for (Iterator iterator = list.iterator(); iterator.hasNext();) {
+ AbstractResourceConfig arc = (AbstractResourceConfig) iterator
+ .next();
+ if(arc instanceof ResourceConfigType){
+ String selector = ((ResourceConfigType)arc).getSelector();
+ if(selector == null) continue;
+ selector = selector.trim();
+ if(SmooksModelConstants.GLOBAL_PARAMETERS.equals(selector)){
+ globalParameterResource = (ResourceConfigType)arc;
+ break;
+ }
+ }
+ }
+
+ if(globalParameterResource == null){
+ globalParameterResource = SmooksFactory.eINSTANCE.createResourceConfigType();
+ globalParameterResource.setSelector(SmooksModelConstants.GLOBAL_PARAMETERS);
+ SmooksModelUtils.setParamText("stream.filter.type", "SAX", globalParameterResource);
+ }else{
+ String value = SmooksModelUtils.getParmaText("stream.filter.type", globalParameterResource);
+ if(value == null){
+ SmooksModelUtils.setParamText("stream.filter.type", "SAX", globalParameterResource);
+ }else{
+ if(value.trim().length() == 0){
+ SmooksModelUtils.setParamText("stream.filter.type", "SAX", globalParameterResource);
+ }
+ }
+ }
+ }
public void analyzeGraphicalModel(InputStream stream) throws IOException,
CoreException, InvocationTargetException {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java 2009-03-06 07:47:33 UTC (rev 14070)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java 2009-03-06 08:21:05 UTC (rev 14071)
@@ -35,7 +35,7 @@
/**
*
* @author Dart
- *
+ *
*/
public class SmooksConfigFileNewWizard extends Wizard implements INewWizard,
ISmooksDataCreationAddtionWizard {
@@ -60,8 +60,11 @@
public SmooksConfigFileNewWizard() {
super();
setNeedsProgressMonitor(true);
- super.setWindowTitle(Messages.getString("SmooksConfigFileNewWizard.NewConfigFileWizardTitle")); //$NON-NLS-1$
- setDefaultPageImageDescriptor(SmooksUIActivator.getImageDescriptor("icons/smooks-wiz.gif"));
+ super
+ .setWindowTitle(Messages
+ .getString("SmooksConfigFileNewWizard.NewConfigFileWizardTitle")); //$NON-NLS-1$
+ setDefaultPageImageDescriptor(SmooksUIActivator
+ .getImageDescriptor("icons/smooks-wiz.gif"));
}
/**
@@ -103,8 +106,12 @@
return false;
} catch (InvocationTargetException e) {
Throwable realException = e.getTargetException();
- MessageDialog.openError(getShell(), Messages.getString("SmooksConfigFileNewWizard.ErrorTitle"), realException //$NON-NLS-1$
- .getMessage());
+ MessageDialog
+ .openError(
+ getShell(),
+ Messages
+ .getString("SmooksConfigFileNewWizard.ErrorTitle"), realException //$NON-NLS-1$
+ .getMessage());
return false;
}
return true;
@@ -176,14 +183,17 @@
if (sourceDataPath[0] != null || targetDataPath[0] != null) {
properties = new Properties();
if (sourceDataPath[0] != null) {
- properties.setProperty(PRO_SOURCE_DATA_PATH, sourceDataPath[0]);
+ properties.setProperty(PRO_SOURCE_DATA_PATH,
+ sourceDataPath[0]);
}
if (targetDataPath[0] != null) {
- properties.setProperty(PRO_TARGET_DATA_PATH, targetDataPath[0]);
+ properties.setProperty(PRO_TARGET_DATA_PATH,
+ targetDataPath[0]);
}
}
try {
- ginforSave.doSave(null, sourceTypeID, targetTypeID, properties);
+ ginforSave.doSave(null, sourceTypeID, targetTypeID,
+ properties);
} catch (IOException e) {
} catch (CoreException e) {
}
@@ -193,7 +203,7 @@
}
}
});
-
+
monitor.worked(1);
}
@@ -203,7 +213,11 @@
private InputStream openContentStream() {
String contents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" //$NON-NLS-1$
- + " <smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.0.xsd\"/>"; //$NON-NLS-1$
+ + "<smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.0.xsd\">\n"
+ + " <resource-config selector=\"global-parameters\">\n"
+ + " <param name=\"stream.filter.type\">SAX</param>\n"
+ + " </resource-config>\n" +
+ "</smooks-resource-list>"; //$NON-NLS-1$
return new ByteArrayInputStream(contents.getBytes());
}
@@ -228,12 +242,16 @@
public void addSourceWizardPage(IWizardPage page) {
sourceCreationPages.add(page);
- page.setTitle(Messages.getString("SmooksConfigFileNewWizard.SourceDataTypeSelectionTitle")); //$NON-NLS-1$
+ page
+ .setTitle(Messages
+ .getString("SmooksConfigFileNewWizard.SourceDataTypeSelectionTitle")); //$NON-NLS-1$
}
public void addTargetWizardPage(IWizardPage page) {
targetCreationPages.add(page);
- page.setTitle(Messages.getString("SmooksConfigFileNewWizard.TargetDataTypeSelectionTitle")); //$NON-NLS-1$
+ page
+ .setTitle(Messages
+ .getString("SmooksConfigFileNewWizard.TargetDataTypeSelectionTitle")); //$NON-NLS-1$
}
public void clearSourceWizardPages() {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksNewWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksNewWizardPage.java 2009-03-06 07:47:33 UTC (rev 14070)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksNewWizardPage.java 2009-03-06 08:21:05 UTC (rev 14071)
@@ -24,9 +24,7 @@
import org.eclipse.ui.dialogs.ContainerSelectionDialog;
/**
- * The "New" wizard page allows setting the container for the new file as well
- * as the file name. The page will only accept file name without the extension
- * OR with the extension that matches the expected one (smooks).
+ * @deprecated
*/
public class SmooksNewWizardPage extends WizardPage {
17 years, 1 month