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