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.

ajdeforte.adoc 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. AspectJ Development Environment (AJDE) support for Forte
  2. Module extension to Sun's
  3. Forte for Java
  4. and
  5. NetBeans
  6. IDEs.
  7. == Overview
  8. For release-specific documentation refer to the
  9. http://aspectj.org/doc/dist/changes.html[changes file].
  10. AJDE for Forte will allow you to:
  11. * compile AspectJ and Java files within the IDE
  12. * browse the structure of your AspectJ program
  13. * set up a compile configuration that determine which files will be
  14. passed to the compiler
  15. == Installation
  16. * use the installer to place the "ajdeForForte.jar" and "aspectjrt.jar"
  17. into the modules directory. This will also install the two html files
  18. "LICENCE-AJDEFORTE.html" and "README-AJDEFORTE.html".
  19. * start up, and in the "Tools" menu select "Global Options"
  20. * right-click the "Modules" item and select "New Module from File..."
  21. * find the ajdeForForte.jar in the directory that you installed into
  22. (e.g. c:/forte4j/modules) and select it
  23. To uninstall follow Forte's documentation on un-installing modules, or
  24. simply remove the file modules/aspectjForForte.jar from Forte's install
  25. directory.
  26. == Running AJDE for Forte
  27. *3.1 Setting up the AspectJ Examples (in NetBeans 3.3.1)*
  28. * in the "Project" menu select "Project Manager"
  29. * Click "New..." and enter "AspectJ Examples" as the projects' name and
  30. click "OK".
  31. * In the "Filesystems" Explorer tab right click "Filesystems", then
  32. select "Mount -> Local Directory".
  33. * browse into the AspectJ install directory (e.g. "C:/apps/aspectj1.0")
  34. * select "examples" and click "Finish"
  35. * In the "Tools" menu select "AspectJ -> Start AJDE" or just click on
  36. the "AJDE" (image:startAjde.gif[image]) button (shown as label 1 of the
  37. screenshot).
  38. *3.2 Compiling the Spacewar Example*
  39. * After AJDE is started, a new "AspectJ" tab is added to the explorer
  40. window. Click it. The next thing to do is to choose a particular build,
  41. since there are many in the examples distribution. To the right of the
  42. "Build" button (image:build.gif[image]) there is a downward arrow. Click
  43. it, and select "spacewar/demo.lst" (as in label 2 of the screenshot).
  44. This will start a build of the demo configuration of spacewar. Clicking
  45. the "Build" button will rebuild.
  46. * When the compile is finished and the "AspectJ Explorer" structure is
  47. present navigate the structure by clicking nodes (as shown in label 3 of
  48. the screenshot). Note that associations between nodes appear with
  49. UML-style arrow icons and italicized names and reperesent how a
  50. particular node in the structure relates to others. In order to navigate
  51. these associations expand the notes and click the corresponding links
  52. (in blue). These links represent structure nodes elsewhere in the tree.
  53. * If there are compilation errors, clickable messages will appear (as in
  54. label 4 of the screenshot).
  55. *3.3 Running the Spacewar Example*
  56. * In the "Filesystems" Explorer tab open the "spacewar" directory, right
  57. click "spacewar/Game.java", and the select "Execute".
  58. * When finished executing switch back to the "Editing" mode.
  59. * Select and build the "debug.lst" configuration as described in 3.2 and
  60. execute again--you will notice that the debug configuration adds a debug
  61. window used for tracing by including the "Debug.java" aspect in the
  62. compile.
  63. 3.4 Debugging the Spacewar Example
  64. * You must first add the filesystem to the project so that the debugger
  65. can see the main class. Do this in the "Project AspectJ Examples" tab in
  66. the explorer by right clicking the root node and selecting "Add
  67. Existing...".
  68. * You may now need to add the AspectJ Runtime to the project so that the
  69. debugger can see it. In the same way as described in 3.1 select "Mount
  70. -> Archive (JAR, Zip)".
  71. * Browse to the your lib/ext/aspectjrt.jar file within your NetBeans
  72. install directory and click "Finish".
  73. * Select "Project -> Set Project Main Class..." in the menu bar, browse
  74. to "spacewar/Game.java" in the examples directory that you created and
  75. click "OK".
  76. * In the "Filesystems" Explorer tab open the "spacewar" directory, click
  77. "Game.java", and the select "Debug -> Strat" from the menu bar.
  78. AspectJ-related options can be modified in the AJDE settings window.