[jboss-user] [JBoss Tools] Document updated/added: "JBossTools 3.x/4 Seam Refactoring"

Max Andersen do-not-reply at jboss.com
Wed Jan 20 05:17:08 EST 2010


User development,

The document "JBossTools 3.x/4 Seam Refactoring", was updated Jan 20, 2010
by Max Andersen.

To view the document, visit:
http://community.jboss.org/docs/DOC-13479#cf

Document:
--------------------------------------------------------------
     See https://jira.jboss.org/jira/browse/JBIDE-1077.
 
Seam Refactoring Scenarios:
 
*1.* *Renaming a Seam component in *.java*
 
Java Editor Pop-up menu -> Seam Refactor -> Rename Seam Component.
Then a standart Eclipse refactoring wizard is opend. We can see all previews and disable/enable particular changes there. This wizard shows references to this components to be affected:
* @Name("<newName>") in Seam component .java sorce

* <component name="<newName>" .../> in components.xml

* EL in *.java strings, *.jsp, *.xhtml, *.xml, *.properties. +E.g. #{<oldName>.property} -> #{<newName>.property}+.
* @In. +E.g. @In SomeClass <oldName> -> @In SomeClass <newName>; @In("<oldName>") SomeClass field -> @In("<newName>") SomeClass field.+
        In case of using a field/method name as context variable name (@In SomeClass someVariable) we should use JDT refactoring to rename the field/method name+. E.g. @In SomeClass <oldName>; ... <oldName>.getItem();... ->+ + at In SomeClass <newName>; ... <newName>.getItem();...+
* @Factory. I think we should suggest to rename factories for context variables with the same name. +E.g. @Factory("<oldName>") -> @Factory("<newName>"); @Factory public Item get<oldName>() {..} -> @Factory public Item get<newName>() {..}+
* Factory name in components.xml. +E.g. <factory name="<oldName>" /> -> <factory name="<newName>" />+

* property names in seam.properties. +E.g. <oldName>.property1 = ... -> <newName>.property1 = ...+
 
*2. Renaming a Seam component in components view*
 
Seam Components View -> Pop-up menu for a component.
Then we open the same wizard which we use in *1.*
 
*3. Renaming a Seam component in components.xml*
 
Components.xml editor -> Pop-up menu for <component> element.
Then we open the same wizard which we use in *1.*
 
*4. Renaming a Seam context variable in EL*
 
It should work in java, xml, jsp, xhtml and property editors for files in Seam projects
 
When user select Seam context variable in EL Pop-up menu -> Seam Refactor -> Rename Seam Context Variable appears
When user select this munu item we open the similar wizard which we use in *1.*
 
* Renaming a Seam component

same as in *1.*
 
* Renaming a Factory
** rename declarations of factory
** rename references in java annotations and EL

 
* Renaming a Out/DataModel
** rename annotations
** rename references in java annotations and EL
 
*5. Renaming a properties of* *Seam* *context variable in EL*
 
* TBD

 
*6. Renaming a Seam context variable in @In*
 
* TBD

--------------------------------------------------------------




More information about the jboss-user mailing list