| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| <html> |
| <head> |
| <link rel="STYLESHEET" href="http://www.eclipse.org/default_style.css" |
| charset="ISO-8859-1" type="text/css"> |
| <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> |
| <title>AJDT 2.1.1 - New and Noteworthy</title> |
| |
| </head> |
| <body> |
| <h1>AJDT 2.1.1 - New and Noteworthy</h1> |
| |
| <table border="0" cellpadding="10" cellspacing="0" width="80%"> |
| <tbody> |
| <tr> |
| <td valign="top"><b>Overview</b></td> |
| <td valign="top">In this release, we have focussed on searching |
| and refactoring support for Intertype Declarations (ITDs) and Declare |
| declarations. This will particularly benefit users of <a |
| href="http://www.springsource.org/roo">Spring Roo</a> who will be |
| better able to search and refactor source code that contains |
| Roo-style aspects.</td> |
| </tr> |
| |
| |
| <tr> |
| <td colspan="2"> |
| <hr> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2" valign="top" align="center"> |
| <h3>Searching</h3> |
| </td> |
| </tr> |
| |
| |
| <tr> |
| <td valign="top"><b>Searching and hovers for ITD target |
| types</b></td> |
| <td>Target types of intertype declarations now appear in the |
| search results when searching for type references: <br /> |
| <br /> |
| <img src="img/search_itd_target_type.png" border="1" /><br /> |
| Notice here that simple as well as fully qualified names are found |
| through searches.<br> |
| <br /> |
| Similarly, hovering over ITD target types will display its type |
| information: <br /> |
| <br /> |
| <img src="img/hover_itd_target_type.png" border="1" /> <br /> |
| Navigation (i.e., hyperlinks and F3) works as well.</td> |
| </tr> |
| |
| <tr> |
| <td valign="top"><b>Searching inside Declare parents</b></td> |
| <td>Types referenced inside of declare parents declarations are |
| also returned in search results where appropriate: <br /> |
| <br /> |
| <img src="img/search_declare_parents.png" border="1" /></td> |
| </tr> |
| |
| <tr> |
| <td valign="top"><b>Searching inside Declare annotation</b></td> |
| <td>And finally, types referenced inside of declare annotation |
| declarations are similarly found when searching for references: <br /> |
| <br /> |
| <img src="img/search_declare_annotation.png" border="1" /><br /> |
| <br /> |
| The annotation itself is also found through searching: <br /> |
| <br /> |
| <img src="img/search_declare_annotation2.png" border="1" /><br /> |
| <br /> |
| There are some limitations to these new searching features: |
| <ul> |
| <li>Wild cards are not supported.</li> |
| <li>Type bindings are sometimes not respected, meaning that two |
| types with the same name, but different packages may be |
| inappropriately matched. You will notice that the search result for |
| <code>@Loggable</code> inside of the <code>declare parents</code> is |
| marked as potential. This means that we could not match on the fully |
| qualified name, but only the type's simple name.</li> |
| <li>Field and method references in declare annotations are not |
| returned in search results. See, <a |
| href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327117">Bug |
| 327117</a>.</li> |
| <li>Hovers and navigation are not yet implemented inside of |
| declare declarations. |
| </ul> |
| </tr> |
| |
| |
| <tr> |
| <td colspan="2"> |
| <hr> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2" valign="top" align="center"> |
| <h3>Refactoring</h3> |
| </td> |
| </tr> |
| |
| |
| <tr> |
| <td valign="top"><b>Rename refactoring</b></td> |
| <td>Rename refactoring is working in almost all situations. |
| Intertype declarations can be renamed; fields, methods, and types |
| referenced inside of Aspects will be appropriately renamed; and |
| AspectJ Compilation units will be renamed when appropriate. Most of |
| this work was completed for the <a href="../whatsnew210/index.html">2.1.0 |
| release</a>, with some small fixes included in this release. <br> |
| <br> |
| The most significant improvement in this area is that package renames |
| are properly reflected in fully qualified names that are referenced |
| in aspects: <br /> |
| <br /> |
| <img src="img/rename_package.png" border="1" /> <br /> |
| <br /> |
| AJDT does not currently support the renaming of named pointcuts.</td> |
| </tr> |
| |
| <tr> |
| <td valign="top"><b>Move refactoring</b></td> |
| <td>Similarly, move refactoring is AspectJ-aware. Import |
| statements and fully qualified names will be properly updated in |
| Aspects when types and compilation units move. For example, moving |
| a type referenced by an Aspect will force import statements to be |
| added/removed and fully qualified names to be updated: |
| <br/><br/> |
| <img src="img/move_cu.png" border="1" /> |
| <br/><br/> |
| Note that you will sometimes receive an error message like this: |
| <br/><br/> |
| <img src="img/potential_matches.png" border="1" /> |
| <br/><br/> |
| This message means that there are some type reference matches that |
| the refactoring is not sure about. This happens because there are |
| some situations where AJDT cannot determine type bindings and performs |
| matches on simple, rather than qualified, names. This message can generally |
| be ignored, but you may want to examine all changes to make sure. |
| <br/><br/> |
| It is also possible to |
| drag and drop types, fields, and methods into aspects, with the same |
| behavior as you would expect when the project is pure Java. |
| For example, when dragging and dropping a type into an AspectJ |
| compilation unit, fully qualifed references to that type are properly |
| updated: <br /> |
| <br /> |
| <img src="img/move_type_into_aspect.png" border="1" /> <br /> |
| <br /> |
| Note that currently, only drag and dropping of fields and methods |
| into aspects are working. Using the Move Refactoring wizard is |
| throwing exceptions.</td> |
| </tr> |
| |
| <tr> |
| <td valign="top"><b>Catalog of working refactorings in AJ |
| files</b></td> |
| <td>In this release, we have done significant work in making |
| sure that the standard JDT refactorings are available when inside an |
| Aspect. We have focussed on the more widely used refactorings, and |
| left some of the less popular refactorings unimplemented. In addition |
| to the AspectJ-specific <strong>Push in</strong> and <strong>Pull |
| out</strong> refactorings, and the standard <strong>Rename</strong> and <strong>Move</strong> |
| here are the JDT refactorings that are currently known to work in |
| AJDT: |
| |
| <ul> |
| <li>Extract Class</li> |
| <li>Pull up</li> |
| <li>Push down</li> |
| <li>Use super type where possible</li> |
| <li>Inline</li> |
| <li>Extract Method</li> |
| <li>Extract Local Variable</li> |
| <li>Extract Constant</li> |
| <li>Introduce indirection</li> |
| <li>Introduce parameter (non-advice)</li> |
| </ul> |
| |
| The following refactorings will produce correct results, even though |
| the refactoring wizard complains about compilation errors: |
| <ul> |
| <li>Change method signature</li> |
| <li>Introduce Parameter Object (inside non-ITD method)</li> |
| </ul> |
| |
| And finally, the following refactorings produce errors and do not |
| work inside aspects: |
| |
| <ul> |
| <li>Extract super class</li> |
| <li>Infer generic arguments where possible</li> |
| <li>Introduce Parameter (inside advice)</li> |
| <li>Introduce Parameter Object</li> |
| <li>Convert Local variable to a field</li> |
| <li>Encapsulate field</li> |
| <li>Move type to new file, when the type is an inner type of an Aspect</li> |
| <li>Move static field or method into aspect (using move wizard, |
| drag and drop is working)</li> |
| </ul> |
| |
| If you want us to fix any of the above refactorings, or you notice a |
| problem with one of the existing refactorings, please notify us on |
| the mailing list or raise a bugzilla request for it.</td> |
| </tr> |
| |
| <tr> |
| <td colspan="2"> |
| <hr> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"><b>AspectJ 1.6.10</b></td> |
| <td>AJDT 2.1.0 includes AspectJ 1.6.10. See the <a |
| href="http://eclipse.org/aspectj/doc/released/README-1610.html">readme</a> |
| for details.</td> |
| </tr> |
| |
| <tr> |
| <td colspan="2"> |
| <hr> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"><b>Bug Fixes</b></td> |
| <td>See <a href="http://tinyurl.com/297kbp7">bugzilla</a> for a |
| list of bugs addressed in this release.</td> |
| </tr> |
| |
| <tr> |
| <td colspan="2"> |
| <hr> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"><b>Previous Releases</b></td> |
| <td>See <a |
| href="http://www.eclipse.org/ajdt/whatsnew210/index.html">here</a> |
| for information on the new features in AJDT 2.1.0.</td> |
| </tr> |
| <tr> |
| <td colspan="2"> |
| <hr> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top"><b>Thanks!</b></td> |
| <td>Thanks for community help and feedback during this release |
| cycle. You can contact the AJDT team on the <a |
| href="https://dev.eclipse.org/mailman/listinfo/ajdt-dev">mailing |
| list</a>, and raise bugs on <a href="https://bugs.eclipse.org/bugs/">bugzilla</a>. |
| We also lurk on the <a |
| href="http://eclipse.org/aspectj/userlists.php">AspectJ users |
| list</a>, and on the <a |
| href="http://forum.springsource.org/forumdisplay.php?f=32">SpringSource |
| Tool Suite forum</a>.</td> |
| </tr> |
| </tbody> |
| </table> |
| </body> |
| </html> |