[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-users] Eclipse Aspect Visualizer (part of AJDT)
|
Here are my instructions for installing and using AJDT with Eclipse
3.0.0.
Feel free to send me suggestions for improvements to
them.
---
To install Eclipse 3.0.0 ...
AspectJ Developer Tools (AJDT) is an Eclipse plug-in.
For
documentation, see http://eclipse.org/ajdt/.
To integrate
AJDT with Eclipse ...
- Run eclipse.exe
- If HTTP requests must go through a proxy
server,
- Select Windows..Preferences..Install/Update
-
Click the "Enable HTTP proxy connection" checkbox
- Enter the "HTTP
proxy host address"
- Enter the "HTTP proxy host port"
-
Click the "OK" button
- Select Help..Software Updates..Find and
Install..
- Select "Search for new features to install" and click "Next
>".
- Click the "Add Update Site..." button.
- Add an update site
called "ADJT" with a URL of
http://download.eclipse.org/technology/ajdt/update.
-
Click "Next >".
- Click the checkbox in front of "Eclipse AspectJ
Development Tools"
and click "Next >".
- Click the "I
accept ..." radio button and click "Next >".
- Click the "Finish"
button.
- Click the "Install" button.
- When downloading finishes, click
the "Yes" button to restart the workbench.
- Select
Window...Preferences...Workbench...File Associations...*.java.
- Select
"AspectJ/Java Editor" and click the "Default" button.
- Click the "OK"
button.
- It may be necessary to restart Eclipse for this change to take
effect.
To create an AspectJ-enabled project in Eclipse ...
- Select File..New..Project.
- Select "AspectJ" and click "Next
>".
- Enter a project name.
- If the project directory already exists,
deselect "Use default",
select the project directory and click
"Finish".
- If the project directory doesn't exist then the default can be
used.
To configure the project directories when the project
already has src
and classes subdirectories ...
- Select Project ... Properties ... Java Build
Path ... Source.
- Click the "Add Folder ..." button.
- Select the
existing src subdirectory and click the "OK" button.
- A dialog will ask "Do
you want to remove the project as source folder
and update build
output folder to ".../bin"?
You want the first part but not the
second.
Click the "Yes" button. The second part can be fixed
next.
- Change "Default output folder" from ".../bin" to ".../classes".
-
Click the "OK" button.
- Select Project...Rebuild All.
To debug an application that uses AspectJ ...
- From the "Run" menu, select "Debug...".
- In the Debug dialog,
select the "Stop in main" checkbox and
click the "Debug" button.
-
Use the "Step Into" and "Step Over" buttons to step to lines affected by
aspects.
These are indicated by a special icon in the left-hand
margin.
- Point the mouse at an icon to display a tooltip that
indicates the advice code that will be executed.
- Right-click ans icon to
display a popup-menu containing
a cascading menu labelled "affected by
advice".
- Select an advice description from this menu to view the advice
code.
- Click the "Back" button to return to viewing the original source
code.
Limitations
- Breakpoints cannot be set in advice code.
To use the AspectJ Visualizer ...
- Select Window...Show View...Other...
- Expand the AspectJ tree
node.
- Select "Aspect Visualizer" and "Aspect Visualizer Menu"
("AJDT Event Trace" is just for debugging AJDT).
- Click "OK".
- Two new
tabs are added to the same window that contains the "Console" tab.
-
Rebuilding the project may be necessary to populate the new tabs.
- Select
the "Aspect Visualizer Menu" tab to control which aspects are being
visualized and see what colors are assigned to them.
- Select the "Aspect
Visualizer" tab to view where aspects are applied in classes.
- To limit the
display to a single class or package, select it in the Package Explorer.
- To
limit the display to only classes affected by aspects, click the Limit
button.
- Double-click a colored bar to scroll to the corresponding
source.
- Point the mouse at the aspect icon in the left margin to
see
which advice code is being used.
To run the AspectJ compiler (ajc) from Ant within Eclipse
...
- Add fork="true" to the ajc task.
- In the Package Explorer window,
right-click build.xml and select "Run Ant..."
or
- select
Window...Show View...Ant
- click the "Add Buildfiles" button (has 3
plus signs on it)
- select build.xml and click the "OK"
button
- expand the tree view of the targets
- double-click
the target to run
To view source using a Smalltalk-like browser ...
- Select
Window...Open Perspective...Java Browsing
Hi
Mark!
I'm playing around with the AJDT plugin in Eclipse but am unable
to get the AspectJ Visualizer to display anything so I would appreciate you're
step-by-step instructions.
thanks in advance
-
Garry
Volkmann, Mark wrote:
I got this working today and it's pretty cool! It
provides a nice graphical display of classes affected by aspects. If
anyone is interested, I can share my step-by-step instructions for
installing and using it.
This allows me to determine what aspects affect a given
class. Does AJDT provide a way to ask what classes are affected by a
given aspect (like ajbrowser
does)?
***********************************************************************************
WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
************************************************************************************