JBoss Tools SVN: r29931 - trunk/birt/docs/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-21 20:29:41 -0400 (Mon, 21 Mar 2011)
New Revision: 29931
Modified:
trunk/birt/docs/en-US/birt_integration_with_seam.xml
Log:
"Fixed spelling errors"
Modified: trunk/birt/docs/en-US/birt_integration_with_seam.xml
===================================================================
--- trunk/birt/docs/en-US/birt_integration_with_seam.xml 2011-03-22 00:27:32 UTC (rev 29930)
+++ trunk/birt/docs/en-US/birt_integration_with_seam.xml 2011-03-22 00:29:41 UTC (rev 29931)
@@ -23,7 +23,7 @@
<guimenuitem>Open Perspective</guimenuitem>
<guimenuitem>Other</guimenuitem>
<guimenuitem>Seam</guimenuitem>
- </menuchoice>. This perspective provides conventient access to all the Seam tools.
+ </menuchoice>. This perspective provides convenient access to all the Seam tools.
</para>
<para>
To create a new Seam Web project select <menuchoice><guimenuitem>File</guimenuitem>
@@ -258,7 +258,7 @@
<para>In the <guilabel>Servers</guilabel> view (if it is not open select <menuchoice><guimenuitem>Windows</guimenuitem><guimenuitem>Show View</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>Server</guimenuitem><guimenuitem>Servers</guimenuitem></menuchoice>), select the server the application is deployed to and hit the <guibutton>Start</guibutton> button. </para>
</listitem>
<listitem>
- <para>When the server is started, open your favourite browser and point it to <ulink url="http://localhost:8080/HelloBirt/helloBirt.seam">http://localhost:8080/HelloBirt/helloBirt.seam</ulink>.</para>
+ <para>When the server is started, open your favorite browser and point it to <ulink url="http://localhost:8080/HelloBirt/helloBirt.seam">http://localhost:8080/HelloBirt/helloBirt.seam</ulink>.</para>
<figure>
13 years, 9 months
JBoss Tools SVN: r29930 - trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-21 20:27:32 -0400 (Mon, 21 Mar 2011)
New Revision: 29930
Modified:
trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/add_and_manage_server_keys-task.xml
trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/using_the_deltacloud_perspective-task.xml
Log:
"Fixed spelling errors"
Modified: trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/add_and_manage_server_keys-task.xml
===================================================================
--- trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/add_and_manage_server_keys-task.xml 2011-03-22 00:17:03 UTC (rev 29929)
+++ trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/add_and_manage_server_keys-task.xml 2011-03-22 00:27:32 UTC (rev 29930)
@@ -9,7 +9,7 @@
To access Deltacloud servers, key file authentication is used. Each key represents the person accessing the server and informs the server of their authorization level (a person may have several keys).
</para>
<para>
- Each unique user requires an prive key. These keys can be generated by Deltacloud Tools when launching an instance (see <xref linkend="sect-Cloud_Tools_Reference_Guide-Tasks-using_the_deltacloud_perspective"/>), using a number of external tools, or provided by a service such as Amazon EC2. Each private key must then be specified in the SSH2 private keys list prior to performing the ssh connection.
+ Each unique user requires an private key. These keys can be generated by Deltacloud Tools when launching an instance (see <xref linkend="sect-Cloud_Tools_Reference_Guide-Tasks-using_the_deltacloud_perspective"/>), using a number of external tools, or provided by a service such as Amazon EC2. Each private key must then be specified in the SSH2 private keys list prior to performing the ssh connection.
</para>
<note>
Modified: trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/using_the_deltacloud_perspective-task.xml
===================================================================
--- trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/using_the_deltacloud_perspective-task.xml 2011-03-22 00:17:03 UTC (rev 29929)
+++ trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/using_the_deltacloud_perspective-task.xml 2011-03-22 00:27:32 UTC (rev 29930)
@@ -16,7 +16,7 @@
</para>
<para>
- You can also right-click (or control-click on Mac OS) anywhere in the <guilabel>Cloud Viewer</guilabel> view and select the <guilabel>Launch Instance</guilabel> option to launch a new instance. See <xref linkend="theimagesview"/> for more information on lanching an instance.
+ You can also right-click (or control-click on Mac OS) anywhere in the <guilabel>Cloud Viewer</guilabel> view and select the <guilabel>Launch Instance</guilabel> option to launch a new instance. See <xref linkend="theimagesview"/> for more information on launching an instance.
</para>
<para>
13 years, 9 months
JBoss Tools SVN: r29929 - trunk/jsf/docs/userguide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-21 20:17:03 -0400 (Mon, 21 Mar 2011)
New Revision: 29929
Modified:
trunk/jsf/docs/userguide/en-US/css_perspective.xml
trunk/jsf/docs/userguide/en-US/editors.xml
Log:
"Fixed spelling errors"
Modified: trunk/jsf/docs/userguide/en-US/css_perspective.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/css_perspective.xml 2011-03-22 00:13:28 UTC (rev 29928)
+++ trunk/jsf/docs/userguide/en-US/css_perspective.xml 2011-03-22 00:17:03 UTC (rev 29929)
@@ -16,7 +16,7 @@
</para>
<para>
- The CSS Editing Perspective combines a set of views which allow you to see the structure of your css files, edit them and see the results. To use this perspective you need to choose <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open Perspective</guimenuitem><guimenuitem>CSS Editing</guimenuitem></menuchoice>. All of the views are fully synchronized with each other:the changes being made in one view are reflected in othes at once.
+ The CSS Editing Perspective combines a set of views which allow you to see the structure of your css files, edit them and see the results. To use this perspective you need to choose <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open Perspective</guimenuitem><guimenuitem>CSS Editing</guimenuitem></menuchoice>. All of the views are fully synchronized with each other: the changes being made in one view are reflected in others at once.
</para>
<para>
Modified: trunk/jsf/docs/userguide/en-US/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/editors.xml 2011-03-22 00:13:28 UTC (rev 29928)
+++ trunk/jsf/docs/userguide/en-US/editors.xml 2011-03-22 00:17:03 UTC (rev 29929)
@@ -1049,7 +1049,7 @@
<section id="ContentAssistForJavaFiles">
<title>Content Assist for Java Files</title>
<para>
- Various tools tips provide you additional information about Java elements (JavaDocs, source classes, return types, method names, params and etc.) when working with Java files.
+ Various tools tips provide you additional information about Java elements (JavaDocs, source classes, return types, method names, parameters and etc.) when working with Java files.
</para>
<figure>
@@ -1735,7 +1735,7 @@
</figure>
<para>
- If the style class isn ot chosen, the tab does not show any properties.
+ If the style class is not chosen, the tab does not show any properties.
</para>
<figure>
13 years, 9 months
JBoss Tools SVN: r29928 - trunk/jsf/docs/userguide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-21 20:13:28 -0400 (Mon, 21 Mar 2011)
New Revision: 29928
Modified:
trunk/jsf/docs/userguide/en-US/Visual_Web_Tools.xml
trunk/jsf/docs/userguide/en-US/css_perspective.xml
trunk/jsf/docs/userguide/en-US/palette.xml
Log:
"Fixed spelling errors"
Modified: trunk/jsf/docs/userguide/en-US/Visual_Web_Tools.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/Visual_Web_Tools.xml 2011-03-21 21:38:38 UTC (rev 29927)
+++ trunk/jsf/docs/userguide/en-US/Visual_Web_Tools.xml 2011-03-22 00:13:28 UTC (rev 29928)
@@ -102,7 +102,7 @@
</entry>
<entry>
- Powerful and customizable visual page editor that provides the ability to develop an application using any web technology including jsf, seam, struts, jsp, html and others. Development is done using three tabs: visual/source, source and preview. Fast and easy switching between these tabs. Split screen design of visual and source views. Full and instant synchronization between source and visual views. Integration with properties and outline views. Graphical toolbar to add inline styling to any tag.
+ Powerful and customizable visual page editor that provides the ability to develop an application using any web technology including JSF, Seam, Struts, JSP, HTML and others. Development is done using three tabs: <guilabel>Visual/Source</guilabel>, <guilabel>Source</guilabel> and <guilabel>Preview</guilabel>. Fast and easy switching between these tabs. Split screen design of visual and source views. Full and instant synchronization between source and visual views. Integration with properties and outline views. Graphical toolbar to add inline styling to any tag.
</entry>
<entry>
@@ -116,7 +116,7 @@
</entry>
<entry>
- An extensive collection of specialized editors for different file types including properties, TLD, web.xml, tiles, and so on. These include Graphical Properties Editor, Graphical TLD Editor, Graphical Web Application File (<filename>web.xml</filename>) Editor, CSS Editor, JavaScript Editor, XSD Editor, and support for XML Schema.
+ An extensive collection of specialized editors for different file types including properties, TLD, <filename>web.xml</filename>, tiles, and so on. These include Graphical Properties Editor, Graphical TLD Editor, Graphical Web Application File (<filename>web.xml</filename>) Editor, CSS Editor, JavaScript Editor, XSD Editor, and support for XML Schema.
</entry>
<entry>
@@ -130,7 +130,7 @@
</entry>
<entry>
- Organizing various tags by groups, inserting tags into a jsp or xhtml page with one click, adding custom or 3rd party tag libraries into the palette, easy controlling the number of tag groups shown on the palette.
+ Organizing various tags by groups, inserting tags into a <filename>JSP</filename> or <filename>XHTML</filename> page with one click, adding custom or 3rd party tag libraries into the palette, easy controlling the number of tag groups shown on the palette.
</entry>
<entry>
@@ -144,7 +144,7 @@
</entry>
<entry>
- Visualizing and displaying projects by function. Easy selecting of different kinds of items and dropping them into jsp pages. Using context menus to develop the application. Using icon shortcuts to create and import JSF and Struts projects. Expanding and inspecting tag library files. Selecting custom and third-party tag libraries to drag and drop onto the JBoss Tools Palette.
+ Visualizing and displaying projects by function. Easy selecting of different kinds of items and dropping them into <filename>JSP</filename> pages. Using context menus to develop the application. Using icon shortcuts to create and import JSF and Struts projects. Expanding and inspecting tag library files. Selecting custom and third-party tag libraries to drag and drop onto the JBoss Tools Palette.
</entry>
<entry>
@@ -172,7 +172,7 @@
</entry>
<entry>
- Code completion proposals while working with html, java, JavaScript , xml, jsp, xhtml, seam project and jsf configuration files. Content assist based on project data (dynamic code assist). Code completion for values from property files, beans attributes and methods, navigation rule outcomes and jsf variables.
+ Code completion proposals while working with HTML, Java, JavaScript , XML, JSP, XHTML, seam project and JSF configuration files. Content assist based on project data (dynamic code assist). Code completion for values from property files, beans attributes and methods, navigation rule outcomes and JSF variables.
</entry>
<entry>
@@ -186,7 +186,7 @@
</entry>
<entry>
- Possibility of inserting any tag onto the page you are editing by just drag-and-droping it from the palette to this page. Adding any properties, managed bean attributes, navigation rules, tag library file declarations, jsp files from web projects view by clicking them and dragging to source code.
+ Possibility of inserting any tag onto the page you are editing by just drag-and-droping it from the palette to this page. Adding any properties, managed bean attributes, navigation rules, tag library file declarations, <filename>JSP</filename> files from web projects view by clicking them and dragging to source code.
</entry>
<entry>
@@ -200,7 +200,7 @@
</entry>
<entry>
- Tight integration between JBDS and <ulink url="http://www.jboss.org/jbossrichfaces">RichFaces</ulink> frameworks. Easy managing RichFaces components in any web application. Support for RichFaces and Ajax4jsf libraries in JBoss Tools Palette. Rendering RichFaces components in Visual Page Editor.
+ Tight integration between JBoss Developer Studio and <ulink url="http://www.jboss.org/jbossrichfaces">RichFaces</ulink> frameworks. Easy managing RichFaces components in any web application. Support for RichFaces and Ajax4jsf libraries in JBoss Tools Palette. Rendering RichFaces components in Visual Page Editor.
</entry>
<entry>
@@ -233,7 +233,7 @@
</para>
<para>
- The latest documentation builds are available as <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">nightly builds</ulink>.
+ The latest documentation is available as <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">nightly builds</ulink>.
</para>
</section>
</chapter>
Modified: trunk/jsf/docs/userguide/en-US/css_perspective.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/css_perspective.xml 2011-03-21 21:38:38 UTC (rev 29927)
+++ trunk/jsf/docs/userguide/en-US/css_perspective.xml 2011-03-22 00:13:28 UTC (rev 29928)
@@ -210,7 +210,7 @@
</figure>
<para>
- When you click <emphasis><property>Ok</property></emphasis> the choosen fonts should appear in <emphasis><property>Font Family</property></emphasis> text field and in the sourse css file. To define other properties in CSS <emphasis><property>Text/Font</property></emphasis> tab you should just click button near the corresponding field you want and select the appropriate option in the list. Or if you are absolutely sure of the property's value to use you can just write it in the text field.
+ When you click the <guibutton>OK</guibutton> button the chosen fonts should appear in <guilabel>Font Family</guilabel> text field and in the source css file. To define other properties in CSS <guilabel>Text/Font</guilabel> tab you should just click button near the corresponding field you want and select the appropriate option in the list. Or if you are absolutely sure of the property's value to use you can just write it in the text field.
</para>
</listitem>
Modified: trunk/jsf/docs/userguide/en-US/palette.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/palette.xml 2011-03-21 21:38:38 UTC (rev 29927)
+++ trunk/jsf/docs/userguide/en-US/palette.xml 2011-03-22 00:13:28 UTC (rev 29928)
@@ -488,7 +488,7 @@
</para>
<para>
- Let's do it. Open your JSP file and place the cursor in a place where you'd like to add a tag and then click that tag in the palette. In the <guilabel>Insert Tag</guilabel> window that appears, you can set the value of<guilabel>general</guilabel> and <guilabel>advanced</guilabel> attributes of the tag that you choose.
+ Let's do it. Open your JSP file and place the cursor in a place where you'd like to add a tag and then click that tag in the palette. In the <guilabel>Insert Tag</guilabel> window that appears, you can set the value of <guilabel>general</guilabel> and <guilabel>advanced</guilabel> attributes of the tag that you choose.
</para>
<figure>
13 years, 9 months
JBoss Tools SVN: r29927 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-21 17:38:38 -0400 (Mon, 21 Mar 2011)
New Revision: 29927
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml
Log:
"Fixed spelling errors, cleaned up XML"
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml 2011-03-21 21:36:33 UTC (rev 29926)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml 2011-03-21 21:38:38 UTC (rev 29927)
@@ -146,8 +146,7 @@
<section id="OtherRelevantResourcesOnTheTopic33">
<?dbhtml filename="OtherRelevantResourcesOnTheTopic33.html"?>
<title>Other relevant resources on the topic</title>
- <para>JBDS on RedHat: <ulink url="http://www.redhat.com/developer_studio">JBoss Developer
- Studio</ulink>
+ <para>JBDS on RedHat: <ulink url="http://www.redhat.com/developer_studio">JBoss Developer Studio</ulink>
</para>
<para>Forum: <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss Forum</ulink></para>
<para>Wiki: <ulink url="http://www.jboss.org/community/wiki/JBossTools"> JBossToolsWiki </ulink></para>
13 years, 9 months
JBoss Tools SVN: r29926 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-21 17:36:33 -0400 (Mon, 21 Mar 2011)
New Revision: 29926
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml
Log:
"Fixed spelling errors"
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml 2011-03-21 21:35:40 UTC (rev 29925)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/getting_started.xml 2011-03-21 21:36:33 UTC (rev 29926)
@@ -87,7 +87,7 @@
</figure>
<para>
- You can start working with <property>JBoss Developer Studio</property> by clicking on <emphasis><property>Workbench</property></emphasis> button or simply closing the Welcome page.
+ You can start working with <property>JBoss Developer Studio</property> by clicking on the <guibutton>Workbench</guibutton> button or simply closing the Welcome page.
</para>
</section>
13 years, 9 months
JBoss Tools SVN: r29925 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-21 17:35:40 -0400 (Mon, 21 Mar 2011)
New Revision: 29925
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml
Log:
"Fixed spelling errors"
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml 2011-03-21 20:57:44 UTC (rev 29924)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml 2011-03-21 21:35:40 UTC (rev 29925)
@@ -1,92 +1,123 @@
<chapter id="installation">
- <?dbhtml filename="getting_started.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
- <title>Installing JBoss Developer Studio</title>
-
- <section id="ConfigJavaEnvironment">
- <?dbhtml filename="ConfigJavaEnvironment.html"?>
- <title>Configuring Your Java Environment</title>
- <para>
- You must have a working installation of JDK before you install <property>JBoss Developer Studio</property>. Thus in this guide we will show you how to install a 32-bit Sun JDK 6 on a Linux Platform and Microsoft Windows Platform.
- </para>
-
- <section id="InstallJDK60onLinux">
- <title>Installing and Configuring 32-bit Sun JDK 6 on Linux</title>
- <para>To install 32-bit Sun JDK 6 on Linux and configure it, you should follow the next steps:</para>
- <itemizedlist>
- <listitem>
- <para>
- Download the <ulink url="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Sun JDK 6</ulink> from Sun's website. Click the <guibutton>Download JDK</guibutton> button for the "JDK SE 6 Update <x>" (where "x" is the latest update number) option, select the Linux platform, agree to license agreement, and click the <guibutton>Continue</guibutton> button. You can then download the JDK installation package.
- </para>
- <para>
- You may need to set the executable flag on the downloaded file before it can be launched by running the <code>chmod +x</code> command, like so:
- <screen>chmod +x jdk-6u24-linux-i586-rpm.bin</screen>
- </para>
- <para>
- Launch the installation package, and follow the prompts to install Java JDK 6.
- </para>
- </listitem>
- <listitem>
- <para>
- If you don't want to use SysV service scripts you can install the "self-extracting file" for Linux instead of choosing the "RPM in self-extracting" file. In that case you can skip the next step mentioned here. But it is recommended to use the SysV service scripts for production servers.
- </para>
- </listitem>
- <listitem>
- <para>
- Download and install the appropriate -compat RPM from JPackage <ulink url="ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/">here</ulink>. Please ensure you choose a matching version of the -compat package to the JDK you've installed.
- </para>
- </listitem>
- <listitem>
- <para>
- Create an environment variable that points to the JDK installation directory and call it JAVA_HOME. Add <emphasis><property>$JAVA_HOME/bin</property></emphasis> to the system path to be able to run java from the command line. You can do this by adding the following lines to the .bashrc file in your home directory.
- </para>
- <programlisting><![CDATA[#In this example /usr/java/jdk1.6.0_24 is the JDK installation directory.
+<?dbhtml filename="getting_started.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+
+ <keyword>Eclipse</keyword>
+
+ <keyword>Java</keyword>
+
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Installing JBoss Developer Studio</title>
+ <section id="ConfigJavaEnvironment">
+<?dbhtml filename="ConfigJavaEnvironment.html"?>
+ <title>Configuring Your Java Environment</title>
+ <para>
+ You must have a working installation of JDK before you install <property>JBoss Developer Studio</property>. Thus in this guide we will show you how to install a 32-bit Sun JDK 6 on a Linux Platform and Microsoft Windows Platform.
+ </para>
+
+ <section id="InstallJDK60onLinux">
+ <title>Installing and Configuring 32-bit Sun JDK 6 on Linux</title>
+ <para>
+ To install 32-bit Sun JDK 6 on Linux and configure it, you should follow the next steps:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Download the <ulink url="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Sun JDK 6</ulink> from Sun's website. Click the
+ <guibutton>
+ Download JDK
+ </guibutton>
+ button for the "JDK SE 6 Update <x>" (where "x" is the latest update number) option, select the Linux platform, agree to license agreement, and click the
+ <guibutton>
+ Continue
+ </guibutton>
+ button. You can then download the JDK installation package.
+ </para>
+
+ <para>
+ You may need to set the executable flag on the downloaded file before it can be launched by running the <code>chmod +x</code> command, like so:
+ <screen>
+ chmod +x jdk-6u24-linux-i586-rpm.bin
+ </screen>
+ </para>
+
+ <para>
+ Launch the installation package, and follow the prompts to install Java JDK 6.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ If you don't want to use SysV service scripts you can install the "self-extracting file" for Linux instead of choosing the "RPM in self-extracting" file. In that case you can skip the next step mentioned here. But it is recommended to use the SysV service scripts for production servers.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Download and install the appropriate -compat RPM from JPackage <ulink url="ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/">here</ulink>. Please ensure you choose a matching version of the -compat package to the JDK you've installed.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Create an environment variable that points to the JDK installation directory and call it JAVA_HOME. Add <filename>$JAVA_HOME/bin</filename> to the system path to be able to run java from the command line. You can do this by adding the following lines to the .bashrc file in your home directory.
+ </para>
+
+ <programlisting>
+<![CDATA[#In this example /usr/java/jdk1.6.0_24 is the JDK installation directory.
export JAVA_HOME=/usr/java/jdk1.6.0_24
-export PATH=$PATH:$JAVA_HOME/bin]]></programlisting>
- </listitem>
- </itemizedlist>
+export PATH=$PATH:$JAVA_HOME/bin]]>
+ </programlisting>
+ </listitem>
+ </itemizedlist>
+
+ <note>
+ <title>Note:</title>
+ <para>
+ If you have JDK already installed and added in your system path, you should add <filename>$JAVA_HOME/bin</filename> before the old <emphasis>$PATH</emphasis> (not after it) so that the new version of JDK can be found first, i. e. <code>export PATH=$JAVA_HOME/bin:$PATH</code> This way, the machine will pick up the new JVM first. You only need to run "alternative" as a safe guard for the right JVM.
+ </para>
+ </note>
+
+ <para>
+ Set this variable for your account doing the installation and also for the user account that will run the server.
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ If you have more than one version of JVM installed on your machine, make sure you are using the JDK 1.6 installation as the default java and javac. You can do this using the alternatives system. The alternatives system allows different versions of Java from different sources to co-exist on your system.
+ </para>
+
+ <note>
+ <title>Note</title>
+ <para>
+ If the JDK is not listed by the alternatives command, you can manually add it with the following commands (substitute the location of your JDK for <filename>/usr/java/jdk1.6.0_24</filename> where appropriate):
+ <screen>
+ sudo /usr/sbin/alternatives --install "/usr/bin/java" "java" "/usr/java/jdk1.6.0_24/bin/java" 1 sudo /usr/sbin/alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk1.6.0_24/bin/javac" 1 sudo /usr/sbin/alternatives --install "/usr/lib/jvm/java-1.6.0" "java_sdk_1.6.0" "/usr/java/jdk1.6.0_24" 1
+ </screen>
+ </para>
+ </note>
+ </listitem>
+ </itemizedlist>
+
+ <section id="SelectAlternativesforJava">
+ <title>Select alternatives for java, javac and java_sdk_1.6.0</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ As a root user, type the following command at the shell prompt and you should see something like this:
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting>
+<![CDATA[sudo /usr/sbin/alternatives --config java
- <note>
- <title>Note:</title>
-
- <para>
- If you have JDK already installed and added in your system path, you should add <emphasis>$JAVA_HOME/bin</emphasis> before the old <emphasis>$PATH</emphasis> (not after it) so that the new version of JDK can be found first, i. e. <emphasis>export PATH=$JAVA_HOME/bin:$PATH</emphasis> This way, the machine will pick up the new JVM first. You only need to run "alternative" as a safe guard for the right JVM.
- </para>
- </note>
-
- <para>Set this variable for your account doing the installation and also for the user account that will run the server.</para>
- <itemizedlist>
- <listitem>
- <para>
- If you have more than one version of JVM installed on your machine, make sure you are using the JDK 1.6 installation as the default java and javac. You can do this using the alternatives system. The alternatives system allows different versions of Java from different sources to co-exist on your system.
- </para>
- <note>
- <title>Note</title>
- <para>
- If the JDK is not listed by the alternatives command, you can manually add it with the following commands (substitute the location of your JDK for <filename>/usr/java/jdk1.6.0_24</filename> where appropriate):
- <screen>sudo /usr/sbin/alternatives --install "/usr/bin/java" "java" "/usr/java/jdk1.6.0_24/bin/java" 1
-sudo /usr/sbin/alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk1.6.0_24/bin/javac" 1
-sudo /usr/sbin/alternatives --install "/usr/lib/jvm/java-1.6.0" "java_sdk_1.6.0" "/usr/java/jdk1.6.0_24" 1</screen>
- </para>
- </note>
- </listitem>
- </itemizedlist>
- <section id="SelectAlternativesforJava">
- <title>Select alternatives for java, javac and java_sdk_1.6.0</title>
- <itemizedlist>
- <listitem>
- <para>As a root user, type the following command at the shell prompt and you should see something like this:</para>
- </listitem>
- </itemizedlist>
- <programlisting><![CDATA[sudo /usr/sbin/alternatives --config java
-
There are 3 programs which provide 'java'.
Selection Command
@@ -95,16 +126,23 @@
* 2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
+ 3 /usr/java/jdk1.6.0_24/bin/java
-Enter to keep the current selection[+], or type selection number: ]]></programlisting>
- <para>
- Make sure the Sun version [/usr/java/jdk1.6.0_24/bin/java in this case] is selected (marked with a '+' in the output), or select it by entering its number as prompted.
- </para>
- <itemizedlist>
- <listitem>
- <para>Repeat the same for javac and java_sdk_1.6.0.</para>
- </listitem>
- </itemizedlist>
- <programlisting><![CDATA[sudo /usr/sbin/alternatives --config javac
+Enter to keep the current selection[+], or type selection number: ]]>
+ </programlisting>
+
+ <para>
+ Make sure the Sun version [/usr/java/jdk1.6.0_24/bin/java in this case] is selected (marked with a '+' in the output), or select it by entering its number as prompted.
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Repeat the same for javac and java_sdk_1.6.0.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting>
+<![CDATA[sudo /usr/sbin/alternatives --config javac
There are 2 programs which provide 'javac'.
@@ -124,283 +162,371 @@
* 1 /usr/lib/jvm/java-1.6.0-openjdk.x86_64
+ 2 /usr/java/jdk1.6.0_24
-Enter to keep the current selection[+], or type selection number: ]]></programlisting>
- <para>You should verify that java, javac and java_sdk_1.6.0 all point to the same manufacturer and version.</para>
- <note>
- <title>Note:</title>
- <para>You can always override this step by setting the JAVA_HOME environment variable as explained in the previous step.</para>
- </note>
- <itemizedlist>
- <listitem>
- <para>
- Make sure that the java executable is in your path and that you are using an appropriate version. To verify your Java environment, type "java -version" at the shell prompt and you should see something like this:
- </para>
- </listitem>
- </itemizedlist>
- <programlisting><![CDATA[java -version
+Enter to keep the current selection[+], or type selection number: ]]>
+ </programlisting>
+
+ <para>
+ You should verify that java, javac and java_sdk_1.6.0 all point to the same manufacturer and version.
+ </para>
+
+ <note>
+ <title>Note:</title>
+ <para>
+ You can always override this step by setting the JAVA_HOME environment variable as explained in the previous step.
+ </para>
+ </note>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Make sure that the java executable is in your path and that you are using an appropriate version. To verify your Java environment, type <code>java -version</code> at the shell prompt and you should see something like this:
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting>
+<![CDATA[java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
-Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)]]></programlisting>
- </section>
-
- </section>
- <section id="InstallJDK60onWindows">
- <title>Installing and Configuring 32-bit Sun JDK 6 on Microsoft Windows</title>
-
- <para>To install and configure 32-bit Sun JDK 6 on Microsoft Windows, follow these steps:</para>
- <itemizedlist>
- <listitem>
- <para>
- Download the <ulink url="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Sun JDK 6</ulink> from Oracle's website. Choose "JDK 6 Update <x>" (where "x" is the latest update number) for download and then select your Windows Platform options to perform the installation.
- </para>
- </listitem>
- <listitem>
- <para>
- Create an environment variable called JAVA_HOME that points to the JDK installation directory, for example: <emphasis>C:\Program Files\Java\jdk1.6.0_24\</emphasis>
- </para>
- </listitem>
- </itemizedlist>
-
- <para>In order to run java from the command line, add the <emphasis>jre\bin</emphasis> directory
- to your path, for example:</para>
- <para>
- <emphasis>C:\Program Files\Java\jdk1.6.0_24\jre\bin</emphasis>
- </para>
- <para>To do this, open the <emphasis>
- <property>Control Panel</property>
- </emphasis> from the <emphasis>
- <property>Start</property>
- </emphasis> menu, switch to Classic View if necessary, open the System Control Panel applet (<emphasis>
- <property>System</property>
- </emphasis>), select the <emphasis>
- <property>Advanced</property>
- </emphasis> Tab, and click on the <emphasis>
- <property>Environment Variables</property>
- </emphasis> button.</para>
- <para>Now, when 32-bit Sun JDK 6 has been successfully installed, we can pass on to the next
- step.</para>
- </section>
-
- </section>
-
- <section id="InstallingJBDS">
- <?dbhtml filename="InstallingRHDS.html"?>
- <title>JBoss Developer Studio Installation</title>
-
- <para>This chapter will provide you with detailed information on how to install <property>JBoss Developer Studio</property>.</para>
-
- <para>
- JBoss Developer Studio comes with a simple installer, bundled with tested and preconfigured versions of Eclipse, WTP, JBossEAP, Seam, and SpringIDE. The following steps show you how to install JBDS:
- </para>
-
- <itemizedlist>
- <listitem>
- <para>
- First of all you need the appropriate installation file for your platform from <ulink url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">Red Hat website</ulink>.
- </para>
- </listitem>
- <listitem>
- <para>Run the following command in a terminal window:</para>
- <programlisting role="JAVA"><![CDATA[java -jar jbdevstudio-eap-linux-gtk-4.0.0.GA.jar]]></programlisting>
- </listitem>
- <listitem>
- <para>Follow the instructions presented by the installation wizard:</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>JBoss Developer Studio Installation Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Provide the installation path</para>
- </listitem>
- <listitem>
- <para>Select the appropriate Java Virtual Machine</para>
- </listitem>
- </itemizedlist>
-
- <note>
- <title>Tip:</title>
- <para>
- By selecting <emphasis><property>Default Java VM</property></emphasis> you set default Java VM of your system (to verify your Java environment, type "java -version" in console).
- </para>
- </note>
-
- <para>Selecting <emphasis>
- <property>Specific Java VM</property>
- </emphasis> you can provide the path to non-default Java VM.</para>
-
- <note>
- <title>Note:</title>
- <para>
- JBoss Developer Studio 4.0 comes integrated with JBoss EAP 5.1 that requires JDK 6.0 to run and "gij" isn't available on every platform.
- </para>
- </note>
-
- <figure>
- <title>Select Java VM</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>
- As part of the installation you can choose to install <ulink url="http://www.jboss.com/products/platforms/application">JBoss Enterprise Application Platform</ulink>. Select <emphasis><property>Yes</property></emphasis> to use it in JBoss Developer Studio.
- </para>
- <note>
- <title>Note:</title>
- <para>Like in the previous version of JBDS, JBDS 4.0.0.GA comes integrated with JBoss EAP 5.1 that supports EAP 5 adapter and Seam 2.2.</para>
- </note>
-
- <para>This step lets you configure locally available JBoss Application Servers: </para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>JBoss Enterprise Application Platform Installing</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>
- You can fill the list automatically using the <guibutton>Find</guibutton> button. When the <guibutton>Find</guibutton> button is clicked you are prompted to select the folder from which to search for available JBoss Application Servers. Click the <guibutton>OK</guibutton> button to select the chosen folder.
- </para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Finding Servers in the Selected Directory</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_3_3_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para/>
-
- <itemizedlist>
- <listitem>
- <para> All available servers in the selected directory will be added to the list with the following details: Name, Type, Version and Location.</para>
- </listitem>
- </itemizedlist>
-
- <itemizedlist>
- <listitem>
- <para>You can also add servers one by one using the <guibutton>Add</guibutton> button:</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Add Server to be Configured</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_3_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para/>
-
- <para>
- Click on the <guibutton>Browse</guibutton> button and select the server location. Fields Name, Type and Version will be filled in automatically:
- </para>
-
- <figure>
- <title>Specify Server Location</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_3_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para/>
-
- <para>When you click the <guibutton>OK</guibutton> button the server will be added to the list with the details on its type, version and location.</para>
-
- <para>
- The <guibutton>Remove</guibutton> button will the remove the selected server from the list. If necessary, you can edit the server details clicking on the <guibutton>Edit</guibutton> button:
- </para>
-
- <figure>
- <title>Edit Server</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_3_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para/>
-
- <!-- <note>
+Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)]]>
+ </programlisting>
+ </section>
+ </section>
+
+ <section id="InstallJDK60onWindows">
+ <title>Installing and Configuring 32-bit Sun JDK 6 on Microsoft Windows</title>
+ <para>
+ To install and configure 32-bit Sun JDK 6 on Microsoft Windows, follow these steps:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Download the <ulink url="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Sun JDK 6</ulink> from Oracle's website. Choose "JDK 6 Update <x>" (where "x" is the latest update number) for download and then select your Windows Platform options to perform the installation.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Create an environment variable called JAVA_HOME that points to the JDK installation directory, for example: <filename>C:\Program Files\Java\jdk1.6.0_24\</filename>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ In order to run java from the command line, add the <emphasis>jre\bin</emphasis> directory to your path, for example:
+ </para>
+
+ <para>
+ <filename>C:\Program Files\Java\jdk1.6.0_24\jre\bin</filename>
+ </para>
+
+ <para>
+ To do this, open the <guilabel>Control Panel</guilabel> from the <guilabel>Start</guilabel> menu, switch to Classic View if necessary, open the System Control Panel applet (<guilabel>System</guilabel>), select the <guilabel>Advanced</guilabel> Tab, and click on the <guibutton>Environment Variables</guibutton> button.
+ </para>
+
+ <para>
+ Now, when 32-bit Sun JDK 6 has been successfully installed, we can pass on to the next step.
+ </para>
+ </section>
+ </section>
+
+ <section id="InstallingJBDS">
+<?dbhtml filename="InstallingRHDS.html"?>
+ <title>JBoss Developer Studio Installation</title>
+ <para>
+ This chapter will provide you with detailed information on how to install <property>JBoss Developer Studio</property>.
+ </para>
+
+ <para>
+ JBoss Developer Studio comes with a simple installer, bundled with tested and preconfigured versions of Eclipse, WTP, JBossEAP, Seam, and SpringIDE. The following steps show you how to install JBDS:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ First of all you need the appropriate installation file for your platform from <ulink url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">Red Hat website</ulink>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Run the following command in a terminal window:
+ </para>
+
+ <programlisting role="JAVA">
+<![CDATA[java -jar jbdevstudio-eap-linux-gtk-4.0.0.GA.jar]]>
+ </programlisting>
+ </listitem>
+
+ <listitem>
+ <para>
+ Follow the instructions presented by the installation wizard:
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>JBoss Developer Studio Installation Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Provide the installation path
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Select the appropriate Java Virtual Machine
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <note>
+ <title>Tip:</title>
+ <para>
+ By selecting <emphasis><property>Default Java VM</property></emphasis> you set default Java VM of your system (to verify your Java environment, type "java -version" in console).
+ </para>
+ </note>
+
+ <para>
+ Selecting <emphasis> <property>Specific Java VM</property> </emphasis> you can provide the path to non-default Java VM.
+ </para>
+
+ <note>
+ <title>Note:</title>
+ <para>
+ JBoss Developer Studio 4.0 comes integrated with JBoss EAP 5.1 that requires JDK 6.0 to run and "gij" isn't available on every platform.
+ </para>
+ </note>
+
+ <figure>
+ <title>Select Java VM</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ As part of the installation you can choose to install <ulink url="http://www.jboss.com/products/platforms/application">JBoss Enterprise Application Platform</ulink>. Select <emphasis><property>Yes</property></emphasis> to use it in JBoss Developer Studio.
+ </para>
+
+ <note>
+ <title>Note:</title>
+ <para>
+ Like in the previous version of JBDS, JBDS 4.0.0.GA comes integrated with JBoss EAP 5.1 that supports EAP 5 adapter and Seam 2.2.
+ </para>
+ </note>
+
+ <para>
+ This step lets you configure locally available JBoss Application Servers:
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>JBoss Enterprise Application Platform Installing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ You can fill the list automatically using the
+ <guibutton>
+ Find
+ </guibutton>
+ button. When the
+ <guibutton>
+ Find
+ </guibutton>
+ button is clicked you are prompted to select the folder from which to search for available JBoss Application Servers. Click the
+ <guibutton>
+ OK
+ </guibutton>
+ button to select the chosen folder.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Finding Servers in the Selected Directory</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3_3_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para/>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ All available servers in the selected directory will be added to the list with the following details: Name, Type, Version and Location.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ You can also add servers one by one using the
+ <guibutton>
+ Add
+ </guibutton>
+ button:
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Add Server to be Configured</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para/>
+
+ <para>
+ Click on the
+ <guibutton>
+ Browse
+ </guibutton>
+ button and select the server location. Fields Name, Type and Version will be filled in automatically:
+ </para>
+
+ <figure>
+ <title>Specify Server Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para/>
+
+ <para>
+ When you click the
+ <guibutton>
+ OK
+ </guibutton>
+ button the server will be added to the list with the details on its type, version and location.
+ </para>
+
+ <para>
+ The
+ <guibutton>
+ Remove
+ </guibutton>
+ button will the remove the selected server from the list. If necessary, you can edit the server details clicking on the
+ <guibutton>
+ Edit
+ </guibutton>
+ button:
+ </para>
+
+ <figure>
+ <title>Edit Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para/>
+<!-- <note>
<title>Note:</title>
<para>The installer installs JBoss Enterprise Application Platform for running your applications
if you select this option during the installation process. If you want to use a different server
than ours, you can change the setting in JBoss Developer Studio.</para>
</note>-->
+ <itemizedlist>
+ <listitem>
+ <para>
+ Click the
+ <guibutton>
+ Next
+ </guibutton>
+ button to bring up a summary page where you can check your installation paths and see the components that will be installed. If you'd like to change something, press the
+ <guibutton>
+ Previous
+ </guibutton>
+ button. Click the
+ <guibutton>
+ Next
+ </guibutton>
+ button to start installation.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para/>
+
+ <figure>
+ <title>Summary Information</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="tech_previews">
+ <title>Getting Access to Tech Previews</title>
+ <para>
+ A number of components that are not officially supported in this release of JDBS have been made available through an additional Tech Preview Eclipse update site. To access this update site select <menuchoice><guimenuitem>Help</guimenuitem><guimenuitem>Install New Software...</guimenuitem></menuchoice> in Eclipse, click the
+ <guibutton>
+ Add...
+ </guibutton>
+ button, and in the <guilabel>Add Repository</guilabel> dialog box enter <guilabel>JBDS Tech Preview</guilabel> in the <guilabel>Name</guilabel> field and <guilabel>http://devstudio.jboss.com/updates/4.0/techpreview</guilabel> in the <guilabel>Location</guilabel> field. Click the
+ <guibutton>
+ OK
+ </guibutton>
+ button to save your changes.
+ </para>
+
+ <para>
+ Eclipse will then list the components available on the update site, which you can select and install by following the prompts.
+ </para>
+
+ <note>
+ <title>Note</title>
+ <para>
+ If you are prompted for credentials when accessing the Tech Preview Update Site, enter the username and password that were supplied in an email or shown in the Update Guide available on the <ulink url="http://access.redhat.com">Customer Service Portal</ulink>. If you experience any issues accessing the Tech Preview Update Site please contact technical support.
+ </para>
+ </note>
+ </section>
+
+ <section>
+ <title>Updating JBoss Developer Studio</title>
+ <para>
+ Updates to JBDS can be installed by selecting <menuchoice><guimenuitem>Help</guimenuitem><guimenuitem>Check For Updates</guimenuitem></menuchoice> from within Eclipse. You may be prompted for a username and password. These are the same credentials that are required to access the Tech Preview update site (see <xref linkend="tech_previews"/>).
+ </para>
+ </section>
+<!--section id="jbds_jbosstools">
- <itemizedlist>
- <listitem>
- <para>Click the <guibutton>Next</guibutton> button to bring up a summary page where you can check your installation paths and see the components that will be installed. If you'd like to change something, press the <guibutton>Previous</guibutton> button. Click the <guibutton>Next</guibutton> button to start installation. </para>
- </listitem>
- </itemizedlist>
-
- <para/>
-
- <figure>
- <title>Summary Information</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="tech_previews">
- <title>Getting Access to Tech Previews</title>
-
- <para>
- A number of components that are not officially supported in this release of JDBS have been made available through an additional Tech Preview Eclipse update site. To access this update site select <menuchoice><guimenuitem>Help</guimenuitem><guimenuitem>Install New Software...</guimenuitem></menuchoice> in Eclipse, click the <guibutton>Add...</guibutton> button, and in the <guilabel>Add Repository</guilabel> dialog box enter <guilabel>JBDS Tech Preview</guilabel> in the <guilabel>Name</guilabel> field and <guilabel>http://devstudio.jboss.com/updates/4.0/techpreview</guilabel> in the <guilabel>Location</guilabel> field. Click the <guibutton>OK</guibutton> button to save your changes.
- </para>
-
- <para>
- Eclipse will then list the components available on the update site, which you can select and install by following the prompts.
- </para>
-
- <note>
- <title>Note</title>
- <para>
- If you are prompted for credentials when accessing the Tech Preview Update Site, enter the username and password that were supplied in an email or shown in the Update Guide available on the <ulink url="http://access.redhat.com">Customer Service Portal</ulink>. If you experience any issues accessing the Tech Preview Update Site please contact technical support.
- </para>
- </note>
-
- </section>
-
- <section>
- <title>Updating JBoss Developer Studio</title>
- <para>
- Updates to JBDS can be installed by selecting <menuchoice><guimenuitem>Help</guimenuitem><guimenuitem>Check For Updates</guimenuitem></menuchoice> from within Eclipse. You may be prompted for a username and password. These are the same credentials that are required to access the Tech Preview update site (see <xref linkend="tech_previews"/>).
- </para>
- </section>
-
- <!--section id="jbds_jbosstools">
-
<title>JBoss Developer Studio and JBoss Tools</title>
<para>
13 years, 9 months
JBoss Tools SVN: r29924 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-21 16:57:44 -0400 (Mon, 21 Mar 2011)
New Revision: 29924
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
trunk/documentation/guides/GettingStartedGuide/en-US/gsg_faq.xml
trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml
trunk/documentation/guides/GettingStartedGuide/en-US/introduction.xml
trunk/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml
trunk/documentation/guides/GettingStartedGuide/en-US/usage_reporting.xml
Log:
"Fixed spelling errors"
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-03-21 18:41:34 UTC (rev 29923)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-03-21 20:57:44 UTC (rev 29924)
@@ -3,22 +3,22 @@
]>
<bookinfo>
- <title>Getting Started Guide</title>
- <subtitle>Provides information on how the JBoss Developer Studio functions.</subtitle>
- <productname>JBoss Developer Studio</productname>
- <productnumber>4.0</productnumber>
- <edition>4.0.0</edition>
- <pubsnumber>12</pubsnumber>
- <abstract>
- <para>The Getting Started Guide explains the JBoss Developer Studio.</para>
- </abstract>
- <corpauthor>
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="Common_Content/images/title_logo.svg" format="SVG"></imagedata>
- </imageobject>
- </inlinemediaobject>
- </corpauthor>
- <xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
- <xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
-</bookinfo>
+<title>Getting Started Guide</title>
+<subtitle>Provides information on how the JBoss Developer Studio functions.</subtitle>
+<productname>JBoss Developer Studio</productname>
+<productnumber>4.0</productnumber>
+<edition>4.0.0</edition>
+<pubsnumber>2</pubsnumber>
+<abstract>
+<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
+</abstract>
+<corpauthor>
+<inlinemediaobject>
+<imageobject>
+<imagedata fileref="Common_Content/images/title_logo.svg" format="SVG"></imagedata>
+</imageobject>
+</inlinemediaobject>
+</corpauthor>
+<xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+</bookinfo>
\ No newline at end of file
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2011-03-21 18:41:34 UTC (rev 29923)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2011-03-21 20:57:44 UTC (rev 29924)
@@ -650,7 +650,7 @@
<note>
<title>Tip</title>
<para>
- If you see the error <code>java.lang.ClassNotFoundException: org.jboss.seam.servlet.SeamListener</code> in the console output from the Application Server, you may need to copy the <filename>jboss-seam.jar</filename> file from the <filename>lib</filename> subdirectoy in the Seam library (which can be downloaded from <ulink url="http://seamframework.org/Seam2/Seam2DistributionDownloads">here</ulink>) into the <filename>/server/default/deploy/workshop.war/WEB-INF/lib/</filename> subdirectory in your Application Server (where "default" refers to the server profile that you are using).
+ If you see the error <code>java.lang.ClassNotFoundException: org.jboss.seam.servlet.SeamListener</code> in the console output from the Application Server, you may need to copy the <filename>jboss-seam.jar</filename> file from the <filename>lib</filename> subdirectory in the Seam library (which can be downloaded from <ulink url="http://seamframework.org/Seam2/Seam2DistributionDownloads">here</ulink>) into the <filename>/server/default/deploy/workshop.war/WEB-INF/lib/</filename> subdirectory in your Application Server (where "default" refers to the server profile that you are using).
</para>
</note>
<note>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/gsg_faq.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/gsg_faq.xml 2011-03-21 18:41:34 UTC (rev 29923)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/gsg_faq.xml 2011-03-21 20:57:44 UTC (rev 29924)
@@ -165,7 +165,7 @@
<title>Is it possible to increase the performance of Eclipse after installing your product?</title>
<para>
- <property>JBoss Developer Studio</property> preconfigures eclipse via the <filename>eclipse.ini</filename> file to allocate extra memory, but if you for some reason need more memory then by default, you can manually make adjustments in this file. For example:</para>
+ <property>JBoss Developer Studio</property> configures eclipse via the <filename>eclipse.ini</filename> file to allocate extra memory, but if you for some reason need more memory then by default, you can manually make adjustments in this file. For example:</para>
<programlisting role="XML"><![CDATA[-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m]]></programlisting>
</section>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml 2011-03-21 18:41:34 UTC (rev 29923)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/installation.xml 2011-03-21 20:57:44 UTC (rev 29924)
@@ -23,7 +23,7 @@
<itemizedlist>
<listitem>
<para>
- Download the <ulink url="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Sun JDK 6</ulink> from Sun's website. Click the <guibutton>Download JDK</guibutton> button for the "JDK SE 6 Update <x>" (where "x" is the latest update number) option, select the Linux platform, agree to license agreement, anc click the <guibutton>Continue</guibutton> button. You can then download the JDK installation package.
+ Download the <ulink url="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Sun JDK 6</ulink> from Sun's website. Click the <guibutton>Download JDK</guibutton> button for the "JDK SE 6 Update <x>" (where "x" is the latest update number) option, select the Linux platform, agree to license agreement, and click the <guibutton>Continue</guibutton> button. You can then download the JDK installation package.
</para>
<para>
You may need to set the executable flag on the downloaded file before it can be launched by running the <code>chmod +x</code> command, like so:
@@ -190,7 +190,7 @@
<para>This chapter will provide you with detailed information on how to install <property>JBoss Developer Studio</property>.</para>
<para>
- JBDS comes with a simple installer, bundled with tested and pre-configured versions of Eclipse, WTP, JBossEAP, Seam, and SpringIDE. The following steps show you how to install JBDS:
+ JBoss Developer Studio comes with a simple installer, bundled with tested and preconfigured versions of Eclipse, WTP, JBossEAP, Seam, and SpringIDE. The following steps show you how to install JBDS:
</para>
<itemizedlist>
@@ -395,7 +395,7 @@
<section>
<title>Updating JBoss Developer Studio</title>
<para>
- Updates to JBDS can be installed by selecting <menuchoice><guimenuitem>Help</guimenuitem><guimenuitem>Check For Updates</guimenuitem></menuchoice> from withing Eclipse. You may be prompted for a username and password. These are the same credentials that are required to access the Tech Preview update site (see <xref linkend="tech_previews"/>).
+ Updates to JBDS can be installed by selecting <menuchoice><guimenuitem>Help</guimenuitem><guimenuitem>Check For Updates</guimenuitem></menuchoice> from within Eclipse. You may be prompted for a username and password. These are the same credentials that are required to access the Tech Preview update site (see <xref linkend="tech_previews"/>).
</para>
</section>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/introduction.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/introduction.xml 2011-03-21 18:41:34 UTC (rev 29923)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/introduction.xml 2011-03-21 20:57:44 UTC (rev 29924)
@@ -13,7 +13,7 @@
<section id="intro1">
<title>What is JBDS?</title>
<para>
- <property>JBoss Developer Studio</property> is a set of eclipse-based development tools that have been pre-configured for JBoss Enterprise Middleware Platforms and Red Hat Enterprise Linux. Developers are not required to use <property>JBoss Developer Studio</property> to develop on JBoss Enterprise Middleware and/or Red Hat Linux. But, many find these pre-configured tools offer significant time-savings and value, making them more productive and reducing deployment times.
+ <property>JBoss Developer Studio</property> is a set of Eclipse based development tools that have been pre-configured for JBoss Enterprise Middleware Platforms and Red Hat Enterprise Linux. Developers are not required to use <property>JBoss Developer Studio</property> to develop on JBoss Enterprise Middleware and/or Red Hat Linux. But, many find these preconfigured tools offer significant time-savings and value, making them more productive and reducing deployment times.
</para>
<para>
This guide covers the first steps required to get started with <property>JBoss Developer Studio</property>. You will learn how to install and configure the software necessary for your OS (currently Linux, Microsoft Windows or Mac OSX), including detailed information on how to install, configure and use JDK, JBDS and JBoss Tools.
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml 2011-03-21 18:41:34 UTC (rev 29923)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml 2011-03-21 20:57:44 UTC (rev 29924)
@@ -1,332 +1,460 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="jsp_application">
- <?dbhtml filename="jsp_application.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>JSP</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
- <title>Developing a simple JSP web application</title>
-
- <note>
- <title>Note:</title>
- <para>We highly recommend developing in <property>Seam</property>. This chapter is for users who for some reason cannot use Seam.</para>
- </note>
-
- <para>In this chapter you'll find out how to create a simple <ulink
- url="http://java.sun.com/products/jsp/">JSP</ulink> application using
- <property>JBoss Developer Studio</property>. The application will show a classic
- "Hello World!" on the page.</para>
- <para>We'll assume that you have already launched <property>JBoss Developer
- Studio</property> and also that the <property>Web Development</property> perspective is the
- current perspective. If not, make it active by selecting <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open Perspective</guimenuitem><guimenuitem>Web Development</guimenuitem></menuchoice> from the menu bar or by selecting <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open Perspective</guimenuitem><guimenuitem>Other...</guimenuitem></menuchoice> from the menu bar and then selecting Web Development from the Select Perspective
- dialog box.</para>
-
- <section id="SettingUpTheProject">
- <?dbhtml filename="SettingUpTheProject.html"?>
- <title>Setting Up the Project</title>
- <para>We are going to start by creating a Dynamic Web Project with a minimal
- structure, i.e. with just required facets. Thus this section will perform you all
- necessary steps on how to do this.</para>
- <itemizedlist>
- <listitem>
- <para>Go to the menu bar and select <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>Other...</guimenuitem></menuchoice></para>
- </listitem>
- <listitem>
- <para>Select <menuchoice><guimenuitem>Web</guimenuitem><guimenuitem>Dynamic Web Project</guimenuitem></menuchoice> in the New Project dialog box</para>
- </listitem>
- <listitem>
- <para>Click the <guibutton>Next</guibutton> button
- </para>
- </listitem>
- <listitem>
- <para>Enter "jspHello" as a project name</para>
- </listitem>
- <listitem>
- <para>Then select <emphasis>
- <property>Minimal Configuration</property>
- </emphasis> from the list of possible configurations and click the <guibutton>Finish</guibutton> button.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Create New Web Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The <emphasis><property>jspHello</property></emphasis> node should appear in the upper-left <property>Package Explorer</property> view.</para>
- <figure>
- <title>New Web Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="CreatingJSPPage">
- <?dbhtml filename="CreatingJSPPage.html"?>
- <title>Creating JSP Page</title>
- <para>This section covers all the points how to create, edit and then preview JSP page.</para>
- <para>In our simple application we need to create only one JSP page which displays a
- <emphasis>"Hello World!"</emphasis> message.</para>
- <itemizedlist>
- <listitem>
- <para>Right click the <filename>WebContent</filename> folder and select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>JSP</guimenuitem></menuchoice>.</para>
- </listitem>
- <listitem>
- <para>Type <filename>hello.jsp</filename> for a file name and click the <guibutton>Next</guibutton> button.</para>
- </listitem>
- </itemizedlist>
- <para>In the next window you can choose a template for your JSP page and see its preview.</para>
- <itemizedlist>
- <listitem>
- <para>Select <emphasis>
- <property>New JSP File (xhtml)</property>
- </emphasis> template and click the <guibutton>Finish</guibutton> button.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Create JSP Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Our <filename>hello.jsp</filename> page will now appear in the <property>Project Explorer</property> view.
- </para>
- <section id="EditingJSPPage">
- <?dbhtml filename="EditingJSPPage.html"?>
- <title>Editing a JSP Page</title>
- <para>Let's now make a little change so that a JSP page displays
- <emphasis>"Hello World!"</emphasis> message.</para>
- <itemizedlist>
- <listitem>
- <!--<para>Insert this line inside the <emphasis role="bold">
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="jsp_application">
+<?dbhtml filename="jsp_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+
+ <keyword>JSP</keyword>
+
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Developing a simple JSP web application</title>
+ <note>
+ <title>Note:</title>
+ <para>
+ We highly recommend developing in <property>Seam</property>. This chapter is for users who for some reason cannot use Seam.
+ </para>
+ </note>
+
+ <para>
+ In this chapter you'll find out how to create a simple <ulink
+ url="http://java.sun.com/products/jsp/">JSP</ulink> application using <property>JBoss Developer Studio</property>. The application will show a classic "Hello World!" on the page.
+ </para>
+
+ <para>
+ We'll assume that you have already launched <property>JBoss Developer Studio</property> and also that the <property>Web Development</property> perspective is the current perspective. If not, make it active by selecting <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open Perspective</guimenuitem><guimenuitem>Web Development</guimenuitem></menuchoice> from the menu bar or by selecting <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open Perspective</guimenuitem><guimenuitem>Other...</guimenuitem></menuchoice> from the menu bar and then selecting Web Development from the Select Perspective dialog box.
+ </para>
+
+ <section id="SettingUpTheProject">
+<?dbhtml filename="SettingUpTheProject.html"?>
+ <title>Setting Up the Project</title>
+ <para>
+ We are going to start by creating a Dynamic Web Project with a minimal structure, i.e. with just required facets. Thus this section will perform you all necessary steps on how to do this.
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Go to the menu bar and select <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>Other...</guimenuitem></menuchoice>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Select <menuchoice><guimenuitem>Web</guimenuitem><guimenuitem>Dynamic Web Project</guimenuitem></menuchoice> in the New Project dialog box
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Click the
+ <guibutton>
+ Next
+ </guibutton>
+ button
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Enter "jspHello" as a project name
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Then select <emphasis> <property>Minimal Configuration</property> </emphasis> from the list of possible configurations and click the
+ <guibutton>
+ Finish
+ </guibutton>
+ button.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Create New Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The <emphasis><property>jspHello</property></emphasis> node should appear in the upper-left <property>Package Explorer</property> view.
+ </para>
+
+ <figure>
+ <title>New Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="CreatingJSPPage">
+<?dbhtml filename="CreatingJSPPage.html"?>
+ <title>Creating JSP Page</title>
+ <para>
+ This section covers all the points how to create, edit and then preview JSP page.
+ </para>
+
+ <para>
+ In our simple application we need to create only one JSP page which displays a <emphasis>"Hello World!"</emphasis> message.
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Right click the <filename>WebContent</filename> folder and select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>JSP</guimenuitem></menuchoice>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Type <filename>hello.jsp</filename> for a file name and click the
+ <guibutton>
+ Next
+ </guibutton>
+ button.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ In the next window you can choose a template for your JSP page and see its preview.
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Select <emphasis> <property>New JSP File (xhtml)</property> </emphasis> template and click the
+ <guibutton>
+ Finish
+ </guibutton>
+ button.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Create JSP Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Our <filename>hello.jsp</filename> page will now appear in the <property>Project Explorer</property> view.
+ </para>
+
+ <section id="EditingJSPPage">
+<?dbhtml filename="EditingJSPPage.html"?>
+ <title>Editing a JSP Page</title>
+ <para>
+ Let's now make a little change so that a JSP page displays <emphasis>"Hello World!"</emphasis> message.
+ </para>
+
+ <itemizedlist>
+ <listitem>
+<!--<para>Insert this line inside the <emphasis role="bold">
<property><body></property>
</emphasis><emphasis role="bold">
<property></body></property>
- </emphasis> tag: </para>-->
- <para>
-
- Insert this line inside the
- <code><body> </body>
- </code>
- tag:
- </para>
- </listitem>
- </itemizedlist>
- <programlisting role="XML"><![CDATA[<% System.out.println("Hello World!"); %>]]>
- </programlisting>
-
- <para>Notice that content assist functionality is always available when you are typing:</para>
- <figure>
- <title>Content Assist in JSP Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>After changes made your <filename>hello.jsp</filename> page should look like this:</para>
- <figure>
- <title>Hello.jsp Page Source</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>This line will actually output <emphasis>"Hello
- World!"</emphasis> message in the <property>Console</property>. To make the
- message displayed in the Browser, just replace this line with the simple
- <emphasis>Hello World!</emphasis>.</para>
- </section>
-
- <section id="WebXML">
- <?dbhtml filename="WebXML.html"?>
- <title>web.xml file</title>
- <para>When you are creating web project the wizard creates the <filename>web.xml</filename> file for you automatically. The <property>web.xml file editor</property>
- provided by <property>JBoss Developer Studio</property> is available in two modes:
- <property>Tree</property> and <property>Source</property>.</para>
- <figure>
- <title>Web.xml in Design and Source Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_6.png" scale="90"
- />
- </imageobject>
- </mediaobject>
- </figure>
- <para>Both modes are fully synchronized. Let's add a mapping to our <filename>hello.jsp</filename> page in the <filename>web.xml</filename> file.</para>
- <itemizedlist>
- <listitem>
- <para>Switch to the <property>Source</property> tab.</para>
- </listitem>
- <listitem>
- <para>Add the next code into
- <code><welcome-file-list></code>
- :</para>
- </listitem>
- </itemizedlist>
- <programlisting role="XML"><![CDATA[<welcome-file>hello.jsp</welcome-file>
-]]></programlisting>
- <para>If you come back to <property>Tree</property> mode you will see that the changes
- made are automatically reflected in that mode.</para>
- <para>Actually you don't really need to do any configurations right now.</para>
- </section>
-
- <section id="DeployTheProject">
- <?dbhtml filename="DeployTheProject.html"?>
- <title>Deploying the project</title>
- <para>Writing ant scripts and managing the packaging process can be quite a complicated and time consuming task for even the most trivial web applications. However, <property>JBoss Developer Studio</property> relieves you of this burden. All you need is to start <property>JBoss Server</property> and launch your application in your favorite browser.</para>
- <para>You can also create a WAR archive with JBDS's Archive Tools
- and export it to any web server.</para>
- <section id="WarConfig">
- <?dbhtml filename="WarConfig.html"?>
- <title>WAR Config</title>
- <para>Project archives managing is available through Project Archives view.</para>
- <itemizedlist>
- <listitem>
- <para>Select <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show view</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>JBoss
- Tools</guimenuitem><guimenuitem>Project archives</guimenuitem></menuchoice> from the menu bar</para>
- </listitem>
- <listitem>
- <para>Select a project in Package Explorer you want to be archived</para>
- </listitem>
- </itemizedlist>
- <para>In the <property>Project Archives</property> view you will see the that the project is now listed:</para>
- <figure>
- <title>Project Archives</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_8.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Right click on the project and select the type of archive you want to create. In this case we will create a WAR archive.</para>
-
- <figure>
- <title>Project Archives</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_8a.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the <property>New WAR</property> dialog you can see automatically selected
- default values.</para>
- <figure>
- <title>New WAR Archive</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_9.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Click the <guibutton>Next</guibutton> button to see a stub archive configuration for your project: <figure>
- <title>Stub Archive Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_10.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </para>
- </listitem>
- <listitem>
- <para>Click the <guibutton>Finish</guibutton> button. The
- <emphasis>.WAR</emphasis> file will appear in <property>Package
- Explorer</property> and also in <property>Project Archives</property>
- view as structure tree: <figure>
- <title>Archive is Created</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_11.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <figure>
- <title>Archive in Project Archives View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_12.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </para>
- </listitem>
- </itemizedlist>
- <para>Using the <property>Project Archives</property> view you can rebuild the archive:</para>
- <figure>
- <title>Configure Archive</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_13.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="AutoRedeploy">
- <?dbhtml filename="AutoRedeploy.html"?>
- <title>Auto redeploy</title>
- <para>When you are creating a web application and register it on <property>JBoss
- Server</property> it is automatically deployed into the
- <filename>/deploy</filename> directory of the server. JBDS comes with the
- feature of auto-redeploy. It means that you don't need to restart
- <property>JBoss Server</property>. Any changes made in the application in
- exploded format will trigger a redeployment on the server.</para>
-
- <para>You can also use the "Finger touch" button for a quick restart of the project without restarting the server:</para>
- <figure>
- <title>Finger Touch button</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_19_finger_touch.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The "Finger" touches descriptors dependent on project (i.e. web.xml for WAR, application.xml for EAR, jboss-esb.xml in ESB projects).</para>
-
- </section>
-
- </section>
-
- <section id="Previewtab">
- <?dbhtml filename="Previewtab.html"?>
- <title>JSP Page Preview</title>
- <para><property>JBDS</property> comes with JSP design-time preview features. When
- designing JSP pages you can easily preview how they will look during runtime. You
- can even attach your stylesheet to the Preview.</para>
- <itemizedlist>
- <listitem>
- <para>Make a little change to <filename>hello.jsp</filename> page, e.g. put this code snippet:</para>
- </listitem>
- </itemizedlist>
- <programlisting role="XML"><![CDATA[<%= new java.util.Date() %>
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>Click the <guibutton>Save</guibutton> button.</para>
- </listitem>
- <listitem>
- <para>Switch to Preview page by clicking the <property>Preview</property> tab at the
- bottom of the page. You will see how the page will look at runtime.</para>
- </listitem>
- </itemizedlist>
- <!-- <figure>
+ </emphasis> tag: </para>-->
+ <para>
+ Insert this line inside the <code><body> </body> </code> tag:
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting role="XML">
+<![CDATA[<% System.out.println("Hello World!"); %>]]>
+ </programlisting>
+
+ <para>
+ Notice that content assist functionality is always available when you are typing:
+ </para>
+
+ <figure>
+ <title>Content Assist in JSP Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ After changes made your <filename>hello.jsp</filename> page should look like this:
+ </para>
+
+ <figure>
+ <title>Hello.jsp Page Source</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ This line will actually output <emphasis>"Hello World!"</emphasis> message in the <property>Console</property>. To make the message displayed in the Browser, just replace this line with the simple <emphasis>Hello World!</emphasis>.
+ </para>
+ </section>
+
+ <section id="WebXML">
+<?dbhtml filename="WebXML.html"?>
+ <title>web.xml file</title>
+ <para>
+ When you are creating web project the wizard creates the <filename>web.xml</filename> file for you automatically. The <property>web.xml file editor</property> provided by <property>JBoss Developer Studio</property> is available in two modes: <property>Tree</property> and <property>Source</property>.
+ </para>
+
+ <figure>
+ <title>Web.xml in Design and Source Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_6.png" scale="90"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Both modes are fully synchronized. Let's add a mapping to our <filename>hello.jsp</filename> page in the <filename>web.xml</filename> file.
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Switch to the <property>Source</property> tab.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Add the next code into <code><welcome-file-list></code> :
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting role="XML">
+<![CDATA[<welcome-file>hello.jsp</welcome-file>
+]]>
+ </programlisting>
+
+ <para>
+ If you come back to <property>Tree</property> mode you will see that the changes made are automatically reflected in that mode.
+ </para>
+
+ <para>
+ Actually you don't really need to do any configurations right now.
+ </para>
+ </section>
+
+ <section id="DeployTheProject">
+<?dbhtml filename="DeployTheProject.html"?>
+ <title>Deploying the project</title>
+ <para>
+ Writing ant scripts and managing the packaging process can be quite a complicated and time consuming task for even the most trivial web applications. However, <property>JBoss Developer Studio</property> relieves you of this burden. All you need is to start <property>JBoss Server</property> and launch your application in your favorite browser.
+ </para>
+
+ <para>
+ You can also create a WAR archive with JBDS's Archive Tools and export it to any web server.
+ </para>
+
+ <section id="WarConfig">
+<?dbhtml filename="WarConfig.html"?>
+ <title>WAR Config</title>
+ <para>
+ Project archives managing is available through Project Archives view.
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Select <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show view</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>JBoss Tools</guimenuitem><guimenuitem>Project archives</guimenuitem></menuchoice> from the menu bar
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Select a project in Package Explorer you want to be archived
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ In the <property>Project Archives</property> view you will see the that the project is now listed:
+ </para>
+
+ <figure>
+ <title>Project Archives</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Right click on the project and select the type of archive you want to create. In this case we will create a WAR archive.
+ </para>
+
+ <figure>
+ <title>Project Archives</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_8a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ In the <property>New WAR</property> dialog you can see automatically selected default values.
+ </para>
+
+ <figure>
+ <title>New WAR Archive</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Click the
+ <guibutton>
+ Next
+ </guibutton>
+ button to see a stub archive configuration for your project:
+ <figure>
+ <title>Stub Archive Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Click the
+ <guibutton>
+ Finish
+ </guibutton>
+ button. The <emphasis>.WAR</emphasis> file will appear in <property>Package Explorer</property> and also in <property>Project Archives</property> view as structure tree:
+ <figure>
+ <title>Archive is Created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_11.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>Archive in Project Archives View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_12.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ Using the <property>Project Archives</property> view you can rebuild the archive:
+ </para>
+
+ <figure>
+ <title>Configure Archive</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_13.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="AutoRedeploy">
+<?dbhtml filename="AutoRedeploy.html"?>
+ <title>Auto redeploy</title>
+ <para>
+ When you are creating a web application and register it on <property>JBoss Server</property> it is automatically deployed into the <filename>/deploy</filename> directory of the server. JBDS comes with the feature of auto-redeploy. It means that you don't need to restart <property>JBoss Server</property>. Any changes made in the application in exploded format will trigger a redeployment on the server.
+ </para>
+
+ <para>
+ You can also use the "Finger touch" button for a quick restart of the project without restarting the server:
+ </para>
+
+ <figure>
+ <title>Finger Touch button</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_19_finger_touch.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The "Finger" touches descriptors dependent on project (i.e. web.xml for WAR, application.xml for EAR, jboss-esb.xml in ESB projects).
+ </para>
+ </section>
+ </section>
+
+ <section id="Previewtab">
+<?dbhtml filename="Previewtab.html"?>
+ <title>JSP Page Preview</title>
+ <para>
+ <property>JBDS</property> comes with JSP design-time preview features. When designing JSP pages you can easily preview how they will look during runtime. You can even attach your stylesheet to the Preview.
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Make a little change to <filename>hello.jsp</filename> page, e.g. put this code snippet:
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting role="XML">
+<![CDATA[<%= new java.util.Date() %>
+]]>
+ </programlisting>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Click the
+ <guibutton>
+ Save
+ </guibutton>
+ button.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Switch to Preview page by clicking the <property>Preview</property> tab at the bottom of the page. You will see how the page will look at runtime.
+ </para>
+ </listitem>
+ </itemizedlist>
+<!-- <figure>
<title>Preview Page</title>
<mediaobject>
<imageobject>
@@ -334,54 +462,64 @@
</imageobject>
</mediaobject>
</figure>
- -->
- </section>
- <section id="LaunchingTheProject">
- <?dbhtml filename="LaunchingTheProject.html"?>
- <title>Launch JSP Project</title>
- <para>Let's now launch our project on server. We'll use
- <property>JBoss Server</property> that is shipped with <property>JBoss Developer
- Studio</property>. You can do it by performing one of the following actions:</para>
- <itemizedlist>
- <listitem>
- <para>Start JBoss Server from
- Servers view by clicking the Start the server icon (
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_18.png"/>
- </imageobject>
- </inlinemediaobject> ) .</para>
- </listitem>
- </itemizedlist>
-
- <itemizedlist>
- <listitem>
- <para>Click the <guibutton>Run</guibutton> icon or right click your project folder and select <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>Run on Server</guimenuitem></menuchoice>. If you
- haven't made any changes in the <filename>web.xml</filename> file or cleared it out you can launch the application by right
- clicking the <filename>hello.jsp</filename> page and selecting <guimenuitem>Run on the Server</guimenuitem>(
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_16.png"/>
- </imageobject>
- </inlinemediaobject> ).</para>
- </listitem>
- </itemizedlist>
-
- <para>You should see the next page in a Browser :</para>
- <figure>
- <title>Running Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_17.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Thus with the help of this chapter you've learnt how to organize a Dynamic
- Web Project with a minimal configuration, add new elements to it (in our case it's
- just one JSP page) and deploy and run it on the <property>JBoss Server</property>
- shipped with <property>JBDS</property>.
- </para>
- </section>
-
- </section>
-</chapter>
+ -->
+ </section>
+
+ <section id="LaunchingTheProject">
+<?dbhtml filename="LaunchingTheProject.html"?>
+ <title>Launch JSP Project</title>
+ <para>
+ Let's now launch our project on server. We'll use <property>JBoss Server</property> that is shipped with <property>JBoss Developer Studio</property>. You can do it by performing one of the following actions:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Start JBoss Server from Servers view by clicking the Start the server icon (
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_18.png"/>
+ </imageobject>
+ </inlinemediaobject>
+ ) .
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Click the
+ <guibutton>
+ Run
+ </guibutton>
+ icon or right click your project folder and select <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>Run on Server</guimenuitem></menuchoice>. If you haven't made any changes in the <filename>web.xml</filename> file or cleared it out you can launch the application by right clicking the <filename>hello.jsp</filename> page and selecting <guimenuitem>Run on the Server</guimenuitem>(
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_16.png"/>
+ </imageobject>
+ </inlinemediaobject>
+ ).
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ You should see the next page in a Browser :
+ </para>
+
+ <figure>
+ <title>Running Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_17.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Thus with the help of this chapter you've learnt how to organize a Dynamic Web Project with a minimal configuration, add new elements to it (in our case it's just one JSP page) and deploy and run it on the <property>JBoss Server</property> shipped with <property>JBDS</property>.
+ </para>
+ </section>
+ </section>
+</chapter>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/usage_reporting.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/usage_reporting.xml 2011-03-21 18:41:34 UTC (rev 29923)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/usage_reporting.xml 2011-03-21 20:57:44 UTC (rev 29924)
@@ -41,7 +41,7 @@
</menuchoice>.
</para>
<para>
- The gathered data allows JBoss to see how the tools are being used and where they are being used geographically. Currently we are looking into the operating systems being used, screen resolution and how often the tooling environment is started. In the future geographic information will assist in focussing translation resources to areas where the developer environment is most used.
+ The gathered data allows JBoss to see how the tools are being used and where they are being used geographically. Currently we are looking into the operating systems being used, screen resolution and how often the tooling environment is started. In the future geographic information will assist in focusing translation resources to areas where the developer environment is most used.
</para>
<para>
The plug-in uses Google Analytics to track and report data by acting as if you were visiting the site http://jboss.org/tools/usage/. To view the type of information being collected, refer to <xref linkend="Collected_usage_information_guide"/>.
13 years, 9 months
JBoss Tools SVN: r29923 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-03-21 14:41:34 -0400 (Mon, 21 Mar 2011)
New Revision: 29923
Added:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardRegisterBundlePage.java
Removed:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardRegisterBundlePage.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsKeysListPage.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsSelectBundlePage.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsWizard.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java
Log:
https://issues.jboss.org/browse/JBIDE-7004 , validation was updated, bundle name on the last page was initialized.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsKeysListPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsKeysListPage.java 2011-03-21 15:10:08 UTC (rev 29922)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsKeysListPage.java 2011-03-21 18:41:34 UTC (rev 29923)
@@ -79,7 +79,7 @@
red = parent.getDisplay().getSystemColor(SWT.COLOR_RED);
white = parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
initKeys = getAllNonExternalizedStrings();
- Collections.sort(initKeys, Collections.reverseOrder());
+ Collections.sort(initKeys);
tv = createTable(parent);
highlightAllDuplicateKeys(tv);
setControl(tv.getTable());
@@ -270,6 +270,19 @@
kve.value = value.toString();
}
viewer.refresh(kve);
+ /*
+ * Mark/unmark all duplicated keys with red/white.
+ * Change the dialog status.
+ */
+ for (KeyValueElement k : initKeys) {
+ if (isDuplicatedBundleKey(k.key) || isDuplicatedStringKey(k, k.key)) {
+ k.duplicated = true;
+ } else {
+ k.duplicated = false;
+ }
+ }
+ highlightAllDuplicateKeys(viewer);
+ updateStatus();
}
});
TextCellEditor keyEditor = new TextCellEditor(parent);
@@ -288,11 +301,10 @@
@Override
public void modifyText(ModifyEvent e) {
Text t = (Text) e.getSource();
+ String key = t.getText();
Table table = (Table) t.getParent();
int ind = table.getSelectionIndex();
KeyValueElement element = (KeyValueElement) viewer.getElementAt(ind);
- TableItem ti = table.getItem(ind);
- String key = t.getText();
/*
* Check duplicate key, set bkg color to red
* Setting new key value is called after this modyfy listener,
@@ -300,14 +312,11 @@
*/
if (isDuplicatedBundleKey(key) || isDuplicatedStringKey(element, key)) {
element.duplicated = true;
- highlightDuplicateKey(ti, true);
t.setBackground(red);
} else {
element.duplicated = false;
- highlightDuplicateKey(ti, false);
t.setBackground(white);
}
- updateStatus();
}
});
((Text)keyEditor.getControl()).addVerifyListener(new VerifyListener() {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsSelectBundlePage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsSelectBundlePage.java 2011-03-21 15:10:08 UTC (rev 29922)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsSelectBundlePage.java 2011-03-21 18:41:34 UTC (rev 29923)
@@ -73,6 +73,7 @@
bundleFile = new File((String)event.getNewValue());
properties = ExternalizeStringsUtils.populatePropertiesTable(table, bundleFile);
wiz.setUpdatedProperties(properties);
+ wiz.setPage3BundleName();
/*
* Set page complete
*/
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsWizard.java 2011-03-21 15:10:08 UTC (rev 29922)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsWizard.java 2011-03-21 18:41:34 UTC (rev 29923)
@@ -33,7 +33,7 @@
private BundleMap bm = null;
ExternalizeAllStringsSelectBundlePage page1;
ExternalizeAllStringsKeysListPage page2;
- ExternalizeStringsWizardRegisterBundlePage page3 = null;
+ ExternalizeStringsWizardRegisterBundlePage page3;
public ExternalizeAllStringsWizard(ITextEditor editor, BundleMap bm) {
super();
@@ -49,9 +49,9 @@
@Override
public void addPages() {
super.addPages();
- page1 = new ExternalizeAllStringsSelectBundlePage("page1");
- page2 = new ExternalizeAllStringsKeysListPage("page2");
- page3 = new ExternalizeStringsWizardRegisterBundlePage("page3");
+ page1 = new ExternalizeAllStringsSelectBundlePage("ExternalizeAllStringsSelectBundlePage");
+ page2 = new ExternalizeAllStringsKeysListPage("ExternalizeAllStringsKeysListPage");
+ page3 = new ExternalizeStringsWizardRegisterBundlePage("ExternalizeStringsWizardRegisterBundlePage");
/*
* Add all the pages to the wizard
*/
@@ -92,23 +92,26 @@
}
out.close();
out = null;
- }
- /*
- * Find bundle prefix
- */
+ }
+ page2.replaceAllStrings(findBundlePrefix());
+ return true;
+ }
+
+ public String findBundlePrefix() {
String bundlePrefix = Constants.EMPTY;
- String ap = bundleFile.getAbsolutePath();
- for (BundleEntry be : bm.getBundles()) {
- IFile bf = bm.getBundleFile(be.uri);
- if (ap.equalsIgnoreCase(bf.getLocation().toOSString())) {
- bundlePrefix = be.prefix;
- break;
+ if (page1.getBundleFile() != null) {
+ String ap = page1.getBundleFile().getAbsolutePath();
+ for (BundleEntry be : bm.getBundles()) {
+ IFile bf = bm.getBundleFile(be.uri);
+ if (ap.equalsIgnoreCase(bf.getLocation().toOSString())) {
+ bundlePrefix = be.prefix;
+ break;
+ }
}
}
- page2.replaceAllStrings(bundlePrefix);
- return true;
+ return bundlePrefix;
}
-
+
public Properties getOriginalProperties() {
if (null != page1) {
return page1.getOriginalProperties();
@@ -118,4 +121,7 @@
public void setUpdatedProperties(Properties p) {
page2.updateTable(p);
}
+ public void setPage3BundleName() {
+ page3.setBundleName(findBundlePrefix());
+ }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java 2011-03-21 15:10:08 UTC (rev 29922)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java 2011-03-21 18:41:34 UTC (rev 29923)
@@ -31,6 +31,8 @@
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@@ -504,6 +506,19 @@
updateStatus();
}
});
+ propsKey.addVerifyListener(new VerifyListener() {
+ public void verifyText(VerifyEvent e) {
+ for (int i = 0; i < ExternalizeStringsUtils.REPLACED_CHARACTERS.length; i++) {
+ /*
+ * Entering of the forbidden characters will be prevented.
+ */
+ if (e.character == ExternalizeStringsUtils.REPLACED_CHARACTERS[i]) {
+ e.doit = false;
+ break;
+ }
+ }
+ }
+ });
propsValue.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
updateStatus();
Deleted: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardRegisterBundlePage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardRegisterBundlePage.java 2011-03-21 15:10:08 UTC (rev 29922)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardRegisterBundlePage.java 2011-03-21 18:41:34 UTC (rev 29923)
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jst.jsp.i18n;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-import org.jboss.tools.common.EclipseUtil;
-import org.jboss.tools.common.model.ui.ModelUIImages;
-import org.jboss.tools.jst.jsp.messages.JstUIMessages;
-import org.jboss.tools.jst.jsp.util.Constants;
-
-/**
- * The Class ExternalizeStringsWizardRegisterBundlePage.
- */
-public class ExternalizeStringsWizardRegisterBundlePage extends WizardPage
- implements SelectionListener {
-
- public static final String PAGE_NAME = "ExternalizeStringsWizardRegisterBundlePage"; //$NON-NLS-1$
- /*
- * Constants that indicate user selection
- */
- public static final int FACES_CONFIG = 1;
- public static final int LOAD_BUNDLE = 2;
- public static final int USER_DEFINED = 3;
-
- private final int DIALOG_WIDTH = 450;
- private final int DIALOG_HEIGHT = 650;
-
- private Button facesConfig;
- private Button laodBundle;
- private Button userDefined;
- private Label bundleLabel;
- private Text bundleName;
-
- /**
- * Instantiates a new externalize strings wizard register bundle page.
- *
- * @param pageName the page name
- */
- public ExternalizeStringsWizardRegisterBundlePage(String pageName) {
- super(pageName, JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_TITLE,
- ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_DEFAULT));
- setDescription(JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_DESCRIPTION);
- setPageComplete(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- /*
- * Create basic container
- */
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(2, false));
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.widthHint = DIALOG_WIDTH;
- gd.heightHint = DIALOG_HEIGHT;
- composite.setLayoutData(gd);
- /*
- * Input field with bundle name
- */
- bundleLabel = new Label(composite, SWT.NONE);
- bundleLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false, false, 1, 1));
- bundleLabel.setText(JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_BUNDLE_NAME);
- bundleName = new Text(composite, SWT.BORDER);
- bundleName.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1));
- String fileName = Constants.EMPTY;
- if (getWizard() instanceof ExternalizeStringsWizard) {
- fileName = ((ExternalizeStringsWizard) getWizard()).getFileName();
- int pos = fileName.lastIndexOf(Constants.DOT);
- if (pos != -1) {
- fileName = fileName.substring(0, pos);
- }
- }
- bundleName.setText(fileName);
-
- /*
- * Group with a place for bundle
- */
- Group group = new Group(composite, SWT.SHADOW_ETCHED_IN);
- group.setLayout(new GridLayout(1, true));
- group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
- group.setText(JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_SAVE_RESOURCE_BUNDLE);
-
- facesConfig = new Button(group, SWT.RADIO);
- laodBundle = new Button(group, SWT.RADIO);
- userDefined = new Button(group, SWT.RADIO);
- facesConfig.setText(JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_FACES_CONFIG);
- laodBundle.setText(JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_LOAD_BUNDLE);
- userDefined.setText(JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_USER_DEFINED);
-
- userDefined.setSelection(true);
-
- facesConfig.addSelectionListener(this);
- laodBundle.addSelectionListener(this);
- userDefined.addSelectionListener(this);
-
- updateBundleNameField();
- /*
- * Wizard Page control should be initialized.
- */
- setControl(composite);
- }
-
- /**
- * Gets the user specified bundle name.
- *
- * @return the bundle name
- */
- public String getBundleName() {
- String name = Constants.EMPTY;
- if (bundleName != null) {
- name = bundleName.getText();
- }
- return name;
- }
-
- /**
- * Checks if user has selected faces config.
- *
- * @return true, if in faces config
- */
- public boolean isInFacesConfig() {
- return (null != facesConfig) && facesConfig.getSelection();
- }
-
- /**
- * Checks if user has selected load bundle.
- *
- * @return true, if via load bundle
- */
- public boolean isViaLoadBundle() {
- return (null != laodBundle) && laodBundle.getSelection();
- }
-
- /**
- * Checks if user will register the bundle manually.
- *
- * @return true, if user defined
- */
- public boolean isUserDefined() {
- return (null != userDefined) && userDefined.getSelection();
- }
-
- /**
- * Update the dialog status.
- */
- public void updateStatus() {
- /*
- * If user has entered a path that is different from the source folder
- * the base-name will be incorrect.
- * Thus show warning message.
- */
- if (isSourceFolderSelected()) {
- setMessage(null, IMessageProvider.NONE);
- } else {
- setMessage(
- JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_WRONG_BUNDLE_PLACEMENT,
- IMessageProvider.WARNING);
- }
- }
-
-// /**
-// * Gets the selected place.
-// *
-// * @return the selected place
-// */
-// private int getSelectedPlace() {
-// int place = FACES_CONFIG;
-// if (isInFacesConfig()) {
-// place = FACES_CONFIG;
-// } else if (isViaLoadBundle()) {
-// place = LOAD_BUNDLE;
-// } else if (isUserDefined()) {
-// place = USER_DEFINED;
-// }
-// return place;
-// }
-
- /**
- * Update bundle name field.
- */
- private void updateBundleNameField() {
- if (isUserDefined()) {
- bundleLabel.setEnabled(false);
- bundleName.setEnabled(false);
- } else {
- bundleLabel.setEnabled(true);
- bundleName.setEnabled(true);
- }
- }
-
- /**
- * Checks if the source folder is selected.
- *
- * @return true, if the source folder is selected.
- */
- private boolean isSourceFolderSelected() {
- boolean sourceFolderSelected = false;
- if (getWizard() instanceof ExternalizeStringsWizard) {
- ExternalizeStringsWizard wiz = (ExternalizeStringsWizard) getWizard();
- if (wiz.getProject()!=null) {
- IProject project = wiz.getProject();
- WizardNewFileCreationPage page2 = (WizardNewFileCreationPage)wiz.getPage(
- ExternalizeStringsWizard.EXTERNALIZE_STRINGS_DIALOG_NEW_FILE_PAGE);
- String userDefinedPath = page2.getContainerFullPath().toString();
- /*
- * Get the source folders for the project
- */
- IResource[] src = EclipseUtil.getJavaSourceRoots(project);
- /*
- * When there are multiple source folders --
- * match user defined folder to them.
- */
- String srcPath = Constants.EMPTY;
- for (IResource res : src) {
- srcPath = res.getFullPath().toString();
- if (userDefinedPath.indexOf(srcPath) > -1) {
- sourceFolderSelected = true;
- break;
- }
- }
- }
- }
- return sourceFolderSelected;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
- */
- public boolean isPageComplete() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
- updateBundleNameField();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- updateBundleNameField();
- }
-}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardRegisterBundlePage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardRegisterBundlePage.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardRegisterBundlePage.java 2011-03-21 18:41:34 UTC (rev 29923)
@@ -0,0 +1,279 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.jsp.i18n;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+import org.jboss.tools.common.EclipseUtil;
+import org.jboss.tools.common.model.ui.ModelUIImages;
+import org.jboss.tools.jst.jsp.messages.JstUIMessages;
+import org.jboss.tools.jst.jsp.util.Constants;
+
+/**
+ * The Class ExternalizeStringsWizardRegisterBundlePage.
+ */
+public class ExternalizeStringsWizardRegisterBundlePage extends WizardPage
+ implements SelectionListener {
+
+ public static final String PAGE_NAME = "ExternalizeStringsWizardRegisterBundlePage"; //$NON-NLS-1$
+ /*
+ * Constants that indicate user selection
+ */
+ public static final int FACES_CONFIG = 1;
+ public static final int LOAD_BUNDLE = 2;
+ public static final int USER_DEFINED = 3;
+
+ private final int DIALOG_WIDTH = 450;
+ private final int DIALOG_HEIGHT = 650;
+
+ private Button facesConfig;
+ private Button laodBundle;
+ private Button userDefined;
+ private Label bundleLabel;
+ private Text bundleName;
+
+ /**
+ * Instantiates a new externalize strings wizard register bundle page.
+ *
+ * @param pageName the page name
+ */
+ public ExternalizeStringsWizardRegisterBundlePage(String pageName) {
+ super(pageName, JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_TITLE,
+ ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_DEFAULT));
+ setDescription(JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_DESCRIPTION);
+ setPageComplete(true);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ /*
+ * Create basic container
+ */
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(2, false));
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gd.widthHint = DIALOG_WIDTH;
+ gd.heightHint = DIALOG_HEIGHT;
+ composite.setLayoutData(gd);
+ /*
+ * Input field with bundle name
+ */
+ bundleLabel = new Label(composite, SWT.NONE);
+ bundleLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false, false, 1, 1));
+ bundleLabel.setText(JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_BUNDLE_NAME);
+ bundleName = new Text(composite, SWT.BORDER);
+ bundleName.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1));
+ String fileName = Constants.EMPTY;
+ if (getWizard() instanceof ExternalizeStringsWizard) {
+ fileName = ((ExternalizeStringsWizard) getWizard()).getFileName();
+ int pos = fileName.lastIndexOf(Constants.DOT);
+ if (pos != -1) {
+ fileName = fileName.substring(0, pos);
+ }
+ } else if (getWizard() instanceof ExternalizeAllStringsWizard) {
+ fileName = ((ExternalizeAllStringsWizard) getWizard()).findBundlePrefix();
+ }
+ bundleName.setText(fileName);
+
+ /*
+ * Group with a place for bundle
+ */
+ Group group = new Group(composite, SWT.SHADOW_ETCHED_IN);
+ group.setLayout(new GridLayout(1, true));
+ group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+ group.setText(JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_SAVE_RESOURCE_BUNDLE);
+
+ facesConfig = new Button(group, SWT.RADIO);
+ laodBundle = new Button(group, SWT.RADIO);
+ userDefined = new Button(group, SWT.RADIO);
+ facesConfig.setText(JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_FACES_CONFIG);
+ laodBundle.setText(JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_LOAD_BUNDLE);
+ userDefined.setText(JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_USER_DEFINED);
+
+ userDefined.setSelection(true);
+
+ facesConfig.addSelectionListener(this);
+ laodBundle.addSelectionListener(this);
+ userDefined.addSelectionListener(this);
+
+ updateBundleNameField();
+ /*
+ * Wizard Page control should be initialized.
+ */
+ setControl(composite);
+ }
+
+ /**
+ * Gets the user specified bundle name.
+ *
+ * @return the bundle name
+ */
+ public String getBundleName() {
+ String name = Constants.EMPTY;
+ if (bundleName != null) {
+ name = bundleName.getText();
+ }
+ return name;
+ }
+
+ /**
+ * Checks if user has selected faces config.
+ *
+ * @return true, if in faces config
+ */
+ public boolean isInFacesConfig() {
+ return (null != facesConfig) && facesConfig.getSelection();
+ }
+
+ /**
+ * Checks if user has selected load bundle.
+ *
+ * @return true, if via load bundle
+ */
+ public boolean isViaLoadBundle() {
+ return (null != laodBundle) && laodBundle.getSelection();
+ }
+
+ /**
+ * Checks if user will register the bundle manually.
+ *
+ * @return true, if user defined
+ */
+ public boolean isUserDefined() {
+ return (null != userDefined) && userDefined.getSelection();
+ }
+
+ /**
+ * Update the dialog status.
+ */
+ public void updateStatus() {
+ /*
+ * If user has entered a path that is different from the source folder
+ * the base-name will be incorrect.
+ * Thus show warning message.
+ */
+ if (isSourceFolderSelected()) {
+ setMessage(null, IMessageProvider.NONE);
+ } else {
+ setMessage(
+ JstUIMessages.EXTERNALIZE_STRINGS_DIALOG_WRONG_BUNDLE_PLACEMENT,
+ IMessageProvider.WARNING);
+ }
+ }
+
+// /**
+// * Gets the selected place.
+// *
+// * @return the selected place
+// */
+// private int getSelectedPlace() {
+// int place = FACES_CONFIG;
+// if (isInFacesConfig()) {
+// place = FACES_CONFIG;
+// } else if (isViaLoadBundle()) {
+// place = LOAD_BUNDLE;
+// } else if (isUserDefined()) {
+// place = USER_DEFINED;
+// }
+// return place;
+// }
+
+ /**
+ * Update bundle name field.
+ */
+ private void updateBundleNameField() {
+ if (isUserDefined()) {
+ bundleLabel.setEnabled(false);
+ bundleName.setEnabled(false);
+ } else {
+ bundleLabel.setEnabled(true);
+ bundleName.setEnabled(true);
+ }
+ }
+
+ /**
+ * Checks if the source folder is selected.
+ *
+ * @return true, if the source folder is selected.
+ */
+ private boolean isSourceFolderSelected() {
+ boolean sourceFolderSelected = false;
+ if (getWizard() instanceof ExternalizeStringsWizard) {
+ ExternalizeStringsWizard wiz = (ExternalizeStringsWizard) getWizard();
+ if (wiz.getProject()!=null) {
+ IProject project = wiz.getProject();
+ WizardNewFileCreationPage page2 = (WizardNewFileCreationPage)wiz.getPage(
+ ExternalizeStringsWizard.EXTERNALIZE_STRINGS_DIALOG_NEW_FILE_PAGE);
+ String userDefinedPath = page2.getContainerFullPath().toString();
+ /*
+ * Get the source folders for the project
+ */
+ IResource[] src = EclipseUtil.getJavaSourceRoots(project);
+ /*
+ * When there are multiple source folders --
+ * match user defined folder to them.
+ */
+ String srcPath = Constants.EMPTY;
+ for (IResource res : src) {
+ srcPath = res.getFullPath().toString();
+ if (userDefinedPath.indexOf(srcPath) > -1) {
+ sourceFolderSelected = true;
+ break;
+ }
+ }
+ }
+ }
+ return sourceFolderSelected;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
+ */
+ public boolean isPageComplete() {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ public void widgetSelected(SelectionEvent e) {
+ updateBundleNameField();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ public void widgetDefaultSelected(SelectionEvent e) {
+ updateBundleNameField();
+ }
+
+ public void setBundleName(String bn) {
+ if (bundleName != null) {
+ bundleName.setText(bn);
+ }
+ }
+
+}
13 years, 9 months
JBoss Tools SVN: r29922 - in trunk/smooks/plugins/org.jboss.tools.smooks.templating: src/org/jboss/tools/smooks/templating/model/xml and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-21 11:10:08 -0400 (Mon, 21 Mar 2011)
New Revision: 29922
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/META-INF/MANIFEST.MF
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java
Log:
[JBIDE-8522] added LSResourceResolver to XSDSchemaFactory, switched to URIConverter (was: #toFile) when getting dependent schemes
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/META-INF/MANIFEST.MF 2011-03-21 15:08:41 UTC (rev 29921)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/META-INF/MANIFEST.MF 2011-03-21 15:10:08 UTC (rev 29922)
@@ -12,7 +12,8 @@
Require-Bundle: org.jboss.tools.smooks.runtime,
org.eclipse.xsd,
org.eclipse.emf,
- org.eclipse.core.runtime
+ org.eclipse.core.runtime,
+ org.apache.xerces;bundle-version="2.9.0"
Export-Package: com.thoughtworks.xstream,
com.thoughtworks.xstream.alias,
com.thoughtworks.xstream.annotations,
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java 2011-03-21 15:08:41 UTC (rev 29921)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java 2011-03-21 15:10:08 UTC (rev 29922)
@@ -19,220 +19,292 @@
*/
package org.jboss.tools.smooks.templating.model.xml;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Stack;
+
+import javax.xml.XMLConstants;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+import org.apache.xerces.dom.DOMInputImpl;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDAttributeGroupContent;
+import org.eclipse.xsd.XSDAttributeUse;
+import org.eclipse.xsd.XSDAttributeUseCategory;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDCompositor;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDParticleContent;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+import org.eclipse.xsd.XSDTypeDefinition;
import org.eclipse.xsd.util.XSDResourceFactoryImpl;
import org.eclipse.xsd.util.XSDResourceImpl;
-import org.eclipse.xsd.*;
+import org.jboss.tools.smooks.templating.model.ModelBuilder;
+import org.jboss.tools.smooks.templating.model.ModelBuilderException;
+import org.jboss.tools.smooks.templating.template.xml.XMLFreeMarkerTemplateBuilder;
import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import org.w3c.dom.Element;
+import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSResourceResolver;
import org.xml.sax.SAXException;
-import org.jboss.tools.smooks.templating.model.ModelBuilder;
-import org.jboss.tools.smooks.templating.model.ModelBuilderException;
-import org.jboss.tools.smooks.templating.template.xml.XMLFreeMarkerTemplateBuilder;
-import java.util.*;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.File;
-
-import javax.xml.XMLConstants;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.validation.Validator;
-
/**
* XML Model Builder from an XML Schema (XSD).
* <p/>
- * The generated model can then be used by the {@link XMLFreeMarkerTemplateBuilder}.
+ * The generated model can then be used by the
+ * {@link XMLFreeMarkerTemplateBuilder}.
* <p/>
* Uses the Eclipse Schema Infoset Model API.
- *
+ *
* @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
*/
public class XSDModelBuilder extends ModelBuilder {
- private Map<String, XSDElementDeclaration> elements = new LinkedHashMap<String, XSDElementDeclaration>();
- private Map<String, XSDTypeDefinition> types = new LinkedHashMap<String, XSDTypeDefinition>();
- private Set<String> loadedSchemas = new HashSet<String>();
- private Stack<XSDTypeDefinition> elementExpandStack = new Stack<XSDTypeDefinition>();
- private String rootElementName;
- private Properties nsPrefixes = new Properties();
+ private Map<String, XSDElementDeclaration> elements = new LinkedHashMap<String, XSDElementDeclaration>();
+ private Map<String, XSDTypeDefinition> types = new LinkedHashMap<String, XSDTypeDefinition>();
+ private ResourceSet resourceSet;
+ private Set<URI> loadedSchemas = new HashSet<URI>();
+ private Stack<XSDTypeDefinition> elementExpandStack = new Stack<XSDTypeDefinition>();
+ private String rootElementName;
+ private Properties nsPrefixes = new Properties();
- public XSDModelBuilder(URI schemaURI) throws IOException, ModelBuilderException {
- loadSchema(schemaURI);
- }
+ public XSDModelBuilder(URI schemaURI) throws IOException, ModelBuilderException {
+ this.resourceSet = createResourceSet();
+ loadSchema(schemaURI);
+ }
- public Set<String> getRootElementNames() {
- return Collections.unmodifiableSet(elements.keySet());
- }
+ private ResourceSet createResourceSet() {
+ ResourceSet resourceSet = new ResourceSetImpl();
+ resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xsd", new XSDResourceFactoryImpl()); //$NON-NLS-1$
+ Map<String, Object> options = new HashMap<String, Object>();
+ options.put(XSDResourceImpl.XSD_TRACK_LOCATION, true);
+ return resourceSet;
+ }
- public void setRootElementName(String rootElementName) {
- this.rootElementName = rootElementName;
- }
+ public Set<String> getRootElementNames() {
+ return Collections.unmodifiableSet(elements.keySet());
+ }
- public Document buildModel() throws ModelBuilderException {
- if(rootElementName == null) {
- throw new IllegalStateException("The 'rootElementName' property has not been set."); //$NON-NLS-1$
- }
+ public void setRootElementName(String rootElementName) {
+ this.rootElementName = rootElementName;
+ }
- XSDElementDeclaration rootElement = elements.get(rootElementName);
+ public Document buildModel() throws ModelBuilderException {
+ if (rootElementName == null) {
+ throw new IllegalStateException("The 'rootElementName' property has not been set."); //$NON-NLS-1$
+ }
- if(rootElement == null) {
- throw new IllegalArgumentException("Unknown root element '" + rootElementName + "'."); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ XSDElementDeclaration rootElement = elements.get(rootElementName);
- Document model = createModelInstance();
- expand(rootElement, 1, 1, model, model);
+ if (rootElement == null) {
+ throw new IllegalArgumentException("Unknown root element '" + rootElementName + "'."); //$NON-NLS-1$ //$NON-NLS-2$
+ }
- // The model has detailed metadata attached, so mark it as a strict model...
- ModelBuilder.setStrictModel(model, true);
+ Document model = createModelInstance();
+ expand(rootElement, 1, 1, model, model);
- return model;
- }
+ // The model has detailed metadata attached, so mark it as a strict
+ // model...
+ ModelBuilder.setStrictModel(model, true);
- /**
- * Validate the supplied message against this XSD ModelBuilder instance.
- * @throws SAXException Validation error.
- * @throws IOException Error reading the XSD Sources.
- */
- public void validate(Document message) throws SAXException, IOException {
- StreamSource[] xsdSources = new StreamSource[loadedSchemas.size()];
- int i = 0;
+ return model;
+ }
- try {
- for(String schemaPath : loadedSchemas) {
- File schemaFile = new File(schemaPath);
-
- if(!schemaFile.exists()) {
- throw new IOException("XSD '" + schemaFile.getAbsolutePath() + "' not found."); //$NON-NLS-1$ //$NON-NLS-2$
- }
- xsdSources[i] = new StreamSource(new FileInputStream(schemaFile));
- i++;
- }
-
- SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
- Schema schema = schemaFactory.newSchema(xsdSources);
- Validator validator = schema.newValidator();
+ /**
+ * Validate the supplied message against this XSD ModelBuilder instance.
+ *
+ * @throws SAXException
+ * Validation error.
+ * @throws IOException
+ * Error reading the XSD Sources.
+ */
+ public void validate(Document message) throws SAXException, IOException {
+ StreamSource[] xsdSources = new StreamSource[loadedSchemas.size()];
+ int i = 0;
- validator.validate(new DOMSource(message));
- } finally {
- for(StreamSource schemaStream : xsdSources) {
- try {
- schemaStream.getInputStream().close();
- } catch(Exception e) {
- // Nothing we can do...
- }
- }
- }
- }
+ try {
+ for (URI schemaURI : loadedSchemas) {
+ InputStream in = resourceSet.getURIConverter().createInputStream(schemaURI);
+ if (in == null) {
+ throw new IOException("XSD '" + schemaURI + "' not found."); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ xsdSources[i] = new StreamSource(in);
+ i++;
+ }
- private void loadSchema(URI schemaURI) throws IOException, ModelBuilderException {
- ResourceSet resourceSet = new ResourceSetImpl();
- Resource resource;
-
+ SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+ schemaFactory.setResourceResolver(new SchemeListLSResourceResolver());
+ Schema schema = schemaFactory.newSchema(xsdSources);
+ Validator validator = schema.newValidator();
+
+ validator.validate(new DOMSource(message));
+ } finally {
+ for (StreamSource schemaStream : xsdSources) {
+ try {
+ schemaStream.getInputStream().close();
+ } catch (Exception e) {
+ // Nothing we can do...
+ }
+ }
+ }
+ }
+
+ /**
+ * resolves a schema for a given system id on behalf of a list of schemes that were
+ * extracted in a former step in #validate.
+ *
+ * @see #validate
+ *
+ */
+ public class SchemeListLSResourceResolver implements LSResourceResolver {
+
+ public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId,
+ String baseURI) {
+
+ LSInput input = new DOMInputImpl();
+ try {
+ InputStream in = getLoadedSchema(systemId);
+ input.setByteStream(in);
+ return input;
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ return null;
+ }
+ }
+
+ private InputStream getLoadedSchema(String systemId) throws IOException {
+ for (URI schemaUri : loadedSchemas) {
+ String lastSegment = schemaUri.lastSegment();
+ if (systemId.equals(lastSegment)) {
+ return resourceSet.getURIConverter().createInputStream(schemaUri);
+ }
+ }
+ return null;
+ }
+
+ }
+
+ private void loadSchema(URI schemaURI) throws IOException, ModelBuilderException {
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xsd", new XSDResourceFactoryImpl()); //$NON-NLS-1$
- resource = resourceSet.getResource(schemaURI, true);
+ Resource resource = resourceSet.getResource(schemaURI, true);
- Map<String, Object> options = new HashMap<String, Object>();
- options.put(XSDResourceImpl.XSD_TRACK_LOCATION, true);
+ Map<String, Object> options = new HashMap<String, Object>();
+ options.put(XSDResourceImpl.XSD_TRACK_LOCATION, true);
- resource.load(options);
+ resource.load(options);
- if(resource.getContents().isEmpty()) {
- throw new ModelBuilderException("Failed to load schema '" + schemaURI + "'."); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ if (resource.getContents().isEmpty()) {
+ throw new ModelBuilderException("Failed to load schema '" + schemaURI + "'."); //$NON-NLS-1$ //$NON-NLS-2$
+ }
- XSDSchema schema = (XSDSchema) resource.getContents().get(0);
+ XSDSchema schema = (XSDSchema) resource.getContents().get(0);
- List<XSDElementDeclaration> elementDeclarations = schema.getElementDeclarations();
- for(XSDElementDeclaration elementDeclaration : elementDeclarations) {
- if(!elementDeclaration.isAbstract()) {
- elements.put(elementDeclaration.getName(), elementDeclaration);
- }
- }
+ List<XSDElementDeclaration> elementDeclarations = schema.getElementDeclarations();
+ for (XSDElementDeclaration elementDeclaration : elementDeclarations) {
+ if (!elementDeclaration.isAbstract()) {
+ elements.put(elementDeclaration.getName(), elementDeclaration);
+ }
+ }
- EList typeDefs = schema.getTypeDefinitions();
- for(int i = 0; i < typeDefs.size(); i++) {
- XSDTypeDefinition type = (XSDTypeDefinition) typeDefs.get(i);
- types.put(type.getName(), type);
- }
-
- EList<Resource> schemaResources = resourceSet.getResources();
- for(Resource schemaRes : schemaResources) {
- loadedSchemas.add(schemaRes.getURI().toFileString());
- }
- }
+ EList<XSDTypeDefinition> typeDefs = schema.getTypeDefinitions();
+ for (int i = 0; i < typeDefs.size(); i++) {
+ XSDTypeDefinition type = (XSDTypeDefinition) typeDefs.get(i);
+ types.put(type.getName(), type);
+ }
- private void expand(XSDElementDeclaration elementDeclaration, int minOccurs, int maxOccurs, Node parent, Document document) {
- XSDTypeDefinition typeDef;
+ EList<Resource> schemaResources = resourceSet.getResources();
+ for (Resource schemaRes : schemaResources) {
+ loadedSchemas.add(schemaRes.getURI());
+ }
- if(elementDeclaration.isElementDeclarationReference()) {
- elementDeclaration = elementDeclaration.getResolvedElementDeclaration();
- typeDef = elementDeclaration.getTypeDefinition();
- } else {
- typeDef = elementDeclaration.getTypeDefinition();
- }
+ resourceSet.getResources().remove(resource);
+ }
- String elementName = elementDeclaration.getName();
- if(elementDeclaration.isAbstract()) {
- if(typeDef != null) {
- addTypeImpls(typeDef, minOccurs, maxOccurs, parent, document);
- }
- return;
- }
+ private void expand(XSDElementDeclaration elementDeclaration, int minOccurs, int maxOccurs, Node parent,
+ Document document) {
+ XSDTypeDefinition typeDef;
- if(elementExpandStack.contains(typeDef)) {
- return;
- }
+ if (elementDeclaration.isElementDeclarationReference()) {
+ elementDeclaration = elementDeclaration.getResolvedElementDeclaration();
+ typeDef = elementDeclaration.getTypeDefinition();
+ } else {
+ typeDef = elementDeclaration.getTypeDefinition();
+ }
- elementExpandStack.push(typeDef);
- try {
- String elementNS = elementDeclaration.getTargetNamespace();
- Element element;
-
- if(elementNS == null || elementNS.equals(XMLConstants.W3C_XML_SCHEMA_NS_URI)) {
- element = document.createElement(elementName);
- } else {
- String nsPrefix = getPrefix(elementNS);
-
- element = document.createElementNS(elementNS, nsPrefix + ":" + elementName); //$NON-NLS-1$
- getNamespaces().setProperty(nsPrefix, elementNS);
- }
-
- setMinMax(element, minOccurs, maxOccurs);
- parent.appendChild(element);
+ String elementName = elementDeclaration.getName();
+ if (elementDeclaration.isAbstract()) {
+ if (typeDef != null) {
+ addTypeImpls(typeDef, minOccurs, maxOccurs, parent, document);
+ }
+ return;
+ }
- if(typeDef instanceof XSDComplexTypeDefinition) {
- ModelBuilder.setElementType(element, ElementType.complex);
- processComplexType(document, element, (XSDComplexTypeDefinition) typeDef);
- } else if(typeDef instanceof XSDSimpleTypeDefinition) {
- XSDSimpleTypeDefinition simpleTypeDef = (XSDSimpleTypeDefinition) typeDef;
- XSDTypeDefinition loadedType = types.get(simpleTypeDef.getName());
+ if (elementExpandStack.contains(typeDef)) {
+ return;
+ }
- if(loadedType instanceof XSDComplexTypeDefinition) {
- ModelBuilder.setElementType(element, ElementType.complex);
- processComplexType(document, element, (XSDComplexTypeDefinition) loadedType);
- } else {
- ModelBuilder.setElementType(element, ElementType.simple);
- }
- } else if(typeDef != null) {
- System.out.println("?? " + typeDef); //$NON-NLS-1$
- }
- } finally {
- elementExpandStack.pop();
- }
- }
+ elementExpandStack.push(typeDef);
+ try {
+ String elementNS = elementDeclaration.getTargetNamespace();
+ Element element;
+ if (elementNS == null || elementNS.equals(XMLConstants.W3C_XML_SCHEMA_NS_URI)) {
+ element = document.createElement(elementName);
+ } else {
+ String nsPrefix = getPrefix(elementNS);
+
+ element = document.createElementNS(elementNS, nsPrefix + ":" + elementName); //$NON-NLS-1$
+ getNamespaces().setProperty(nsPrefix, elementNS);
+ }
+
+ setMinMax(element, minOccurs, maxOccurs);
+ parent.appendChild(element);
+
+ if (typeDef instanceof XSDComplexTypeDefinition) {
+ ModelBuilder.setElementType(element, ElementType.complex);
+ processComplexType(document, element, (XSDComplexTypeDefinition) typeDef);
+ } else if (typeDef instanceof XSDSimpleTypeDefinition) {
+ XSDSimpleTypeDefinition simpleTypeDef = (XSDSimpleTypeDefinition) typeDef;
+ XSDTypeDefinition loadedType = types.get(simpleTypeDef.getName());
+
+ if (loadedType instanceof XSDComplexTypeDefinition) {
+ ModelBuilder.setElementType(element, ElementType.complex);
+ processComplexType(document, element, (XSDComplexTypeDefinition) loadedType);
+ } else {
+ ModelBuilder.setElementType(element, ElementType.simple);
+ }
+ } else if (typeDef != null) {
+ System.out.println("?? " + typeDef); //$NON-NLS-1$
+ }
+ } finally {
+ elementExpandStack.pop();
+ }
+ }
+
private String getPrefix(String elementNS) {
String nsPrefix = nsPrefixes.getProperty(elementNS);
- if(nsPrefix == null) {
+ if (nsPrefix == null) {
nsPrefix = "ns" + nsPrefixes.size(); //$NON-NLS-1$
nsPrefixes.setProperty(elementNS, nsPrefix);
}
@@ -240,98 +312,102 @@
}
private void processComplexType(Document document, Element element, XSDComplexTypeDefinition complexTypeDef) {
- XSDParticle particle = complexTypeDef.getComplexType();
- EList attributes = complexTypeDef.getAttributeContents();
+ XSDParticle particle = complexTypeDef.getComplexType();
+ EList<XSDAttributeGroupContent> attributes = complexTypeDef.getAttributeContents();
- addAttributes(element, attributes);
+ addAttributes(element, attributes);
- if(particle != null) {
- XSDParticleContent particleContent = particle.getContent();
- if (particleContent instanceof XSDModelGroup) {
- processModelGroup((XSDModelGroup) particleContent, particle.getMinOccurs(), particle.getMaxOccurs(), element, document);
- }
- }
- }
+ if (particle != null) {
+ XSDParticleContent particleContent = particle.getContent();
+ if (particleContent instanceof XSDModelGroup) {
+ processModelGroup((XSDModelGroup) particleContent, particle.getMinOccurs(), particle.getMaxOccurs(),
+ element, document);
+ }
+ }
+ }
- private void processModelGroup(XSDModelGroup modelGroup, int minOccurs, int maxOccurs, Element element, Document document) {
- List<XSDParticle> particles = modelGroup.getParticles();
- XSDCompositor compositor = modelGroup.getCompositor();
- String compositorType = compositor.getName();
+ private void processModelGroup(XSDModelGroup modelGroup, int minOccurs, int maxOccurs, Element element,
+ Document document) {
+ List<XSDParticle> particles = modelGroup.getParticles();
+ XSDCompositor compositor = modelGroup.getCompositor();
+ String compositorType = compositor.getName();
- if(particles.size() > 1 && compositorType.equals("choice")) { //$NON-NLS-1$
- Element compositorEl = ModelBuilder.createCompositor(document);
+ if (particles.size() > 1 && compositorType.equals("choice")) { //$NON-NLS-1$
+ Element compositorEl = ModelBuilder.createCompositor(document);
- compositorEl.setAttribute("type", compositorType); //$NON-NLS-1$
- setMinMax(compositorEl, minOccurs, maxOccurs);
- element.appendChild(compositorEl);
- element = compositorEl;
- }
+ compositorEl.setAttribute("type", compositorType); //$NON-NLS-1$
+ setMinMax(compositorEl, minOccurs, maxOccurs);
+ element.appendChild(compositorEl);
+ element = compositorEl;
+ }
- for (XSDParticle particle : particles) {
- XSDParticleContent content = particle.getContent();
+ for (XSDParticle particle : particles) {
+ XSDParticleContent content = particle.getContent();
- if (content instanceof XSDElementDeclaration) {
- expand((XSDElementDeclaration) content, particle.getMinOccurs(), particle.getMaxOccurs(), element, document);
- } else if (content instanceof XSDModelGroup) {
- processModelGroup((XSDModelGroup) content, particle.getMinOccurs(), particle.getMaxOccurs(), element, document);
- }
- }
- }
+ if (content instanceof XSDElementDeclaration) {
+ expand((XSDElementDeclaration) content, particle.getMinOccurs(), particle.getMaxOccurs(), element,
+ document);
+ } else if (content instanceof XSDModelGroup) {
+ processModelGroup((XSDModelGroup) content, particle.getMinOccurs(), particle.getMaxOccurs(), element,
+ document);
+ }
+ }
+ }
- private void addTypeImpls(XSDTypeDefinition baseType, int minOccurs, int maxOccurs, Node parent, Document document) {
- Set<Map.Entry<String, XSDElementDeclaration>> elementEntrySet = elements.entrySet();
+ private void addTypeImpls(XSDTypeDefinition baseType, int minOccurs, int maxOccurs, Node parent, Document document) {
+ Set<Map.Entry<String, XSDElementDeclaration>> elementEntrySet = elements.entrySet();
- for(Map.Entry<String, XSDElementDeclaration> elementEntry : elementEntrySet) {
- XSDElementDeclaration elementDecl = elementEntry.getValue();
+ for (Map.Entry<String, XSDElementDeclaration> elementEntry : elementEntrySet) {
+ XSDElementDeclaration elementDecl = elementEntry.getValue();
- if(isInstanceOf(baseType, elementDecl.getType())) {
- expand(elementDecl, minOccurs, maxOccurs, parent, document);
- }
- }
- }
+ if (isInstanceOf(baseType, elementDecl.getType())) {
+ expand(elementDecl, minOccurs, maxOccurs, parent, document);
+ }
+ }
+ }
- private void addAttributes(Element element, EList attributes) {
- // Add the attributes...
- if(attributes != null) {
- for(int i = 0; i < attributes.size(); i++) {
- XSDAttributeUse attributeUse = (XSDAttributeUse) attributes.get(i);
- XSDAttributeDeclaration attributeDecl = attributeUse.getAttributeDeclaration();
- XSDSimpleTypeDefinition typeDef = attributeDecl.getTypeDefinition();
- String name = attributeDecl.getName();
- String attributeNS = attributeDecl.getTargetNamespace();
- String value = ""; //$NON-NLS-1$
- XSDAttributeUseCategory use = attributeUse.getUse();
+ private void addAttributes(Element element, EList<XSDAttributeGroupContent> attributes) {
+ // Add the attributes...
+ if (attributes != null) {
+ for (int i = 0; i < attributes.size(); i++) {
+ XSDAttributeUse attributeUse = (XSDAttributeUse) attributes.get(i);
+ XSDAttributeDeclaration attributeDecl = attributeUse.getAttributeDeclaration();
+ String name = attributeDecl.getName();
+ String attributeNS = attributeDecl.getTargetNamespace();
+ String value = ""; //$NON-NLS-1$
+ XSDAttributeUseCategory use = attributeUse.getUse();
- if(use == XSDAttributeUseCategory.REQUIRED_LITERAL) {
- value = REQUIRED;
- } else if(attributeUse.getValue() != null) {
- value = OPTIONAL + "=" + attributeUse.getValue().toString(); //$NON-NLS-1$
- } else {
- value = OPTIONAL;
- }
+ if (use == XSDAttributeUseCategory.REQUIRED_LITERAL) {
+ value = REQUIRED;
+ } else if (attributeUse.getValue() != null) {
+ value = OPTIONAL + "=" + attributeUse.getValue().toString(); //$NON-NLS-1$
+ } else {
+ value = OPTIONAL;
+ }
- if(attributeNS == null || attributeNS.equals(XMLConstants.W3C_XML_SCHEMA_NS_URI)) {
- element.setAttribute(name, value);
- } else {
- String nsPrefix = getPrefix(attributeNS);
-
- element.setAttributeNS(attributeNS, nsPrefix + ":" + name, value); //$NON-NLS-1$
- getNamespaces().setProperty(nsPrefix, attributeNS);
- }
- }
- }
- }
+ if (attributeNS == null || attributeNS.equals(XMLConstants.W3C_XML_SCHEMA_NS_URI)) {
+ element.setAttribute(name, value);
+ } else {
+ String nsPrefix = getPrefix(attributeNS);
- private boolean isInstanceOf(XSDTypeDefinition baseType, XSDTypeDefinition type) {
- if(type == null) {
- return false;
- } else if(type.equals(baseType)) {
- return true;
- } else if(type.equals(type.getBaseType())) {
- // The base type is equal to the type itself when we've reached the root of the inheritance hierarchy...
- return false;
- } else {
- return isInstanceOf(baseType, type.getBaseType());
- }
- }
+ element.setAttributeNS(attributeNS, nsPrefix + ":" + name, value); //$NON-NLS-1$
+ getNamespaces().setProperty(nsPrefix, attributeNS);
+ }
+ }
+ }
+ }
+
+ private boolean isInstanceOf(XSDTypeDefinition baseType, XSDTypeDefinition type) {
+ if (type == null) {
+ return false;
+ } else if (type.equals(baseType)) {
+ return true;
+ } else if (type.equals(type.getBaseType())) {
+ // The base type is equal to the type itself when we've reached the
+ // root of the inheritance hierarchy...
+ return false;
+ } else {
+ return isInstanceOf(baseType, type.getBaseType());
+ }
+ }
}
\ No newline at end of file
13 years, 10 months