| <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" |
| content="text/html; charset=iso-8859-1"> |
| <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> |
| <title>JDT UI Component Development Resources</title> |
| <link rel="stylesheet" href="http://dev.eclipse.org/default_style.css" |
| type="text/css"> |
| </head> |
| <body text="#000000" bgcolor="#ffffff"> |
| |
| <table border="0" cellspacing="5" cellpadding="2" width="100%"> |
| <tbody> |
| <tr> |
| <td align="left" valign="top" colspan="2" bgcolor="#0080c0"><b><font |
| face="Arial,Helvetica"><font color="#ffffff">org.eclipse.jdt.astview |
| - AST View<br> |
| </font></font></b></td> |
| </tr> |
| <tr> |
| <td align="right" valign="top" width="2%"><img src="Adarrow.gif" |
| border="0" height="16" width="16"></td> |
| <td width="98%"><b>Purpose</b> |
| <p>A view to visualize the AST (abstract syntax tree) of a Java |
| file open in the editor. Navigate from text selection to AST nodes and |
| from nodes to selections.<br> |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td align="right" valign="top" width="2%"><img src="Adarrow.gif" |
| border="0" height="16" width="16"></td> |
| <td width="98%"><b>Install</b> |
| <p><b><i>Eclipse 3.0</i></b></p> |
| <ul> |
| <li>requires a SDK build > <span style="font-weight: bold;">I20040309</span></li> |
| <li>manually download the plugin <a |
| href="AST-View-Site/plugins/org.eclipse.jdt.astview_1.0.0.jar">org.eclipse.jdt.astview</a> |
| and extract the plugins into the plugins directory of your Eclipse |
| install.<br> |
| or<br> |
| </li> |
| <li>use the update feature and go to the AST View Update Site:<br> |
| <span style="font-weight: bold;"> |
| http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/plugins/org.eclipse.jdt.astview/AST-View-Site</span></li> |
| </ul> |
| <br> |
| </td> |
| </tr> |
| <tr> |
| <td align="right" valign="top" width="2%"><img src="Adarrow.gif" |
| border="0" height="16" width="16"></td> |
| <td width="98%"><b>Usage</b> |
| <ol> |
| <li>Open the AST view from the view menu: Window > Show View |
| > Other... Java > AST View </li> |
| <li><font color="#000000">Open a Java file in the editor </font> |
| </li> |
| <li>Click on 'Show AST of active editor' (<img |
| style="width: 16px; height: 16px;" src="setfocus.gif" alt=""> ) to |
| populate the view: The view shows the AST of the file opened in the |
| editor and will also reveal the element corresponding to the current |
| text selection<br> |
| </li> |
| <li><font color="#000000">Enable 'Link with editor' (</font><img |
| style="width: 16px; height: 16px;" src="synced.gif" alt="">) to |
| automatically track the active editor and the selection in the active |
| editor.<br> |
| </li> |
| <li>Double click on AST nodes to get the corresponding element |
| revealed in the editor.</li> |
| <li>Double click again to see the 'extended range' of a node, |
| that means the range including all comments associated with it (comment |
| mapper heuristic).</li> |
| <li>When the AST's underlying document has been changed use |
| 'Refresh' (<img style="width: 16px; height: 16px;" src="refresh.gif" |
| alt="">) to update the AST.<br> |
| </li> |
| </ol> |
| <b>AST View Elements</b><br> |
| <br> |
| There are three kinds of elements shown in the AST view<br> |
| <img style="width: 449px; height: 315px;" alt="AST View" |
| src="view.gif"><br> |
| <ul> |
| <li>AST nodes are shown in gray color and with source range |
| information. Children of AST nodes are the node properties.<br> |
| </li> |
| <li>node properties have names that are all all capitalized. |
| Node properties represent lists of child nodes, a child node or a |
| primitive node attribute (String, int or boolean)<br> |
| </li> |
| <li>bindings are shown in brackets. Only selected bindings are |
| shown,</li> |
| </ul> |
| <span style="font-weight: bold;">Advanced Features</span><br> |
| <ul> |
| <li>You can toggle between the AST Level 2 and AST level 3 in |
| the view menu (triangle). AST level 3 is the extended and modified AST |
| that includes the new 1.5 language constructs. In <span |
| style="font-weight: bold;">I20040309</span>, the level 3 AST is not |
| yet available.<br> |
| </li> |
| </ul> |
| <span style="font-weight: bold;">Comments and Requests</span><br> |
| <ul> |
| <li>Source is included in the plugin archive</li> |
| <li>Comments to <a |
| href="mailto:Martin_Aeschlimann%5Bat%5Dch.ibm.com">Martin_Aeschlimann[at]ch.ibm.com</a></li> |
| </ul> |
| <br> |
| Thanks and credits go to Christian Hauser: The current AST view plugin |
| is based his AST view implementation from the Zuerich Code Camp. Thanks |
| a lot!<br> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </body> |
| </html> |