Author: ochikvina
Date: 2009-11-27 10:59:05 -0500 (Fri, 27 Nov 2009)
New Revision: 18884
Modified:
trunk/seam/docs/reference/en/modules/seam_refactoring.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-957 - updating the 'Seam Refactoring
Tools' chapter;
Modified: trunk/seam/docs/reference/en/modules/seam_refactoring.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/seam_refactoring.xml 2009-11-27 15:10:44 UTC (rev
18883)
+++ trunk/seam/docs/reference/en/modules/seam_refactoring.xml 2009-11-27 15:59:05 UTC (rev
18884)
@@ -11,43 +11,35 @@
</chapterinfo>
<title>Seam Refactoring Tools</title>
<para>The goal of Seam components refactoring is to make system-wide code
changes without affecting the behavior of the program.
- The Seam module of JBoss Tools provides assistance in easily code refactoring.
Starting from Jboss Tools M4 refactoring functionality became also available for managed
beans, method and properties used in ELs
- When performing a refactoring operation, you can preview all of the changes
resulting from a refactoring action before you choose to carry them out.
- Refactoring commands are available from the context menus of several views and
editors.
- Now Seam refactoring tools include only one refactoring
command:<emphasis><property>Rename Seam
Component</property></emphasis>.
- </para>
- <para>The command is available from the next views:</para>
- <itemizedlist>
- <listitem>
- <para> <link linkend="JavaEditor">Java
Editor</link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link linkend="SeamComponents">Seam
Components</link>
- </para>
- </listitem>
- <listitem>
- <para><link linkend="xml_html">JBossTools XML Editor,
other xml/html editors
-
- </link>
- </para>
- </listitem>
- <listitem>
- <para><link linkend="properties">JBossTools Properties
Editor
-
- </link>
- </para>
- </listitem>
- </itemizedlist>
- <para>Renaming the selected seam component also (if enabled) corrects all
references to the
- component(also in other files in the project).Renaming a type doesn't allow
to rename
- similarly named variables and methods.
- </para>
+ The Seam module of <property>JBoss Tools</property> provides
assistance in easily code refactoring.</para>
+
+ <para>Starting from Jboss Tools M4 refactoring functionality became also
available for managed beans, method and properties used in ELs.
+ Thus now Seam refactoring tools include the next refactoring
operations:</para>
+
+ <itemizedlist>
+ <listitem><para><link
linkend="renaming_seam_components">Renaming Seam
components</link></para></listitem>
+ <listitem><para><link
linkend="renaming_seam_context_vars">Renaming Seam context variables in
EL</link></para></listitem>
+ </itemizedlist>
+
+ <para>Refactoring commands are available from the context menus of several views
and editors and use a standard Eclipse refactoring wizard.
+ For details, see <link linkend="RefactornigWizard">"Using the
Refactoring Wizard"</link> later in this chapter.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Seam refactoring could be only performed in the file that is not marked as
<emphasis><property>Read only</property></emphasis> in its
properties.</para>
+ </note>
+
+ <figure>
+ <title>Properties View for Java File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
<section id="RefactornigWizard">
- <?dbhtml filename="RefactornigWizard.html"?>
- <title>Refactorinig wizard
- </title>
+ <title>Using the Refactorinig Wizard</title>
<para>This wizard is opened always when the user clicks
<property>Rename Seam Component</property>/<property>Rename Seam Context
Variable</property>/<property>Rename</property> command in any
of the mentioned views.
</para>
@@ -60,9 +52,11 @@
</imageobject>
</mediaobject>
</figure>
- <para>In the <property>Seam Components Field</property> you
should write a new name of the component,
- click <property>Next</property> and follow the next wizard
steps:
+
+ <para>In the <property>Seam Components name</property> field
you should enter a new name of the component,
+ then click <property>Next</property> and follow the next wizard
steps:
</para>
+
<figure>
<title>Navigating between the differences</title>
<mediaobject>
@@ -71,7 +65,13 @@
</imageobject>
</mediaobject>
</figure>
- <para>The view represents two windows: one with the source code and the
second with refactored one. With the help of
+
+ <para>As you see, when performing a refactoring operation, you can preview
all of the changes resulting from a refactoring
+ action before you choose to carry them out.</para>
+
+ <para>The view represents two windows: one with the original source code
and the other with refactored one.</para>
+
+ <para>With the help of
<inlinemediaobject> <imageobject>
<imagedata fileref="images/seam_refactoring/butt1.png"/>
</imageobject></inlinemediaobject>,
@@ -84,8 +84,9 @@
<inlinemediaobject> <imageobject>
<imagedata fileref="images/seam_refactoring/butt4.png"/>
</imageobject></inlinemediaobject> buttons you can quickly
navigate between the differences in the code.
- If you don't agree with some changes you can't undo them but you can
remove the class from the list of classes that need refactoring.
- </para>
+ If you don't agree with some changes you can't undo them but you
can remove the class from the list of classes that need refactoring.
+ </para>
+
<figure>
<title>List of classes that need refactoring
</title>
@@ -95,109 +96,112 @@
</imageobject>
</mediaobject>
</figure>
- <para>To apply the changes click
<emphasis><property>Finish</property></emphasis>.
- </para>
+
+ <para>To apply the changes click
<emphasis><property>Finish</property>.</emphasis></para>
+
+ <para>Renaming the selected seam component also corrects all references to the
+ component (also in other files in the project). Renaming a type doesn't allow
to rename
+ similarly named variables and methods.
+ </para>
</section>
-
- <section>
- <title>Opening Refactoring wizard in different views</title>
- <para>Seam component can be renamed only if it's not marked as
<emphasis><property>Read only</property></emphasis> in properties
for the java file where it's declared.
- </para>
- <figure>
- <title>Properties view for java file
- </title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_refactoring/seam_refactor10.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <section id="JavaEditor">
- <?dbhtml filename="JavaEditor.html"?>
- <title>Opening Refactoring wizard in Java Editor</title>
- <para>If you want to rename certain seam component using Java Editor,first
of all it's necessary to open it.
- If you don't know ,where the seam component is declared,use <link
linkend="open_seam_component">Open Seam Components icon</link>.
-
- </para>
- <para>To open the rename Seam Component command in Java Editor it's
necessary to left click the file <emphasis><property>>Seam
Refactor>Rename Seam Component</property></emphasis>.
- </para>
- <figure>
- <title>Opening Refactoring wizard in Java Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_refactoring/seam_refactor1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="SeamComponents">
- <title>Opening Refactoring wizard in Seam Components view</title>
- <para>To open <property>Refactoring wizard</property> in
<property>Seam Components</property> view the user should left click the
component he wants to open and choose <property>Rename Seam
Component</property> option.</para>
- <figure>
- <title>Opening Refactoring wizard in Seam Components
view</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_refactoring/seam_refactor5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="xml_html">
- <title>Opening Refactoring wizard in JBossTools XML Editor, other xml/html
editors
- </title>
- <para>When you open <property>components.xml</property> file
using JBossTools XML Editor,it's possible to open the <property>Refactoring
dialog</property> in two ways:</para>
- <itemizedlist>
- <listitem>
- <para>in the Tree tab.You should left click the component in
<property>components</property> section and choose
<property>Rename</property> option.
- </para>
- <figure>
- <title>Opening Refactoring wizard in
<emphasis><property>components.xml</property></emphasis>
file</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_refactoring/seam_refactor6.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>
- in the Source tab.To do this, select the component name in the
file,open context menu by left click and choose <property>Seam Refactor> Rename
Seam Context Variable</property>
- .</para>
- <figure>
- <title>Opening Refactoring wizard in components.xml
file</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_refactoring/seam_refactor7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>This method of <property>Refactoring
wizard</property> opening is also available in other xml/html editors.</para>
- <figure>
- <title>Opening Refactoring wizard in .html file</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_refactoring/seam_refactor8.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- </section>
- <section id="properties">
- <title>Opening Refactoring wizard in .properties files
- </title>
- <para>You can also open seam components in .properties files by selecting
- the component name in the file and choose <property>Seam Refactor>
Rename Seam Context Variable</property> from the context menu.</para>
- <figure>
- <title>Opening Refactoring wizard in .properties files</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_refactoring/seam_refactor9.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
+
+ <section id="renaming_seam_components">
+ <title>Renaming Seam Components</title>
+
+ <para>Renaming a Seam component could be performed in the:</para>
+
+ <itemizedlist>
+ <listitem><para><link linkend="JavaEditor">Java
editor</link></para></listitem>
+ <listitem><para><link linkend="SeamComponents">Seam
Components view</link></para></listitem>
+ <listitem><para><link linkend="components_xml_editor">Tree
view of the components.xml editor</link></para></listitem>
+ </itemizedlist>
+
+ <section id="JavaEditor">
+ <title>Renaming Seam Components in the Java Editor</title>
+ <para>If you want to rename certain seam component using Java Editor,first of
all it's necessary to open it.
+ If you don't know ,where the seam component is declared,use <link
linkend="open_seam_component">Open Seam Components icon</link>.
+
+ </para>
+ <para>To open the rename Seam Component command in Java Editor it's
necessary to left click the file <emphasis><property>>Seam
Refactor>Rename Seam Component</property></emphasis>.
+ </para>
+ <figure>
+ <title>Opening Refactoring wizard in Java Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="SeamComponents">
+ <title>Renaming Seam Components in the Seam Components View</title>
+ <para>To open <property>Refactoring</property> wizard in the
<property>Seam Components</property> view
+ you should left click the component you wants to open and choose
<property>Rename Seam Component</property> option.</para>
+
+ <figure>
+ <title>Opening Refactoring Wizard in Seam Components View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="components_xml_editor">
+ <title>Renaming Seam Components in the Seam Components Editor</title>
+ <para>When you open <literal>components.xml</literal> file using
<property>JBossTools XML Editor</property>, open the
+ <property>Refactoring</property> wizard in the Tree tab by left-clicking
the component in
+ <property>components</property> area and choosing
<property>Rename</property> option.</para>
+
+ <figure>
+ <title>Opening Refactoring Wizard in
<emphasis><property>components.xml</property></emphasis>
File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_refactoring/seam_refactor6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ </section>
+
+ <section id="renaming_seam_context_vars">
+ <title>Renaming Seam Context Variables in EL</title>
+
+ <para>Renaming a Seam context variables in EL could be executed in
<literal>.java</literal>, <literal>.xml</literal>,
<literal>.jsp</literal>,
+ <literal>.xhtml</literal> and <literal>.properties</literal>
files in Seam projects using
+ the context menu command <emphasis><property>Seam Refactor > Rename
Seam Context Variable</property>.</emphasis></para>
+
+ <figure>
+ <title>Refactoring Seam Context Variable in .properties File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>Opening Refactoring wizard in components.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>Opening Refactoring wizard in .html file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
</chapter>