You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <refentry>
  2. <refnamediv>
  3. <refname>
  4. AspectJ Development Environment (AJDE) support for Forte
  5. </refname>
  6. <refpurpose>
  7. Module extension to Sun's <ulink url="http://www.sun.com/forte/ffj">Forte
  8. for Java</ulink> and
  9. <ulink url="http://netbeans.org">NetBeans</ulink> IDEs.
  10. </refpurpose>
  11. </refnamediv>
  12. <refsect1>
  13. <title>Overview</title>
  14. <para>
  15. For release-specific documentation refer to the <ulink
  16. url="http://aspectj.org/doc/dist/changes.html"> changes file</ulink>.
  17. </para>
  18. <para>
  19. AJDE for Forte will allow you to:
  20. <itemizedlist>
  21. <listitem><para>compile AspectJ and Java files within the
  22. IDE</para></listitem>
  23. <listitem><para>browse the structure of your AspectJ
  24. program</para></listitem>
  25. <listitem><para>set up a compile configuration that determine which
  26. files will be passed to the compiler</para></listitem>
  27. </itemizedlist>
  28. </para>
  29. </refsect1>
  30. <refsect1>
  31. <title>Installation</title>
  32. <para>
  33. <itemizedlist>
  34. <listitem><para>use the installer to place the "ajdeForForte.jar" and
  35. "aspectjrt.jar" into the modules directory. This will also install
  36. the two html files "LICENCE-AJDEFORTE.html" and
  37. "README-AJDEFORTE.html".</para></listitem>
  38. <listitem><para>start up, and in the "Tools" menu select "Global
  39. Options" </para></listitem>
  40. <listitem><para>right-click the "Modules" item and select "New Module
  41. from File..." </para></listitem>
  42. <listitem><para>find the ajdeForForte.jar in the directory that you
  43. installed into (e.g. c:/forte4j/modules) and select it
  44. </para></listitem>
  45. </itemizedlist>
  46. </para>
  47. <para>
  48. To uninstall follow Forte's documentation on un-installing modules, or
  49. simply remove the file modules/aspectjForForte.jar from Forte's
  50. install directory.
  51. </para>
  52. </refsect1>
  53. <refsect1>
  54. <title>Running AJDE for Forte</title>
  55. <para>
  56. <emphasis role="strong">3.1 Setting up the AspectJ Examples (in
  57. NetBeans 3.3.1)</emphasis>
  58. <imageobject>
  59. <imagedata fileref="netbeans-building.gif"/>
  60. </imageobject>
  61. <itemizedlist>
  62. <listitem><para>in the "Project" menu select "Project Manager"
  63. </para></listitem>
  64. <listitem><para>Click "New..." and enter "AspectJ Examples" as the
  65. projects' name and click "OK". </para></listitem>
  66. <listitem><para>In the "Filesystems" Explorer tab right click
  67. "Filesystems", then select "Mount -&gt; Local Directory".
  68. </para></listitem>
  69. <listitem><para>browse into the AspectJ install directory (e.g.
  70. "C:/apps/aspectj1.0") </para></listitem>
  71. <listitem><para>select "examples" and click "Finish"
  72. </para></listitem>
  73. <listitem><para>In the "Tools" menu select "AspectJ -&gt; Start AJDE"
  74. or just click on the "AJDE"
  75. (<inlinemediaobject>
  76. <imageobject>
  77. <imagedata fileref="startAjde.gif"/>
  78. </imageobject>
  79. </inlinemediaobject>)
  80. button (shown as label 1 of the screenshot).
  81. </para></listitem>
  82. </itemizedlist>
  83. </para>
  84. <para>
  85. <emphasis role="strong">3.2 Compiling the Spacewar Example</emphasis>
  86. <itemizedlist>
  87. <listitem><para>After AJDE is started, a new "AspectJ" tab is added
  88. to the explorer window. Click it. The next thing to do is to choose
  89. a particular build, since there are many in the examples
  90. distribution. To the right of the "Build" button
  91. (<inlinemediaobject>
  92. <imageobject>
  93. <imagedata fileref="build.gif"/>
  94. </imageobject>
  95. </inlinemediaobject>)
  96. there is a downward arrow. Click it, and select "spacewar/demo.lst"
  97. (as in label 2 of the screenshot). This will start a build of the
  98. demo configuration of spacewar. Clicking the "Build" button will
  99. rebuild. </para></listitem>
  100. <listitem><para>When the compile is finished and the "AspectJ
  101. Explorer" structure is present navigate the structure by clicking
  102. nodes (as shown in label 3 of the screenshot). Note that
  103. associations between nodes appear with UML-style arrow icons and
  104. italicized names and reperesent how a particular node in the
  105. structure relates to others. In order to navigate these associations
  106. expand the notes and click the corresponding links (in blue). These
  107. links represent structure nodes elsewhere in the tree.
  108. </para></listitem>
  109. <listitem><para>If there are compilation errors, clickable messages
  110. will appear (as in label 4 of the screenshot).
  111. </para></listitem>
  112. </itemizedlist>
  113. </para>
  114. <para>
  115. <emphasis role="strong">3.3 Running the Spacewar Example</emphasis>
  116. <itemizedlist>
  117. <listitem><para>
  118. In the "Filesystems" Explorer tab open the "spacewar"
  119. directory, right click "spacewar/Game.java", and the select
  120. "Execute".
  121. </para></listitem>
  122. <listitem><para>When finished executing switch back to the "Editing"
  123. mode.</para></listitem>
  124. <listitem><para>Select and build the "debug.lst" configuration as
  125. described in 3.2 and execute again--you will notice that the debug
  126. configuration adds a debug window used for tracing by including the
  127. "Debug.java" aspect in the compile.</para></listitem>
  128. </itemizedlist>
  129. </para>
  130. <emphasis role="strong">3.4 Debugging the Spacewar Example</emphasis>
  131. <itemizedlist>
  132. <listitem><para>
  133. You must first add the filesystem to the project so
  134. that the debugger can see the main class. Do this in
  135. the "Project AspectJ Examples" tab in the explorer by
  136. right clicking the root node and selecting "Add
  137. Existing...".
  138. </para></listitem>
  139. <listitem><para>You may now need to add the AspectJ Runtime to the
  140. project so that the debugger can see it. In the same way as described
  141. in 3.1 select "Mount -&gt; Archive (JAR, Zip)". </para></listitem>
  142. <listitem><para>Browse to the your lib/ext/aspectjrt.jar file within
  143. your NetBeans install directory and click "Finish".</para></listitem>
  144. <listitem><para>
  145. Select "Project -&gt; Set Project Main Class..." in the
  146. menu bar, browse to "spacewar/Game.java" in the
  147. examples directory that you created and click "OK".
  148. </para></listitem>
  149. <listitem><para>
  150. In the "Filesystems" Explorer tab open the "spacewar"
  151. directory, click "Game.java", and the select "Debug
  152. -&gt; Strat" from the menu bar.
  153. </para></listitem>
  154. </itemizedlist>
  155. <para>
  156. AspectJ-related options can be modified in the AJDE settings window.
  157. </para>
  158. <imageobject>
  159. <imagedata fileref="netbeans-buildOptions.gif"/>
  160. </imageobject>
  161. </refsect1>
  162. </refentry>
  163. <!-- Local variables: -->
  164. <!-- fill-column: 79 -->
  165. <!-- compile-command: "ant -quiet dev-html" -->
  166. <!-- sgml-local-ecat-files: devguide.ced -->
  167. <!-- sgml-parent-document:("devguide.sgml" "book" "refentry") -->
  168. <!-- End: -->