Browse Source

Remove references and docs about obsolete tools

- AspectJ Browser (ajbrowser)
- Forte IDE integration
- JBuilder IDE integration
- Emacs integration

All this information was old and outdated. Ajbrowser was removed from
AspectJ a while ago. If the other tools even still exist, any possibly
existing AspectJ support is not part of AspectJ itself.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
tags/V1_9_21_1
Alexander Kriegisch 4 months ago
parent
commit
4403dd934b

+ 0
- 47
ajde/AJDE.jpx View File

@@ -1,47 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--JBuilder XML Project-->
<project>
<property category="ajde" name="build.configs.active" value="&lt;all project files&gt;"/>
<property category="idl" name="ProcessIDL" value="false"/>
<property category="runtime.0" name="RunnableType" value="com.borland.jbuilder.runtime.ApplicationRunner"/>
<property category="runtime.0" name="appserver.ejbJarsSaved" value="1"/>
<property category="runtime.0" name="appserver.parameters" value="-jts -jns -jss -jdb"/>
<property category="runtime.0" name="appserver.servername" value="standard"/>
<property category="runtime.0" name="appserver.vmparameters" value="-Dvbroker.agent.port=14000 -Djava.library.path=/BorlandEnterpriseServer/lib;/BorlandEnterpriseServer/bin -Dborland.enterprise.licenseDir=/BorlandEnterpriseServer/var/servers/ADVICE/adm -Dejb.module_preload=true"/>
<property category="runtime.0" name="jsprunner.launchuri" value="/"/>
<property category="runtime.0" name="test.harness" value="junit.textui.TestRunner"/>
<property category="sys" name="AuthorLabel" value="@author"/>
<property category="sys" name="BackupPath" value="bak"/>
<property category="sys" name="CheckStable" value="1"/>
<property category="sys" name="Company" value=""/>
<property category="sys" name="CompanyLabel" value="Company:"/>
<property category="sys" name="CompileOnDebug" value="0"/>
<property category="sys" name="CompileOnRun" value="0"/>
<property category="sys" name="Copyright" value="Copyright (c) 2002"/>
<property category="sys" name="CopyrightLabel" value="Copyright:"/>
<property category="sys" name="DefaultPath" value="../src"/>
<property category="sys" name="Description" value=""/>
<property category="sys" name="DescriptionLabel" value="Description:"/>
<property category="sys" name="DocPath" value="doc"/>
<property category="sys" name="ExcludeClassEnabled" value="0"/>
<property category="sys" name="IncludeTestPath" value="1"/>
<property category="sys" name="JDK" value="java 1.3.1-b24"/>
<property category="sys" name="LastTag" value="0"/>
<property category="sys" name="Libraries" value="AspectJ Tools;Open Tools SDK"/>
<property category="sys" name="MakeStable" value="0"/>
<property category="sys" name="OutPath" value="../bin"/>
<property category="sys" name="SourcePath" value="../src;test"/>
<property category="sys" name="TestPath" value="test"/>
<property category="sys" name="Title" value=""/>
<property category="sys" name="TitleLabel" value="Title:"/>
<property category="sys" name="Version" value="1.0"/>
<property category="sys" name="VersionLabel" value="@version"/>
<property category="sys" name="WorkingDirectory" value="."/>
<property category="sys" name="max.package.levels" value="5"/>
<property category="sys"
name="uidesign.size.org.aspectj.ajde.ui.swing.BrowserStructureViewToolPanel" value="518,92"/>
<property category="sys"
name="uidesign.size.org.aspectj.ajde.ui.swing.BuildConfigManagementPanel" value="299,86"/>
<property category="sys"
name="uidesign.size.org.aspectj.ajde.ui.swing.ErrorDialog" value="465,361"/>
</project>

+ 0
- 119
build/src/main/java/$installer$/org/aspectj/Main.java View File

@@ -284,125 +284,6 @@ class DocsInstaller extends Installer {
}
}

class AJDEForJBuilderInstaller extends Installer {
public String getTitle() {
return "AspectJ(TM) Support for JBuilder";
}

public String getPrefix() {
return "ajdeForJBuilder";
}

public AJDEForJBuilderInstaller() {
InstallPane installPane = new InstallPane(false);
setInstallPane(installPane);
panes = new WizardPane[] { new IntroPane(), new LocationPane() {
public String getDefaultLocation() {
if (context.onWindows()) {
// check some default locations
String[] paths = { "c:\\JBuilder6\\lib\\ext", "c:\\apps\\JBuilder6\\lib\\ext",
"c:\\Program Files\\JBuilder6\\lib\\ext" };
int pathIndex = 0;
for (; pathIndex < paths.length; pathIndex++) {
if (new File(paths[pathIndex]).exists()) {
return paths[pathIndex];
}
}
return "c:\\JBuilder6\\lib\\ext";
} else {
return "/usr/JBuilder6/lib/ext";
}
}

/**
* Make sure that the old jar file gets removed.
*/
public void verify() {
File jbuilder = new File(location.getText() + "/../../lib/jbuilder.jar");
if (!jbuilder.exists() && hasGui()) {
int ret = JOptionPane.showConfirmDialog(frame, "The location you specified does not seem to be a "
+ "valid JBuilder install directory." + " Continue?", "Confirm Install", JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (ret != JOptionPane.YES_OPTION) {
Main.exit(-1);
} else {
// do nothing
}
}

File oldFile = new File(location.getText() + "/ajbuilder.jar");
if (oldFile.exists() && hasGui()) {
int ret = JOptionPane.showConfirmDialog(frame,
"This old version of AJDE for JBuilder (\"ajbuilder.jar\") exists"
+ " and must be removed from the install directory." + " OK to delete?", "Confirm Delete",
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (ret != JOptionPane.YES_OPTION) {
Main.exit(-1);
} else {
oldFile.delete();
}
}
}
}, installPane, new FinishPane() };
}
}

class AJDEForForteInstaller extends Installer {
public String getTitle() {
return "AspectJ(TM) Support for Forte 4J";
}

public String getPrefix() {
return "ajdeForForte";
}

private String installLoc = "";

public AJDEForForteInstaller() {
InstallPane installPane = new InstallPane(false);
setInstallPane(installPane);
panes = new WizardPane[] { new IntroPane(), new LocationPane() {
public String getDefaultLocation() {
if (context.onWindows()) {
// check some default locations
String[] paths = { "c:\\forte4j\\modules", "c:\\apps\\forte4j\\modules", "c:\\Program Files\\forte4j\\modules" };
int pathIndex = 0;
for (; pathIndex < paths.length; pathIndex++) {
if (new File(paths[pathIndex]).exists()) {
return paths[pathIndex];
}
}
return "c:\\forte4j\\modules";
} else {
return "/usr/forte4j/modules";
}
}

public void verify() {
File forte = new File(location.getText() + "/../lib/openide.jar");
installLoc = location.getText();
if (!forte.exists() && hasGui()) {
int ret = JOptionPane.showConfirmDialog(frame, "The location you specified does not seem to be a "
+ "valid Forte install directory." + " Continue?", "Confirm Install", JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (ret != JOptionPane.YES_OPTION) {
Main.exit(-1);
} else {
// do nothing
}
}
}
}, installPane, new FinishPane() {
public void finalActions() { // todo verify dir ../lib/ext exists?
// !!! this should be done with two install locations, not by moving a file
new File(installLoc + "/../lib/ext/aspectjrt.jar").delete();
new File(installLoc + "/aspectjrt.jar").renameTo(new File((installLoc + "/../lib/ext/aspectjrt.jar")));
new File(installLoc + "/aspectjrt.jar").delete();
}
} };
}
}

class SrcInstaller extends Installer {
public String getTitle() {
return "AspectJ(TM) Compiler and Core Tools Sources Installer";

+ 3
- 34
docs/developer/modules.adoc View File

@@ -16,17 +16,13 @@ build outside of Eclipse.)
|===
| *Module* | *Dependencies* | *Description*

| ajbrowser | ajde, asm, bridge, util, taskdefs (pseudo, for build system) | This module contains the ajbrowser
application. It depends on the ajde module for access to the aspectj compiler, and also for the swing user interface
components that ajde provides.

| ajde | asm, bridge, org.aspectj.ajdt.core, org.eclipse.jdt.core, util | Hides the details of accessing the AspectJ
compiler and interpreting compilation results (error messages, structure model, etc.) from other applications (typically
IDEs) that need to invoke it programmatically. Changing any public interface in ajde can break all the IDE integration
projects and should be done with care. +
+
It also contains a library of common swing user interface components that can be used by any swing based IDE. Ajbrowser
and the non-eclipse IDE integration projects use this library (except for the emacs support).
It also contains a library of common swing user interface components that can be used by any swing based IDE. The
non-eclipse IDE integration projects use this library (except for the emacs support).

| asm | bridge | Contains the Abstract Structure Model, which represents the result of an aspectj compilation. Clients
of ajde are returned an instance of the structure model which allows them to navigate and interpret the static structure
@@ -53,7 +49,7 @@ accidental changes. Sources are available in CVS at dev.eclipse.org:/cvsroot/tec
bytecode toolkit. All advice planning and weaving is done here. Takes an aspect bytecode format and other Java
classfiles as input.
|===
=== Supporting Modules

*CVS Location:* dev.eclipse.org:/cvsroot/technology/org.aspectj/modules
@@ -79,30 +75,3 @@ classfiles as input.
| org.eclipse.ajdt.ui | org.aspectj.ajde | AspectJ IDE support for Eclipse
| org.aspectj.ajde | ajde, asm, bridge | AspectJ libraries plug-in
|===

=== JBuilder Support

*CVS Location:* cvs.aspectj4jbuildr.sourceforge.net:/cvsroot/aspectj4jbuildr

|===
| *OpenTool* | *Dependencies* | *Description*
| jbuilder | ajde, asm, bridge | AspectJ IDE support for JBuilder
|===

=== NetBeans Support

*CVS Location:* cvs.aspectj4netbean.sourceforge.net:/cvsroot/aspectj4netbean

|===
| *Module* | *Dependencies* | *Description*
| netbeans | ajde, asm, bridge | AspectJ IDE support for NetBeans and SunONE Studio
|===

=== Emacs Support

*CVS Location:* cvs.aspectj4emacs.sourceforge.net:/cvsroot/aspectj4emacs

|===
| *Module* | *Dependencies* | *Description*
| emacs | ajde, asm, bridge | AspectJ support for Emacs and XEmacs
|===

+ 0
- 221
docs/devguide/ajbrowser.adoc View File

@@ -1,221 +0,0 @@
[[ajbrowser]]
== AspectJ Browser

[[ajbrowser-intro]]
=== Introduction

AJBrowser presents a GUI for compiling programs with ajc and navigating
crosscutting structure.

The AspectJ Browser can edit program source files, compile using the
AspectJ compiler `ajc` run a program, and graphically navigate the
program's crosscutting structure. For more information on `ajc`, see
xref:ajc.adoc[`ajc`, the AspectJ compiler/weaver].

Launch the browser from the command line either by typing "ajbrowser" to
invoke the script in `{aspectj}/bin` (if AspectJ is installed correctly)
or by using the `aspectjtools.jar` directly, and specifying no arguments
or some number of build configuration files (suffix `.lst`):

[source, text]
....
java -jar aspectj1.1/lib/aspectjtools.jar aspectj1.1/doc/examples/spacewar/debug.lst
....

[[ajbrowser-building]]
=== Building Programs

==== Build Configurations

A build configuration is a set of files to compile for a program (and
optionally some additional compile arguments). Because `ajc` requires
all sources to be specified (at least using the `-sourceroots` option),
most users create `.lst` files that list the files to compile (one
argument per line, globbing permitted - for more details, see
xref:ajc.adoc[`ajc`, the AspectJ compiler/weaver]).

To work with a particular program, select the corresponding ".lst" build
configuration file from the GUI using the File menu, "open" item, or by
using the "Open Build Configuration" button
(image:openConfig.gif[image]). You can populate the build list from the
command line by passing any number of ".lst" paths. (However, if you
pass in any non-".lst" arguments, it will run the command-line compiler
directly.)

To switch between build configurations, select, add, or remove them
using the corresponding toolbar buttons.

Global build options are stored in an `.ajbrowser` file in your HOME
directory. Edit these from the GUI by clicking the "Options" button or
selecting the Tools menu item "Options...". This is how to set
classpath, aspectpath, etc.

The following sections walk through a build.

==== Compiling a Program Build Configuration

To compile click the "Build" button (image:build.gif[image]), or or use
the tools menu.

You may select from different build configurations in the GUI (see label
1 in the graphic below). (If you get classpath or other errors, set up
the global build options as described above.)

image:ajbrowser-building.gif[image]

[[ajbrowser-navigating]]
=== Navigating Program Structure

Select nodes in the program structure by clicking them (see label 2). If
one node is related to one or more other nodes by an association the
name of the association will appear below that node and will be
displayed in italics. Links to other structure nodes appear in blue
below the association. If there is no corresponding source for the link
it will appear light-blue.

image:ajbrowser-building.gif[image]

[[example]]
==== Example: Exploring the "Spacewar" sample code

* Launch `ajbrowser`
* Choose "File -> Open" or click the "Open Build Configuration" button
(image:openConfig.gif[image]) and select the configuration file for
debugging the spacewar example, in `examples/spacewar/debug.lst`.
* Click the "Build" button (image:build.gif[image]) to compile. The left
pane should fill with a spacewar declaration tree. If there is a
compiler error, the clickable error message shows up as in label 4.
+
Note: If you did not set up your classpath, the compile will fail with a
message that you need to install aspectjrt.jar on your compile
classpath. To do that, select "Tools -> Options" or click the "Options"
button (image:browseroptions.gif[image]). Click the `Build Options` tab
to view the Build Paths pane. Edit the classpath entry to use your
install location. For example, if you ran from the base Aspectj
directory, the classpath need only include `lib/aspectjrt.jar` (though
the browser may populate the classpath with the bootclasspath and
classpath initially.) Be sure to use the `lib/aspectjrt.jar` that came
with the browser.
+
image:ajbrowser-options.gif[image]
* Different structure views: The structure tree at the left can display
different orderings and granularity for structure:
** The package hierarchy view shows the traditional hierarchy of
package, class, and members.
** The inheritance view shows the hierarchy from topmost parent classes
through subclasses to members.
** The crosscutting view shows the aspect members and the code they
affect.
** Additional buttons in the pane can be used to change the granularity
and filter out items.
+
Whenever you select an item in the tree view, the source pane scrolls to
that item. If you select a leaf item representing another program
element, then the tree selection will go to the corresponding node. (See
below for how to use two panes to maintain your place.)
* When working with aspects, it helps to be able to navigate between
different program elements:
** When looking at a method, find the advice that affects it.
** When looking at a pointcut, find the advice that uses it.
** When looking at advice, find what it advises - e.g., method calls or
executions, initializers, etc.
** When looking at a type, find any aspects that declare members or
supertypes of the type, or vice-versa.
+
You can view the advice on a particular method using the default,
hierarchical view. Navigate to the tree item for
`spacewar.Registry.register(SpaceObject)` in the `debug.lst` config
file. Now, in the lower, file view, you can see and navigate to the
advice using the subtree whose parent is the `method
affected by` relation.
+
You can also use crosscutting view to see the advice using a pointcut or
the methods affected by advice. For example, to see what advice uses a
particular pointcut, navigate to the tree item for the pointcut
`spacewar.Debug.allConstructorsCut()` in the `debug.lst` config file.
You can see and navigate to the advice that uses the pointcut using the
`pointcut used by` relation.
+
As an example of seeing the methods affected by advice, while still in
the same view, select the first `before` advice in `spacewar.Debug`. It
has relation sub-trees for both `uses pointcut` and
`affects constructions`. The `affects` relations will list different
kinds of join points - constructor or method calls, etc.
+
Note that the AspectJ browser can only display static structure (whether
hierarchical or crosscutting). That means that dynamicly-determined
pointcuts (like `cflow(pointcut)`) will not be shown as picking out
static points in source code. Displayable pointcuts roughly correspond
to those that can be used in a `declare error` statement.

[[ajbrowser-running]]
=== Running Programs

The browser supports a limited form of running compiled programs. To run
programs that have been built, click the run button or select one of the
run menu items in the project menu. You can run in the same VM or spawn
a new process; the latter is generally better for GUI programs.

Both require that any classpath you set be specified using
platform-specific paths and path separators (the compiler might be more
tolerant). Output and error streams will be merged into the streams of
the browser (using separate threads, so it may take a few seconds for
the pipe threads to gain control.) Errors should be detected and
displayed in a dialog.

The GUI does not support killing a running program, so if your program
might hang, be sure to save your files since you may need to kill the
browser itself to kill its child processes.

[[ajbrowser-problems]]
=== Isolating problems running the AspectJ browser

If you have problems with the browser not solved by the documentation,
please try to see if you have the same problems when running ajc
directly on the command line.

* If the problem occurs on the command line also, then the problem is
not in the browser. (It may be in the compiler; please send bug
reports.)
* If the problem does not occur on the command line, then it may lie in
the parameters you are supplying in the build options.
* If the build options look correct and the problem only occurs when
building from the browser, then please submit a bug report.

[[ajbrowser-knownProblems]]
==== Known issues with the AspectJ browser

For the most up-to-date information on known problems, see the
https://bugs.eclipse.org/bugs[bug database] for unresolved
https://bugs.eclipse.org/bugs/buglist.cgi?&product=AspectJ&component=Compiler&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED[compiler
bugs] or
https://bugs.eclipse.org/bugs/buglist.cgi?&product=AspectJ&component=IDE&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED[IDE
bugs] .

* Memory and forking: Users email most about the browser task running
out of memory. This is not a problem with the browser; some compiles
take a lot of memory, often more than similar compiles using javac. The
browser does not support forking, so the only solution is to edit the
java command line or script that launches the browser to add memory.
* Editing build configuration files: this is not currently supported.
* The structure model is incomplete after incremental compiles. To get a
complete structure model requires a full build.
* If you change the output directory, you must do a full build.

[[ajbrowser-limitations]]
==== Limitations

* The AJBrowser expects the package and directory structure to match. If
they do not it will be unable to browse to the corresponding file.
* The "Run" feature launches applications in the same VM. As a result,
if a Swing application is disposed the AJBrowser will be disposed as
well.

[[ajbrowser-feedback]]
==== AspectJ Browser questions and bugs

You can send email to aspectj-users@dev.eclipse.org. (Do join the list
to participate!) We also welcome any bug reports, patches, and feature
requests; you can submit them to the bug database at
https://bugs.eclipse.org/bugs using the AspectJ product and IDE
component.

+ 0
- 246
docs/devguide/ajdee.adoc View File

@@ -1,246 +0,0 @@
AJDEE

JDEE support for XEmacs and GNU Emacs

== AJDE for Emacs User's Guide

This guide describes AspectJ-mode extensions of JDEE for GNU Emacs and
XEmacs, which provides enhanced editing and management of AspectJ code
via a minor mode extension of JDE mode. AJDEE's AspectJ support builds
on xref:#aspectj-mode[aspectj-mode's] extension of java-mode, also
provided with the release. Included in this document are guidance for
AJDEE's xref:#ajdee-featuresandusage[use], including an
xref:#exploringspacewar[exploration of spacewar], and
xref:#ajdee-installationetc[installation and compatibility]. See the
README file in AJDEE's distribution directory for release-specific
details.

In addition to the java-mode extensions provided by
xref:#aspectj-mode[aspectj-mode], AJDEE provides (see graphic):

* Viewing and navigation of aspect structures via the the speedbar and
Classes menu.
* Basic support for completion.
* Integrated Javadoc support.

image:ajdee.gif[image]

[[ajdee-featuresandusage]]
== AJDEE Features and Usage

The AJDEE extensions of JDE require no special effort to use. The
speedbar and Classes menus provide additional sublists showing
crosscutting structure. Selecting items in those lists navigates to the
referenced item.

=== Aspect Structure and Navigation

==== Enhancements to Speedbar in JDE Mode

As a minor mode of JDE mode, AJDEE enhances the speedbar to show the
location of aspect, advice, and inter-type declarations. The
affects/affected-by relationships are shown in the speedbar rather than
embedding tags in the text (available as an option), and selecting the
items in the speedbar will perform the expected navigation. The speedbar
symbols have been extended for AspectJ as follows (see right side of
xref:#ajdeemacsscreenshot[figure)]:

.Enhancements to Speedbar in JDE Mode
[cols=",",options="header",]
|===
|Indication |Meaning
|`(+) ` _`name`_ |A class, interface, or aspect; double mouse-1 will
display its declarations
|`+ ` _`methodSignature`_ |Method has an advice that applies to it;
double mouse-1 will display the relevant advice.
|`+ ` _`adviceSignature`_ |Advice declared by the containing aspect;
double mouse-1 will display affected methods.
|`+ ` _`introductionSig`_ |Inter-type declaration declared by the
containing class; double mouse-1 will display affected methods or
classes.
|`| | ` _`methodOrFieldSig`_ |Method or field has been declared by an
aspect; double mouse-1 on text will navigate to the declaration; a +
within the bars means that it has an advice that applies to it.
|===

A minus (`-`) is displayed on the item when the crosscutting items are
displayed. AspectJ structure information is derived from the last
compile of your AspectJ program.

=== Compilation and JavaDoc

The option `AspectJ Compile File Specification` can be customized from
the Customize options under the AspectJ menu, changing the default
compile specification given to `ajc`. See
xref:#ajdee-installationetc[installation instructions] for examples and
other customizations.

AspectJ JavaDoc support is enabled by setting `Jde Javadoc Command Path`
to invoke `ajdoc`. These are the default settings provided in the
installation instructions.

[[exploringspacewar]]
== Exploring the Spacewar Source Code

To begin exploring Spacewar within emacs using JDE and AspectJ mode:

* Compile spacewar.
* Change into the `spacewar` directory.
* Type `emacs Ship.java`.
* Pull down the JDE menu and select the Speedbar entry to show the
AspectJ files in the directory. Note that `Ship.java` is shown in red to
denote that it is currently shown in the main buffer.
* Double-click with the left mouse button on the `+` in front of the
`Ship.java` entry. It should display an entry for the class `Ship`.
* Double-clicking on Ship will navigate to its declaration in the
buffer. Note that declarations of advice are annotated to note the types
of objects that they advise, declarations of methods that are advised
are annotated with the aspects that advise them, and so forth.
* Double-clicking on the `+` in front of either will show the declared
fields, methods, inter-type declarations, and advice. A `+` in front of
any field or method means that it is introduced or advised;
double-clicking will list entries for the introducers/advisers;
double-clicking on them will navigate to their declarations. A `+` in
front of any inter-type declarations or advice will will display its
targets.

[[ajdee-installationetc]]
== Installation and Compatibility

AJDEE requires the installation of http://sunsite.auc.dk/jde[JDE
2.2.9beta4] or higher and small edits to your `.emacs` file to configure
AJDEE and enable autoloading AJDEE when a `.java` file is loaded.

=== Installation for enhancement of JDE mode

The first and last steps, with enhancements, can be found in the example
Emacs initialization file `sample.emacs` and the sample JDE project file
`sample.prj` in the distribution. The latter also demonstrates a way to
enable AspectJ mode on a per-project basis.

[arabic]
. Make sure AJDEE, aspectj-mode, JDE, and supporting packages are on
your `load-path` and are ``required''. This is an example for the 1.0
release:
+
[source, text]
....
;; I keep my emacs packages in C:/Emacs
(setq load-path
(append
'(
"C:/Emacs/aspectj-emacsMode-1.0" ; for AJDEE
"C:/Emacs/aspectj-emacsAJDEE-1.0"
"C:/Emacs/jde-2.2.9beta6/lisp"
"C:/Emacs/elib-1.0" ; for JDEE
"C:/Emacs/speedbar-0.14beta2" ; for JDEE
"C:/Emacs/semantic-1.4beta12" ; for JDEE/speedbar
"C:/Emacs/eieio-0.17beta3" ; for JDEE
)
load-path))

(require 'jde)
(require 'ajdee) ; can also appear in prj.el
....
. _[Optional]_ add `-emacssym` switch to the `ajc` and `ajc.bat` files
in your AspectJ tools installations (in the `/bin` directory). If you
invoke the compiler outside Emacs, this will ensure that your compiles
always generate information for annotations and the jump menu in the
form of `.ajesym` files.
. Customize AJDEE's compile options by putting a version of the
following in your `.emacs` file or in a JDE project file `prj.el` in
your project's hierarchy (see the `JDE Project File Name` option for the
latter). Here is a simple example:
+
[source, text]
....
;; A default version for simple projects, maybe good for
;;; .emacs file.
(custom-set-variables
'(jde-compiler '("ajc" "ajc"))
'(jde-javadoc-command-path "ajdoc")

;; ajc requires all files to be named for a compile
'(aspectj-compile-file-specification "*.java"))
....
+
Here is an example for spacewar, in `examples/spacewar`.
+
[source, text]
....
;;; These options are for the spacewar, in examples/spacewar.
(custom-set-variables
'(jde-compiler '("ajc" "ajc"))
'(jde-javadoc-command-path "ajdoc")

;; ajc provides an ``argfile'' mechanism for specifying all files.
'(aspectj-compile-file-specification "-argfile demo.lst")

;; *if* compiling packages, name root dir for package hierarchy
;; to tell ajc where .class files should go.
'(jde-compile-option-directory "..")
'(jde-run-working-directory ".."))
'(jde-run-application-class "spacewar.Game")
....
. _[XEmacs only]_ If you're installing JDE yourself, be sure to closely
follow the JDE installation directions for XEmacs, otherwise you may get
out of date JDE `.jar` files.

=== Customizing Options

Selecting Customize options from the AspectJ menu displays a number of
options that customize AspectJ mode. These control whether annotations
are shown by default, and whether the bovinator set up by JDE runs.
`AspectJ Compile File Specification`, specifies a compilation argument
as an alternative to the current buffer's file or the run class's file.
Example customizations are shown above and in the sample files discussed
above.

== Usage and Upgrade Problems

Please see the documentation for

aspectj-mode

for problems not specific to AJDEE's features.

* _Symptom_: Get standard speedbar menus in JDE; no annotations display.
Message:
+
[source, text]
....
AspectJ Mode Warning: Can't find declarations file for...
....
+
AspectJ file has not been compiled with ajc and the `-emacssym` flag, or
was compiled with an obsolete version of ajc. After compilation, there
should be a <file>.ajesym for every <file>.java in the build. If .ajsym
files are present but error persists, recompile. Note that aspectj-mode
for JDE has a fallback view for uncompiled files.
* _Symptom_: Navigations via the speedbar and the jump menu are off,
annotations are misplaced in the code.
+
AspectJ mode operates by querying data derived from the most recent
compile that includes the `-emacssym` flag. Recompile the entire program
with ajc including the switch. Consider permanently installing the
switch by editing the ajc and ajc.bat files in the /bin file in your
distribution.
* _Symptom_: Java files that are part of a Java project not written in
AspectJ come up in aspectj-mode.
+
Emacs uses the file suffix (.java) to determine which mode to invoke.
You can either globally toggle the AspectJ features from the AspectJ
menu, or you can prevent AJDEE from coming up by moving the (require
'ajdee) expression from your .emacs file to a prj.el file in each
AspectJ project's directory (see sample.prj in the distribution).
* _Symptom_: Reported bug fixes and new features to AJDEE are not seen,
or ajdee.el cannot be found or loaded, with message:
+
[source, text]
....
Error in init file: File error: "Cannot open load file", "ajdee"
....
+
Your load-path variable (set in your .emacs) is referring to an old
release. Change your load-path to point at the directory for the current
release. See the sample.emacs files in the distribution, for example.

BIN
docs/devguide/ajdee.gif View File


+ 0
- 455
docs/devguide/ajdee.xml View File

@@ -1,455 +0,0 @@
<refentry id="ajdee">
<refnamediv>
<refname>AJDEE</refname>
<refpurpose>JDEE support for XEmacs and GNU Emacs </refpurpose>
</refnamediv>

<refsect1>
<title>AJDE for Emacs User's Guide</title>
<para>
This guide describes AspectJ-mode extensions of JDEE for GNU Emacs and
XEmacs, which
provides enhanced editing and management of AspectJ code via a minor
mode extension of JDE mode. AJDEE's AspectJ support builds on
<link linkend="aspectj-mode">aspectj-mode's</link> extension of
java-mode, also provided with the release.
Included in this document are guidance for AJDEE's <link
linkend="ajdee-featuresandusage">use</link>, including an <link
linkend="exploringspacewar">exploration of spacewar</link>, and <link
linkend="ajdee-installationetc">installation and compatibility</link>. See
the README file in AJDEE's distribution directory for
release-specific details.
</para>

<para>
In addition to the java-mode extensions provided by
<link linkend="aspectj-mode">aspectj-mode</link>, AJDEE provides
(see graphic):
<itemizedlist>
<listitem>
<para>
Viewing and navigation of aspect structures via the
the speedbar and Classes menu.
</para>
</listitem>

<listitem>
<para>
Basic support for completion.
</para>
</listitem>

<listitem>
<para>
Integrated Javadoc support.
</para>
</listitem>

</itemizedlist>
</para>

<para>
<inlinemediaobject id="ajdeemacsscreenshot">
<imageobject>
<imagedata fileref="ajdee.gif"/>
</imageobject>
</inlinemediaobject>
</para>
</refsect1>

<refsect1 id="ajdee-featuresandusage"><!-- Features and Usage -->
<title>AJDEE Features and Usage</title>
<para>
The AJDEE extensions of JDE require no special effort to use.
The speedbar and Classes menus provide additional sublists showing
crosscutting structure. Selecting items in those lists navigates to
the referenced item.
</para>

<refsect2>
<title>Aspect Structure and Navigation</title>

<refsect3>
<title>Enhancements to Speedbar in JDE Mode</title>
<para>
As a minor mode of JDE mode, AJDEE enhances the speedbar to
show the location of aspect, advice, and inter-type declarations.
The affects/affected-by relationships are shown in the speedbar
rather than embedding tags in the text (available as an option),
and selecting the items in the speedbar will perform the expected
navigation. The speedbar symbols have been extended for AspectJ as
follows (see right side of <link
linkend="ajdeemacsscreenshot">figure)</link>:
</para>

<table id="speedbarenhancements">
<title>Enhancements to Speedbar in JDE Mode</title>
<tgroup cols="2" colsep="1" rowsep="1" align="left">
<thead>
<row>
<entry>Indication</entry>
<entry>Meaning</entry>
</row>
</thead>

<tbody>
<row>
<entry>
<literal>(+) </literal>
<emphasis><literal>name</literal></emphasis>
</entry>
<entry>
A class, interface, or aspect; double mouse-1 will
display its declarations
</entry>
</row>

<row>
<entry><literal>+ </literal>
<emphasis><literal>methodSignature</literal></emphasis>
</entry>
<entry>
Method has an advice that applies to it; double mouse-1
will display the relevant advice.
</entry>
</row>

<row>
<entry><literal>+ </literal>
<emphasis><literal>adviceSignature</literal></emphasis>
</entry>
<entry>
Advice declared by the containing aspect; double mouse-1
will display affected methods.
</entry>
</row>

<row>
<entry><literal>+ </literal>
<emphasis><literal>introductionSig</literal></emphasis>
</entry>
<entry>
Inter-type declaration declared by the containing class; double
mouse-1 will display affected methods or classes.
</entry>
</row>

<row>
<entry><literal>| | </literal>
<emphasis><literal>methodOrFieldSig</literal></emphasis>
</entry>
<entry>
Method or field has been declared by an aspect;
double mouse-1 on text will navigate to the declaration; a +
within the bars means that it has an advice that applies
to it.
</entry>
</row>
</tbody>
</tgroup>
</table>

<para>
A minus (<literal>-</literal>) is displayed on the item when the
crosscutting items are displayed. AspectJ structure information is
derived from the last compile of your AspectJ program.
</para>
</refsect3>
</refsect2>

<refsect2>
<title>Compilation and JavaDoc</title>

<para>
The option <option>AspectJ Compile File Specification</option>
can be customized from the <guisubmenu>Customize options</guisubmenu>
under the <guimenu>AspectJ</guimenu> menu, changing the default
compile specification given to <command>ajc</command>.
See <link linkend="ajdee-installationetc">installation instructions</link>
for examples and other customizations.
</para>

<para>
AspectJ JavaDoc support is
enabled by setting <option>Jde Javadoc Command Path</option> to
invoke <command>ajdoc</command>. These are the default settings
provided in the installation instructions.
</para>
</refsect2>

</refsect1>

<refsect1 id="exploringspacewar"><!-- Exploring the Spacewar Source Code -->
<title>Exploring the Spacewar Source Code</title>
<para>
To begin exploring Spacewar within emacs using JDE and AspectJ mode:
</para>
<itemizedlist>
<listitem>
<para>Compile spacewar.</para>
</listitem>

<listitem>
<para>Change into the <filename>spacewar</filename>
directory.</para>
</listitem>

<listitem>
<para>Type <userinput>emacs Ship.java</userinput>.</para>
</listitem>

<listitem>
<para>
Pull down the <guimenu>JDE</guimenu> menu and select the
<guimenuitem>Speedbar</guimenuitem> entry to show the AspectJ
files in the directory. Note that <filename>Ship.java</filename>
is shown in red to denote that it is currently shown in the main
buffer.
</para>
</listitem>

<listitem>
<para>
Double-click with the left mouse button on the
<literal>+</literal> in front of the
<filename>Ship.java</filename> entry. It should display an entry
for the class <classname>Ship</classname>.
</para>
</listitem>

<listitem>
<para>
Double-clicking on Ship will navigate to its declaration in
the buffer. Note that declarations of advice are annotated to
note the types of objects that they advise, declarations of
methods that are advised are annotated with the aspects that
advise them, and so forth.
</para>
</listitem>

<listitem>
<para>
Double-clicking on the <literal>+</literal> in front of either
will show the declared fields, methods, inter-type declarations, and
advice. A <literal>+</literal> in front of any field or method
means that it is introduced or advised; double-clicking will list
entries for the introducers/advisers; double-clicking on them
will navigate to their declarations. A <literal>+</literal> in
front of any inter-type declarations or advice will will display its
targets.
</para>
</listitem>

</itemizedlist>
</refsect1>

<refsect1 id="ajdee-installationetc"><!-- Installation and Compatibility -->
<title>Installation and Compatibility</title>

<para> AJDEE requires the installation of
<ulink url="http://sunsite.auc.dk/jde">JDE 2.2.9beta4</ulink> or
higher and small edits to your <filename>.emacs</filename> file to
configure AJDEE and enable autoloading AJDEE when a
<filename>.java</filename> file is loaded.
</para>

<refsect2>
<title>Installation for enhancement of JDE mode</title>

<!-- <note> -->
<para>
The first and last steps, with enhancements, can be found in the
example Emacs initialization file
<filename>sample.emacs</filename> and the sample JDE project
file <filename>sample.prj</filename> in the distribution. The
latter also demonstrates a way to enable AspectJ mode on a
per-project basis.
</para>
<!-- </note> -->

<orderedlist>
<listitem>
<para>
Make sure AJDEE, aspectj-mode, JDE, and supporting packages are on
your <literal>load-path</literal> and are ``required''. This is an
example for the 1.0 release:
<programlisting>
;; I keep my emacs packages in C:/Emacs
(setq load-path
(append
'(
"C:/Emacs/aspectj-emacsMode-1.0" ; for AJDEE
"C:/Emacs/aspectj-emacsAJDEE-1.0"
"C:/Emacs/jde-2.2.9beta6/lisp"
"C:/Emacs/elib-1.0" ; for JDEE
"C:/Emacs/speedbar-0.14beta2" ; for JDEE
"C:/Emacs/semantic-1.4beta12" ; for JDEE/speedbar
"C:/Emacs/eieio-0.17beta3" ; for JDEE
)
load-path))

(require 'jde)
(require 'ajdee) ; can also appear in prj.el
</programlisting>
</para>
</listitem>

<listitem>
<para>
<emphasis>[Optional]</emphasis> add <literal>-emacssym</literal>
switch to the <filename>ajc</filename> and <filename>ajc.bat</filename>
files in your AspectJ tools installations (in the
<filename>/bin</filename> directory). If you invoke the compiler
outside Emacs, this will
ensure that your compiles always generate information for annotations
and the jump menu in the form of <literal>.ajesym</literal> files.
</para>
</listitem>

<listitem>
<para>
Customize AJDEE's compile options by
putting a version of the following in your
<filename>.emacs</filename> file or in a JDE project file
<filename>prj.el</filename> in your project's hierarchy (see the
<option>JDE Project File Name</option> option for the latter).
Here is a simple example:

<programlisting>
;; A default version for simple projects, maybe good for
;;; .emacs file.
(custom-set-variables
'(jde-compiler '("ajc" "ajc"))
'(jde-javadoc-command-path "ajdoc")

;; ajc requires all files to be named for a compile
'(aspectj-compile-file-specification "*.java"))
</programlisting>

Here is an example for spacewar, in
<filename>examples/spacewar</filename>.
<programlisting>
;;; These options are for the spacewar, in examples/spacewar.
(custom-set-variables
'(jde-compiler '("ajc" "ajc"))
'(jde-javadoc-command-path "ajdoc")

;; ajc provides an ``argfile'' mechanism for specifying all files.
'(aspectj-compile-file-specification "-argfile demo.lst")

;; *if* compiling packages, name root dir for package hierarchy
;; to tell ajc where .class files should go.
'(jde-compile-option-directory "..")
'(jde-run-working-directory ".."))
'(jde-run-application-class "spacewar.Game")
</programlisting>
</para>
</listitem>
<listitem>
<para>
<emphasis>[XEmacs only]</emphasis> If you're installing JDE
yourself, be sure to closely follow the JDE installation
directions for XEmacs, otherwise you may get out of date JDE
<filename>.jar</filename> files.
</para>
</listitem>
</orderedlist>

</refsect2>

<refsect2>
<title>Customizing Options</title>
<para>
Selecting <guimenuitem>Customize options</guimenuitem> from the
<guimenu>AspectJ</guimenu> menu displays a number of options that
customize AspectJ mode. These control whether annotations are shown
by default, and whether the bovinator set up by JDE runs.
<option>AspectJ Compile File Specification</option>, specifies a
compilation argument as
an alternative to the current buffer's file or the run class's file.
Example customizations are shown above and in the sample files
discussed above.
</para>
</refsect2>

</refsect1>


<refsect1>
<title>Usage and Upgrade Problems</title>

Please see the documentation for
<link linkend="aspectj-mode">aspectj-mode</link> for problems not
specific to AJDEE's features.

<itemizedlist>

<listitem>
<para><emphasis>Symptom</emphasis>: Get
standard speedbar menus in JDE; no annotations display. Message:

<screen>
AspectJ Mode Warning: Can't find declarations file for...
</screen>

</para>

<para>AspectJ file has not been compiled with ajc and the <literal>-emacssym</literal>
flag,
or was compiled with an obsolete version of ajc. After compilation,
there should be a &lt;file&gt;.ajesym for every &lt;file&gt;.java in the
build. If .ajsym files are present but error persists, recompile. Note
that aspectj-mode for JDE has a fallback view for uncompiled files.
</para>
</listitem>

<listitem>
<para><emphasis>Symptom</emphasis>: Navigations via the speedbar and
the jump menu are off, annotations are misplaced in the code. </para>

<para>AspectJ mode operates by querying data
derived from the most recent compile that includes the
<literal>-emacssym</literal> flag. Recompile the entire program with
ajc including the switch. Consider permanently installing the switch
by editing the ajc and ajc.bat files in the /bin file in your
distribution.</para>
</listitem>

<listitem>
<para><emphasis>Symptom</emphasis>: Java files that are part of a Java project not written
in AspectJ come up in aspectj-mode. </para>

<para>Emacs uses the file suffix (.java) to
determine which mode to invoke. You can either globally toggle the
AspectJ features from the AspectJ menu, or you can prevent AJDEE
from coming up by moving the (require 'ajdee) expression from
your .emacs file to a prj.el file in each AspectJ project's directory
(see sample.prj in the distribution).
</para>
</listitem>

<listitem>
<para><emphasis>Symptom</emphasis>: Reported bug fixes and new features
to AJDEE are not seen, or ajdee.el cannot be found or loaded, with
message:

<screen>
Error in init file: File error: "Cannot open load file", "ajdee"
</screen>

</para>
<para>Your load-path variable (set in your .emacs)
is referring to an old release. Change your load-path to
point at the directory for the current release. See the sample.emacs
files in the distribution, for example.</para>
</listitem>
</itemizedlist>
</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: -->

+ 0
- 100
docs/devguide/ajdeforte.adoc View File

@@ -1,100 +0,0 @@
AspectJ Development Environment (AJDE) support for Forte

Module extension to Sun's

Forte for Java

and

NetBeans

IDEs.

== Overview

For release-specific documentation refer to the
http://aspectj.org/doc/dist/changes.html[changes file].

AJDE for Forte will allow you to:

* compile AspectJ and Java files within the IDE
* browse the structure of your AspectJ program
* set up a compile configuration that determine which files will be
passed to the compiler

== Installation

* 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".
* start up, and in the "Tools" menu select "Global Options"
* right-click the "Modules" item and select "New Module from File..."
* find the ajdeForForte.jar in the directory that you installed into
(e.g. c:/forte4j/modules) and select it

To uninstall follow Forte's documentation on un-installing modules, or
simply remove the file modules/aspectjForForte.jar from Forte's install
directory.

== Running AJDE for Forte

*3.1 Setting up the AspectJ Examples (in NetBeans 3.3.1)*

* in the "Project" menu select "Project Manager"
* Click "New..." and enter "AspectJ Examples" as the projects' name and
click "OK".
* In the "Filesystems" Explorer tab right click "Filesystems", then
select "Mount -> Local Directory".
* browse into the AspectJ install directory (e.g. "C:/apps/aspectj1.0")
* select "examples" and click "Finish"
* In the "Tools" menu select "AspectJ -> Start AJDE" or just click on
the "AJDE" (image:startAjde.gif[image]) button (shown as label 1 of the
screenshot).

*3.2 Compiling the Spacewar Example*

* 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 (image:build.gif[image]) 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.
* 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.
* If there are compilation errors, clickable messages will appear (as in
label 4 of the screenshot).

*3.3 Running the Spacewar Example*

* In the "Filesystems" Explorer tab open the "spacewar" directory, right
click "spacewar/Game.java", and the select "Execute".
* When finished executing switch back to the "Editing" mode.
* 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.

3.4 Debugging the Spacewar Example

* 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...".
* 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)".
* Browse to the your lib/ext/aspectjrt.jar file within your NetBeans
install directory and click "Finish".
* 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".
* In the "Filesystems" Explorer tab open the "spacewar" directory, click
"Game.java", and the select "Debug -> Strat" from the menu bar.

AspectJ-related options can be modified in the AJDE settings window.

+ 0
- 215
docs/devguide/ajdeforte.xml View File

@@ -1,215 +0,0 @@
<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 -&gt; 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 -&gt; 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 -&gt; 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 -&gt; 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
-&gt; 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: -->

+ 0
- 147
docs/devguide/ajdejbuilder.adoc View File

@@ -1,148 +0,0 @@
r

AspectJ Development Environment (AJDE) support for JBuilder

OpenTool extension Borland's

JBuilder IDE

.

== Overview

For release-specific documentation refer to the
http://aspectj.org/doc/dist/changes.html[changes file].

AJDE for JBuilder will allow you to:

* compile AspectJ and Java files within the IDE
* browse the structure of your AspectJ program
* set up a compile configuration that determine which files will be
passed to the compiler

== Installation and Project Setup

`Install procedure:` use the installer to place the
"ajdeForJBuilder.jar" and "aspectjrt.jar" into JBuilder's lib/ext
directory. This will also install the two html files
"LICENCE-AJDEJBUILDER.html" and "README-AJDEJBUILDER.html".

`Uninstall procedure:` remove "ajdeForJBuilder.jar" and "aspectjrt.jar"
(and the two html files, if you like) from the "lib/ext" directory.

`Project setup:` follow the normal procedure for JBuilder project setup
(for an example of this please refer to the example below). However,
note that all of the source files to be passed to the compiler must be
added to your project either as files or within a package that is added
to the project. This is necessary because -- unlike a pure Java compiler

`Starting and stopping AJDE:` select "Start AJDE" in the "AspectJ"
section of the "Tools" menu, or just click on the "AJDE"
(image:startAjde.gif[image]) button (label 1 in the first screenshot).
This will enable AJDE commands and will replace JBuilder's structure
view with the AspectJ Browser. To disable AJDE select "Stop AJDE" in the
same menu, or click the "AJDE" button again.

== Compiling and Running the Project

To compile the project select "Build project with ajc" from the AspectJ
toolbar, or click <ctrl>F11 while the editor pane is active. All of the
files contained in your project and within any packages and subpackages
that have been added to your project will be compiled. You may also
select a different configuration (as with label 2 in the first
screenshot). Then, structure of the currently visited file is shown (see
label 3 in the first scrrenshot). If there is a compile error, the
clickable error message is available (as with label 4 in the first
screenshot).

To run the project select "Run Project" from the AspectJ toolbar, or
click <ctrl>F12 while the editor pane is active. Note that the "AspectJ
Runtime" library must be added to your project in order to run. If the
library is not added you will see a "java.lang.NoClassDefFoundError:
org/aspectj/lang/Signature" error. The library is created automatically
for you from the runtime in "jbuilderdir/lib/ext". You can also create a
new library to use the runtime from a different location. If you have
not added the library to the "Required Libraries" of your project it
will be added automatically when you restart JBuilder.

JBuilder7 users please note: when you set up a run/debug configuration
you must select the "Build Target" (at the bottom of the "Runtime
Properties" dialog) to be "<None>". This will ensure that the Java
compiler is not invoked on your AspectJ sources before running or
debugging the project.

== Navigating the Program Structure

Navigation of program structure is provided by the xref:ajbrowser.adoc#ajbrowser[AspectJ Browser],
so apart from a JBuilder look and feel, the extra navigation AspectJ
allows work as described there. In particular, you can use views with
labels 1, 2 and 4 of the second screenshot to navigate structure using
the blue links, and you can set filtering and navigate history using the
toolbar shown by label 3 of the second screenshot.

== Manipulating Build Configurations

Build configurations can be manipulated adding, removing, and editing
build configuration files. The xref:ajbrowser.adoc#ajbrowser[AspectJ Browser] is used to select
the current build configuration. Configurations are represented by
".lst" files which are described in the xref:ajc.adoc[`ajc`, the AspectJ compiler/weaver] documentation.

=== Adding and Removing Build Configurations

By default all of the files contained in your project and within any
packages and subpackages that have been added to your project will be
compiled. In order to compile a different configuration first add it to
the project (by selecting "Add Files / Packages..." in the "Project"
menu, and selecting the desired build configuration file (see label 1 in
the third screenshot).

=== Editing Build Configurations

Double click a build configuration file in JBuilder's "Project Pane" in
order to edit it. Configurations can be edited as either text or in the
graphical designer (see labels 2 and 3 in the third screenshot)

== Example: Setting up the "Spacewar" Sample Project

To set up the Spacewar example first download it the
http://aspectj.org/dl[examples distribution]. Then

[arabic]
. launch JBuilder
. in the "File" menu select "New project"
. Select the location of the "aspectj/examples" directory for the
project. This is because the Spacewar example uses both the "spacewar"
and "coordination" packages, so we set up the project where it can get
at both packages.
. Choose a "jpr" project, either by typing in "Spacewar.jpr" as the
project name, or by typing "Spacewar" as the project name and "jpr" as
the type. Make sure "aspectj/examples" is still the directory for the
project.
. click "Finish"
. in the "Project" menu select "Project properties..."
. set the "Output path" entry to be the directory where you want your
classes to go
. set the "Output path" entry to be the directory where you want your
classes to go
. add "aspectjrt.jar" as a required library for the project. This
library is located in "<jbuilder-install-directory>/lib/ext".
. in the "Source" tab select the entry and click "Edit" (by default
JBuilder will set this directory to be "examples/src" which does not
exist)
. Select the "examples" directory for the Souce.
. click "OK" to close the "Project Properties"dialog
. in the leftmost pane you will notice "Spacewar.jpr", right click this
and select "Add to project" in the popup, then "Add class/package..." in
thenext popup. Or directly choose "Add files/packages".
. <ctrl> select the "spacewar" and "coordination" packages and then
click "OK"; this will add the two packages to your project
. click the "Build Project" button (image:jbuilder-build.gif[image]) to
compile the project
. open the Structure View to browse the structure of the program
. click the "Run Project" button to play Spacewar (make sure that you
have set up the runtime library as described above)
. if you have not selected a class to run, you will be prompted to do
so: select the class "spacewar.Game".
. AspectJ related build options can be manipulated in the "AJDE
settings" window

+ 0
- 268
docs/devguide/ajdejbuilder.xml View File

@@ -1,268 +0,0 @@
r<refentry>
<refnamediv>
<refname>
AspectJ Development Environment (AJDE) support for JBuilder
</refname>
<refpurpose>
OpenTool extension Borland's <ulink url="http://www.borland.com/jbuilder">JBuilder IDE</ulink>.
</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 JBuilder 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 and Project Setup</title>
<para>
<command>Install procedure:</command> use the installer to place the
"ajdeForJBuilder.jar" and "aspectjrt.jar" into JBuilder's lib/ext
directory. This will also install the two html files
"LICENCE-AJDEJBUILDER.html" and "README-AJDEJBUILDER.html".
</para>
<para>
<command>Uninstall procedure:</command> remove "ajdeForJBuilder.jar"
and "aspectjrt.jar" (and the two html files, if you like) from the
"lib/ext" directory.
</para>
<para>
<command>Project setup:</command> follow the normal procedure for
JBuilder project setup (for an example of this please refer to the
example below). However, note that all of the source files to be
passed to the compiler must be added to your project either as files or
within a package that is added to the project. This is necessary
because -- unlike a pure Java compiler -- ajc does not search the
SOURCEPATH for classes.
</para>
<imageobject>
<imagedata fileref="jbuilder-building.gif" />
</imageobject>
<para>
<command>Starting and stopping AJDE:</command> select "Start AJDE" in
the "AspectJ" section of the "Tools" menu, or just click on the "AJDE"
(<inlinemediaobject id="ajdebutton">
<imageobject>
<imagedata fileref="startAjde.gif" />
</imageobject>
</inlinemediaobject>) button (label 1 in the first screenshot). This
will enable AJDE commands and will replace JBuilder's structure view
with the AspectJ Browser. To disable AJDE select "Stop AJDE" in the
same menu, or click the "AJDE" button again.
</para>
</refsect1>
<refsect1>
<title>Compiling and Running the Project</title>
<para>
To compile the project select "Build project with ajc" from the AspectJ
toolbar, or click &lt;ctrl&gt;F11 while the editor pane is active. All
of the files contained in your project and within any packages and
subpackages that have been added to your project will be compiled. You
may also select a different configuration (as with label 2 in the first
screenshot). Then, structure of the currently visited file is shown
(see label 3 in the first scrrenshot). If there is a compile error,
the clickable error message is available (as with label 4 in the first
screenshot).
</para>
<para>
To run the project select "Run Project" from the AspectJ toolbar, or
click &lt;ctrl&gt;F12 while the editor pane is active. Note that the
"AspectJ Runtime" library must be added to your project in order to
run. If the library is not added you will see a
"java.lang.NoClassDefFoundError: org/aspectj/lang/Signature" error.
The library is created automatically for you from the runtime
in "jbuilderdir/lib/ext". You can also create a new library
to use the runtime from a different location. If you have not added the
library to the "Required Libraries" of your project it will be added
automatically when you restart JBuilder.
</para>
<para>
JBuilder7 users please note: when you set up a run/debug configuration
you must select the "Build Target" (at the bottom of the
"Runtime Properties" dialog) to be "&lt;None&gt;". This will ensure
that the Java compiler is not invoked on your AspectJ sources
before running or debugging the project.
</para>
</refsect1>
<refsect1>
<title>Navigating the Program Structure</title>
<imageobject>
<imagedata fileref="jbuilder-structureNavigation.gif" />
</imageobject>
<para>
Navigation of program structure is provided by the AspectJ Browser, so apart from a JBuilder
look and feel, the extra navigation AspectJ allows work as described
there. In particular, you can use views with labels 1, 2 and 4 of the
second screenshot to navigate structure using the blue links, and you
can set filtering and navigate history using the toolbar shown by label
3 of the second screenshot.
</para>
</refsect1>
<refsect1>
<title>Manipulating Build Configurations</title>
<para>
Build configurations can be manipulated adding, removing, and
editing build configuration files. The AspectJ Browser is used to select the
current build configuration. Configurations are represented by
".lst" files which are described in the <xref linkend="ajc">ajc</xref> documentation.
</para>
<imageobject>
<imagedata fileref="jbuilder-configs.gif" />
</imageobject>
<refsect2>
<title>Adding and Removing Build Configurations</title>
<para>
By default all of the files contained in your project and
within any packages and subpackages that have been added to
your project will be compiled. In order to compile a different
configuration first add it to the project (by selecting
"Add Files / Packages..." in the "Project"
menu, and selecting the desired build configuration file (see
label 1 in the third screenshot).
</para>
</refsect2>
<refsect2>
<title>Editing Build Configurations</title>
<para>
Double click a build configuration file in JBuilder's
"Project Pane" in order to edit it. Configurations
can be edited as either text or in the graphical designer (see
labels 2 and 3 in the third screenshot)
</para>
</refsect2>
</refsect1>
<refsect1>
<title>Example: Setting up the "Spacewar" Sample Project</title>
<para>
To set up the Spacewar example first download it the <ulink url="http://aspectj.org/dl">examples distribution</ulink>. Then

<orderedlist>
<listitem>
<para>launch JBuilder</para>
</listitem>
<listitem>
<para>in the "File" menu select "New
project"</para>
</listitem>
<listitem>
<para>Select the location of the "aspectj/examples"
directory for the project. This is because the Spacewar
example uses both the "spacewar" and "coordination"
packages, so we set up the project where it can get at both
packages.
</para>
</listitem>
<listitem>
<para>
Choose a "jpr" project, either by typing in "Spacewar.jpr"
as the project name, or by typing "Spacewar" as the project
name and "jpr" as the type. Make sure "aspectj/examples"
is still the directory for the project. </para>
</listitem>
<listitem>
<para>click "Finish"</para>
</listitem>
<listitem>
<para>in the "Project" menu select "Project
properties..."</para>
</listitem>
<listitem>
<para>set the "Output path" entry to be the directory
where you want your classes to go</para>
</listitem>
<listitem>
<para>set the "Output path" entry to be the directory
where you want your classes to go</para>
</listitem>
<listitem>
<para>add "aspectjrt.jar" as a required library for
the project. This library is located in
"&lt;jbuilder-install-directory&gt;/lib/ext".
</para>
</listitem>
<listitem>
<para>
in the "Source" tab select the entry and click
"Edit" (by default JBuilder will set this directory to be
"examples/src" which does not exist)</para>
</listitem>
<listitem>
<para>
Select the "examples" directory for the
Souce. </para>
</listitem>
<listitem>
<para>click "OK" to close the "Project
Properties"dialog</para>
</listitem>
<listitem>
<para>in the leftmost pane you will notice
"Spacewar.jpr", right click this and select "Add to
project" in the popup, then "Add class/package..." in
thenext popup. Or directly choose "Add
files/packages". </para>
</listitem>
<listitem>
<para>&lt;cntrl&gt; select the "spacewar" and
"coordination" packages and then click "OK"; this will add
the two packages to your project</para>
</listitem>
<listitem>
<para>click the "Build Project" button
(<inlinemediaobject>
<imageobject>
<imagedata fileref="jbuilder-build.gif" />
</imageobject>
</inlinemediaobject>)
to compile the project</para>
</listitem>
<listitem>
<para>open the Structure View to browse the structure
of the program</para>
</listitem>
<listitem>
<para>click the "Run Project" button to play
Spacewar (make sure that you have set up the runtime
library as described above)</para>
</listitem>
<listitem>
<para>if you have not selected a class to run, you
will be prompted to do so: select the class
"spacewar.Game". </para>
</listitem>
<listitem>
<para>AspectJ related build options can be
manipulated in the "AJDE settings" window
</para>
<imageobject>
<imagedata fileref="jbuilder-buildOptions.gif" />
</imageobject>
</listitem>
</orderedlist>
</para>
</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: -->

+ 0
- 181
docs/devguide/aspectj-mode.adoc View File

@@ -1,181 +0,0 @@
AspectJ-mode

support for XEmacs and GNU Emacs

== AspectJ-mode User's Guide

This guide describes aspectj-mode for GNU Emacs and XEmacs, which
provides enhanced editing and management of AspectJ code via a minor
mode extension of java-mode. Included in this document are guidance for
aspectj-mode's xref:#ajmode-featuresandusage[use], and
xref:#ajmode-installationetc[installation and compatibility]. See the
README file in the aspectj-mode's distribution directory for
release-specific details.

AspectJ minor mode provides (see graphic):

* Viewing and navigation of aspect structures, permitting navigation
between aspect code and the code that it affects, via a `jump' menu (and
in the speedbar and Classes menu for JDE users).
* Source code annotation of inter-type and advice declarations, as well
as the code they affect.
* AspectJ-style compilation, using .lst files to generate a compilation
submenu.
* Highlighting of AspectJ keywords and declaration names.

The first two are derived from ajc's last build of the AspectJ program.
An example usage is given below.

image:aspectj-mode.gif[image]

[[ajmode-featuresandusage]]
== Features and Usage

All commands governing AspectJ mode are available from the AspectJ menu
on the toolbar. Besides those described below, there is a menu item
Customize options for viewing and customizing the options of the mode
and AJ Mode user guide to view this file. Keyword and declaration
highlighting is enabled above the minimal level of highlighting.

By default, AspectJ mode is automatically turned on when a buffer named
with a `.java` suffix is entered. The command
`M-x aspectj-mode-in-force-toggle` globally toggles the features of the
mode, easing quickly moving between AspectJ and Java projects (also
available as AspectJ mode extensions in the AspectJ menu).

=== Aspect Structure and Navigation

AspectJ minor mode highlights aspect relationships in the text with
textual annotations on the program source (optionally can be turned
off), such as the `[Player, Robot, Ship]` marking after the advice in
EnsureShipIsAlive at the bottom of the
xref:#aspectjmodescreenshot[figure], which indicates that the advice
refers to join points within Ship objects. The following commands (also
available from the menu) manage annotations and navigation:

.AspectJ Minor Mode Commands for Annotations and Navigation
[cols=",",options="header",]
|===
|Command (keyboard shortcut) |Description
|M-x aspectj-jump-menu (C-x C-j) |Display popup menu of advisers,
advisees, and inter-type declarations. Navigate to item by selecting
with mouse (see xref:#aspectjmodescreenshot2[figure] below).

|M-x aspectj-show-annotations |Add crosscut annotations on the text on
current buffer.

|M-x aspectj-dont-show-annotations |Remove crosscut annotations from
text on current buffer.
|===

The default for whether annotations are shown or not can be customized
by selecting Customize options from the AspectJ menu.

image:aspectj-mode2.gif[image]

=== Compilation

The Compile submenu accessible from the AspectJ menu presents the
known` .lst` files for the project. Selecting one compiles the project
with that `.lst` file and remembers that for future compiles. The
Compile... command accessible from the Emacs Tools menu is customized
through the project customization option `Aspectj Tools Compile
Command`, customizable from the AspectJ menu.

[[ajmode-installationetc]]
== Installation and Compatibility

AspectJ mode requires the installation of
http://www.gnu.org/software/emacs/[GNU Emacs 20.3.1] or
http://www.xemacs.org/[XEmacs 21.1.14 (Unix/Linux)], or
http://www.xemacs.org/[XEmacs 21.4 (Windows)], or higher. In general,
the most recent non-alpha/beta versions of these are recommended. A web
browser is required to view this documentation via Emacs. Small
modifications to the `.emacs` file configures AspectJ mode and enables
autoloading AspectJ mode when a `.java` file is loaded.

=== Installation

Step 1, with enhancements, can be found in the example Emacs
initialization file `sample.emacs` in the distribution.

[arabic]
. The files in this package need to be in the load-path and
``required''. For example, for the 1.0 release:
+
[source, text]
....
;; I keep my emacs packages in C:/Emacs
(setq load-path (cons "C:/Emacs/aspectj-emacsMode-1.0" load-path))
(require 'aspectj-mode)
....
. _[Optional]_ add `-emacssym` switch to the `ajc` and `ajc.bat` files
in your AspectJ tools installations (in the `/bin` directory). If you
invoke the compiler outside Emacs, this will ensure that your compiles
always generate information for annotations and the jump menu in the
form of `.ajesym` files.
. _[XEmacs only]_ Go to the `xemacs-packages/lisp` directory of your
XEmacs distribution and move the `jde` directory to someplace harmless.
Otherwise, Java files will come up in JDE mode.

=== Customizing Options

Selecting Customize options from the AspectJ menu displays a number of
options that customize AspectJ mode. These control whether annotations
are shown by default, as well as a number of options controlling
compilation and beanshell for java-mode. Example customizations are
given in the file `sample.emacs` in the distribution.

== Usage and Upgrade Problems

* _Symptom_: No annotations show. Message:
+
[source, text]
....
AspectJ Mode Warning: Can't find declarations file for...
....
+
AspectJ file has not been compiled with ajc and the `-emacssym` flag, or
was compiled with an obsolete version of ajc. After compilation, there
should be a <file>.ajesym for every <file>.java in the build. If .ajsym
files are present but error persists, recompile. Note that aspectj-mode
for JDE has a fallback view for uncompiled files.
* _Symptom_: Annotations are misplaced in the code.
+
AspectJ mode operates by querying data derived from the most recent
compile that includes the `-emacssym` flag. Recompile the entire program
with ajc including the switch. Consider permanently installing the
switch by editing the ajc and ajc.bat files in the /bin file in your
distribution.
* _Symptom_: New customization option settings were saved for future
sessions, but do not show up when Emacs is restarted.
+
You may have two sets of saved settings in your .emacs file, and Emacs
updated the first one, which may be shadowed by the second.
* _Symptom_: Java files that are part of a Java project not written in
AspectJ come up in aspectj-mode.
+
Emacs uses the file suffix (.java) to determine which mode to invoke.
You can either globally toggle the AspectJ features from the AspectJ
menu.
* _Symptom_: Reported bug fixes and new features to aspectj-mode are not
seen, or aspectj-mode.el cannot be found or loaded, with message:
+
[source, text]
....
Error in init file: File error: "Cannot open load file", "aspectj-mode"
....
+
Your load-path variable (set in your .emacs) is referring to an old
release. Change your load-path to point at the directory for the current
release. See the sample.emacs files in the distribution, for example.
* _Symptom_: When trying to get a jump menu, I get the message "No
crosscut elements at point" even though there is a [list] on the same
line.
+
The caret (point) is probably on or after the list. To see the crosscut
elements you need to hit the jump menu on the same line that the
annotated elements appear as a list of items surrounded by '[' and ']'
on the same line as the affected declaration. If the caret is on the
same line as the elements and before the list (i.e. not at the end of
the list of elements) the jump menu should work.

BIN
docs/devguide/aspectj-mode.gif View File


+ 0
- 355
docs/devguide/aspectj-mode.xml View File

@@ -1,355 +0,0 @@
<refentry id="aspectj-mode">
<refnamediv>
<refname>AspectJ-mode</refname>
<refpurpose>support for XEmacs and GNU Emacs
</refpurpose>
</refnamediv>

<refsect1>
<title>AspectJ-mode User's Guide</title>
<para>
This guide describes aspectj-mode for GNU Emacs and XEmacs, which
provides enhanced editing and management of AspectJ code via a minor
mode extension of java-mode. Included in this document
are guidance for aspectj-mode's <link
linkend="ajmode-featuresandusage">use</link>, and
<link linkend="ajmode-installationetc">installation and compatibility</link>.
See the README file in the aspectj-mode's distribution directory for
release-specific details.
</para>

<para>
AspectJ minor mode provides (see graphic):
<itemizedlist>
<listitem>
<para>
Viewing and navigation of aspect structures, permitting
navigation between aspect code and the code that it affects, via
a `jump' menu (and in the speedbar and Classes menu for JDE
users).
</para>
</listitem>

<listitem>
<para>
Source code annotation of inter-type and advice declarations,
as well as the code they affect.
</para>
</listitem>

<listitem>
<para>
AspectJ-style compilation, using .lst files to generate a
compilation submenu.
</para>
</listitem>

<listitem>
<para>
Highlighting of AspectJ keywords and declaration names.
</para>
</listitem>

</itemizedlist>
</para>

<para>
The first two are derived from ajc's last build of the AspectJ program.
An example usage is given below.
</para>

<para>
<inlinemediaobject id="aspectjmodescreenshot">
<imageobject>
<imagedata fileref="aspectj-mode.gif"/>
</imageobject>
</inlinemediaobject>
</para>
</refsect1>

<refsect1 id="ajmode-featuresandusage"><!-- Features and Usage -->
<title>Features and Usage</title>
<para>
All commands governing AspectJ mode are available from the AspectJ menu
on the toolbar. Besides those described below, there is a menu item
<guimenuitem>Customize options</guimenuitem> for viewing and customizing
the options of the mode and <guimenuitem>AJ Mode user guide</guimenuitem>
to view this file. Keyword and declaration highlighting is enabled above
the minimal level of highlighting.
</para>

<para>
By default, AspectJ mode is automatically turned on when a buffer
named with a <filename>.java</filename> suffix is entered.
The command
<command>M-x aspectj-mode-in-force-toggle</command> globally toggles
the features of the mode, easing quickly moving between
AspectJ and Java projects (also available as <guimenuitem>AspectJ mode
extensions</guimenuitem> in the AspectJ menu).
</para>

<refsect2>
<title>Aspect Structure and Navigation</title>

<para>
AspectJ minor mode highlights aspect relationships in the text with
textual annotations on the program source (optionally can be turned
off), such as the <literal>[Player, Robot, Ship]</literal> marking after the advice in EnsureShipIsAlive
at the bottom of the <link linkend="aspectjmodescreenshot">figure</link>,
which indicates that the advice refers to join points within Ship
objects. The following commands (also available from the menu) manage
annotations and navigation:
</para>

<table id="minormodecommands">
<title>
AspectJ Minor Mode Commands for Annotations and Navigation
</title>
<tgroup cols="2" colsep="1" rowsep="1" align="left">
<thead>
<row>
<entry>Command (keyboard shortcut)</entry>
<entry>Description</entry>
</row>
</thead>

<tbody>
<row>
<entry>M-x aspectj-jump-menu (C-x C-j)</entry>
<entry>
Display popup menu of advisers, advisees, and inter-type declarations.
Navigate to item by selecting with mouse
(see <link linkend="aspectjmodescreenshot2">figure</link> below).
</entry>
</row>
<row>
<entry>M-x aspectj-show-annotations</entry>
<entry>
Add crosscut annotations on the text on current buffer.
</entry>
</row>

<row>
<entry>M-x aspectj-dont-show-annotations</entry>
<entry>
Remove crosscut annotations from text on current buffer.
</entry>
</row>
</tbody>
</tgroup>
</table>

<para>
The default for whether annotations are shown or not can be
customized by selecting <guimenuitem>Customize options</guimenuitem>
from the <guimenu>AspectJ</guimenu> menu.
</para>

<para>
<inlinemediaobject id="aspectjmodescreenshot2">
<imageobject>
<imagedata fileref="aspectj-mode2.gif"/>
</imageobject>
</inlinemediaobject>
</para>

</refsect2>

<refsect2>
<title>Compilation</title>

<para>
The <guisubmenu>Compile</guisubmenu> submenu
accessible from the <guimenu>AspectJ</guimenu> menu presents the
known<filename> .lst</filename> files for the project. Selecting
one compiles the project with that <filename>.lst</filename> file
and remembers that for future compiles. The
<guimenuitem>Compile...</guimenuitem> command accessible from the
Emacs <guimenu>Tools</guimenu> menu is customized through the
project customization option <option>Aspectj Tools Compile
Command</option>, customizable from the
<guimenu>AspectJ</guimenu> menu.
</para>

</refsect2>

</refsect1>

<refsect1 id="ajmode-installationetc"><!-- Installation and Compatibility -->
<title>Installation and Compatibility</title>

<para> AspectJ mode requires the installation of <ulink
url="http://www.gnu.org/software/emacs/">GNU Emacs 20.3.1</ulink>
or <ulink url="http://www.xemacs.org/">XEmacs 21.1.14 (Unix/Linux)</ulink>,
or <ulink url="http://www.xemacs.org/">XEmacs 21.4 (Windows)</ulink>,
or higher. In general, the most recent non-alpha/beta versions of these
are recommended. A web browser is required to view this documentation
via Emacs. Small modifications to the <filename>.emacs</filename> file
configures AspectJ mode and enables autoloading AspectJ mode when a
<filename>.java</filename> file is loaded.
</para>

<refsect2>
<title>
Installation
</title>

<!-- <note> -->
<para>
Step 1, with enhancements, can be found in the example Emacs
initialization file <filename>sample.emacs</filename> in the
distribution.
</para>
<!-- </note> -->

<orderedlist>
<listitem>
<para>
The files in this package need to be in the load-path and
``required''. For example, for the 1.0 release:
<programlisting>
;; I keep my emacs packages in C:/Emacs
(setq load-path (cons "C:/Emacs/aspectj-emacsMode-1.0" load-path))
(require 'aspectj-mode)
</programlisting>
</para>
</listitem>

<listitem>
<para>
<emphasis>[Optional]</emphasis> add <literal>-emacssym</literal>
switch to the <filename>ajc</filename> and <filename>ajc.bat</filename>
files in your AspectJ tools installations (in the
<filename>/bin</filename> directory). If you invoke the compiler
outside Emacs, this will
ensure that your compiles always generate information for annotations
and the jump menu in the form of <literal>.ajesym</literal> files.
</para>
</listitem>

<listitem>
<para>
<!-- TBD: Change to something less bogus. -->
<emphasis>[XEmacs only]</emphasis> Go to the
<filename>xemacs-packages/lisp</filename> directory of your
XEmacs distribution and move the <filename>jde</filename>
directory to someplace harmless. Otherwise, Java files will come
up in JDE mode.
</para>
</listitem>

</orderedlist>
</refsect2>

<refsect2>
<title>Customizing Options</title>
<para>
Selecting <guimenuitem>Customize options</guimenuitem> from the
<guimenu>AspectJ</guimenu> menu displays a number of options that
customize AspectJ mode. These control whether annotations are shown
by default, as well as a
number of options controlling compilation and beanshell for
java-mode.
Example customizations are given in the file
<filename>sample.emacs</filename> in the distribution.
</para>
</refsect2>

</refsect1>

<refsect1>
<title>Usage and Upgrade Problems</title>

<itemizedlist>

<listitem>
<para><emphasis>Symptom</emphasis>: No annotations show. Message:

<screen>
AspectJ Mode Warning: Can't find declarations file for...
</screen>

</para>

<para>AspectJ file has not been compiled with ajc and the <literal>-emacssym</literal>
flag,
or was compiled with an obsolete version of ajc. After compilation,
there should be a &lt;file&gt;.ajesym for every &lt;file&gt;.java in the
build. If .ajsym files are present but error persists, recompile. Note
that aspectj-mode for JDE has a fallback view for uncompiled files.
</para>
</listitem>

<listitem>
<para><emphasis>Symptom</emphasis>: Annotations are misplaced in the
code. </para>

<para>AspectJ mode operates by querying data
derived from the most recent compile that includes the
<literal>-emacssym</literal> flag. Recompile the entire program with
ajc including the switch. Consider permanently installing the switch
by editing the ajc and ajc.bat files in the /bin file in your
distribution.</para>
</listitem>

<listitem>
<para><emphasis>Symptom</emphasis>: New customization option settings were saved
for future sessions, but do not show up when Emacs is restarted.
</para>

<para>You may have two sets of saved settings in
your .emacs file, and Emacs updated the first one, which may be shadowed
by the second.</para>
</listitem>

<listitem>
<para><emphasis>Symptom</emphasis>: Java files that are part of a Java project not written
in AspectJ come up in aspectj-mode. </para>

<para>Emacs uses the file suffix (.java) to
determine which mode to invoke. You can either globally toggle the
AspectJ features from the AspectJ menu.
</para>
</listitem>

<listitem>
<para><emphasis>Symptom</emphasis>: Reported bug fixes and new features
to aspectj-mode are not seen, or aspectj-mode.el cannot be found or
loaded, with message:

<screen>
Error in init file: File error: "Cannot open load file", "aspectj-mode"
</screen>

</para>
<para>Your load-path variable (set in your .emacs)
is referring to an old release. Change your load-path to
point at the directory for the current release. See the sample.emacs
files in the distribution, for example.</para>
</listitem>

<listitem>
<para><emphasis>Symptom</emphasis>: When trying to get a jump menu,
I get the message "No crosscut elements at point" even though
there is a [list] on the same line.
</para>

<para>The caret (point) is probably on or after the list.
To see the crosscut elements you need to hit the jump menu
on the same line that the annotated elements appear as a list
of items surrounded by '[' and ']' on the same line as the
affected declaration. If the caret is on the same line as the
elements and before the list (i.e. not at the end of the
list of elements) the jump menu should work.
</para>
</listitem>
</itemizedlist>
</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: -->

BIN
docs/devguide/aspectj-mode2.gif View File


+ 0
- 2
docs/devguide/devguide.adoc View File

@@ -24,8 +24,6 @@ include::ajdoc.adoc[`ajdoc`, the AspectJ API documentation generator]

include::aj.adoc[`aj`, the AspectJ load-time weaving launcher]

include::ajbrowser.adoc[AspectJ Browser]

include::antsupport.adoc[AspectJ Ant Tasks]

include::ltw.adoc[Load-Time Weaving]

+ 0
- 1
docs/devguide/index.adoc View File

@@ -18,7 +18,6 @@ most-recent documentation available from the https://eclipse.org/aspectj[AspectJ
* xref:ajc.adoc[`ajc`, the AspectJ compiler/weaver]
* xref:ajdoc.adoc[`ajdoc`, the AspectJ API documentation generator]
* xref:aj.adoc[`aj`, the AspectJ load-time weaving launcher]
* xref:ajbrowser.adoc[AspectJ Browser]
* xref:antsupport.adoc[AspectJ Ant Tasks]
* xref:ltw.adoc[Load-Time Weaving]
* xref:compatibility.adoc[AspectJ version compatibility]

BIN
docs/devguide/jbuilder-buildOptions.gif View File


BIN
docs/devguide/jbuilder-building.gif View File


BIN
docs/devguide/jbuilder-configs.gif View File


BIN
docs/devguide/jbuilder-structureNavigation.gif View File


+ 3
- 3
docs/devguide/tools-intro.adoc View File

@@ -8,8 +8,8 @@ The xref:../progguide/index.html[AspectJ Programming Guide] describes
the AspectJ language. This guide describes the AspectJ tools produced by
the AspectJ team on https://eclipse.org/aspectj. The AspectJ tools
include - ajc, the compiler/weaver; ajdoc, a documentation tool;
ajbrowser, a crosscutting code viewer; Ant support for ajc; and
load-time weaving support. These tools are delivered in the library
Ant support for ajc; and load-time weaving support.
These tools are delivered in the library
folder of the AspectJ tools installation, mainly in `aspectjtools.jar`
(tools) and `aspectjrt.jar` (runtime). This guide does not describe the
Eclipse AspectJ development tools (AJDT). That is produced by another
@@ -78,7 +78,7 @@ AspectJ program.)

AspectJ introduces two new paths for the binary input to the weaver
which you'll find referenced in xref:ajc.adoc[`ajc`, the AspectJ compiler/weaver],
xref:ajbrowser.adoc#ajbrowser[AspectJ Browser], xref:antsupport.adoc[AspectJ Ant Tasks], and xref:ltw.adoc#ltw[Load-Time Weaving].
xref:antsupport.adoc[AspectJ Ant Tasks], and xref:ltw.adoc#ltw[Load-Time Weaving].

As in Java, the `classpath` is where the AspectJ tools resolve types
specified in the program. When running an AspectJ program, the classpath

+ 3
- 10
docs/dist/README-AspectJ.adoc View File

@@ -6,12 +6,9 @@ _Version @build.version.long@ released on @build.date@._

* the link:bin[`<aspectj install dir>/bin`] directory has scripts for
** `ajc`: the compiler for the AspectJ language
** `ajbrowser`: a graphical editor for compiling programs with `ajc` and
navigating the crosscutting structure of those programs
* the directory link:lib[`<aspectj install dir>/lib`] has the AspectJ
binaries,
** `aspectjtools.jar`: libraries for `ajc`, `ajbrowser`, and the Ant
tasks
** `aspectjtools.jar`: libraries for `ajc` and the Ant tasks
** `aspectjrt.jar`: runtime library for AspectJ programs
* the directory link:doc[`<aspectj install dir>/doc`] has examples,
programming and development environment guides, instructions for the Ant
@@ -24,7 +21,7 @@ the link:doc/index.html[index] page.

=== 2 Install Procedure

The AspectJ tools `ajc` and `ajbrowser` are Java programs that can be
The AspectJ tool `ajc` is a Java program that can be
run indirectly from the scripts or directly from `aspectjtools.jar`. The
`aspectjrt.jar` needs to be on the classpath when compiling or running
programs compiled by `ajc`. This procedure shows ways to do that.
@@ -78,11 +75,7 @@ ____
`C:\jdk1.3\bin\java.exe -jar D:\aspectj\lib\aspectjtools.jar %*`
____

With no arguments or only argument list (.lst) files, this will launch
`ajbrowser`, the GUI structure browser; otherwise, it will run `ajc`,
the AspectJ compiler. This means that if your browser is set up to run
jar files, clicking a link to lib/aspectjtools.jar will launch
`ajbrowser`.
This will run `ajc`, the AspectJ compiler.

You can also create scripts like those created by the installer. These
scripts use full paths that are system dependent so you will likely have

+ 7
- 17
docs/faq/faq.adoc View File

@@ -26,9 +26,8 @@ supported development environments) and then run it, supplying a small
(< 100K) runtime library.

The AspectJ technologies include a compiler (`ajc`), a debugger
(`ajdb`), a documentation generator (`ajdoc`), a program structure
browser (`ajbrowser`), and integration with Eclipse, Sun-ONE/Netbeans,
GNU Emacs/XEmacs, JBuilder, and Ant.
(`ajdb`), a documentation generator (`ajdoc`) and integration with Eclipse and
Ant.

*Q:* What are the benefits of using AspectJ?

@@ -234,9 +233,6 @@ AspectJ for JBuilder project http://aspectj4jbuildr.sourceforge.net
and 3), Sun/One) in the SourceForge AspectJ for NetBeans project
http://aspectj4netbean.sourceforge.net

The common functionality of AJDE is also available in the stand-alone
source code browser `ajbrowser`, included in the tools distribution.

Finally, as mentioned above, AspectJ also supports building with Ant by
providing task interfaces to the ajc and ajdoc tools.

@@ -1201,10 +1197,10 @@ programmers to get the benefits of modularizing crosscutting concerns
while still having immediate access to what aspects affect a class.

For example, the link:devguide/index.html[Development Environment Guide]
link:devguide/ajbrowser.html[ajbrowser section]. shows that you can list
shows that you can list
or navigate between method and advice affecting that method and between
a type and declarations in an aspect on that type. (The IDE support may
have more features than `ajbrowser`, depending on the IDE. See
have more features than that, depending on the IDE. See
#q:integrateWithDevTools[Q: How well does AspectJ integrate with
existing Java development tools?] for more information on which Java
development environments are supported.)
@@ -2162,8 +2158,7 @@ tree as Java files based on the .java extension), you can use the .aj
extension for your AspectJ files. The ajc compiler accepts both .java
and .aj files, and you can set up your build scripts to include the
correct list of source files. (You will have to find another editor for
editing AspectJ files; you can use the ajbrowser to view edit your
AspectJ files and navigate the crosscutting structure.)
editing AspectJ files and possible viewing crosscutting structure.)

*Q:* I used to be able to compile my program in my IDE, but when I use
AJDE, I run out of memory (or it goes really slow).
@@ -2183,8 +2178,8 @@ by 5-10%.
To increase memory for the ajc compiler, see #q:ajcoom[Q:The AspectJ
compiler aborts with an OutOfMemoryError when compiling many classes.
How can I fix this?]. For your IDE, do something similar or follow the
provider's instructions. For example, to increase memory in JBuilder,
edit the `jbuilderX/bin/jbuilder.config` file to have an entry like:
provider's instructions. For example, to increase memory, add something like
this to your IDE's config file or start script:

[source, text]
....
@@ -3174,11 +3169,6 @@ with existing Java development tools?] (including bug reports for the
AJDE Eclipse support, which you can submit at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=AJDT ).

Bug reports on ajbrowser should have version information for both Java
and AspectJ, and (most importantly) clear steps for reproducing the bug.
You may submit ajbrowser bugs against the IDE component of AspectJ via
the web form https://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ.

One of the benefits of open-source is that you can find and fix the bug
for yourself; when you submit the fix back to us, we can validate the
fix for you and incorporate it into the next release. You can submit a

+ 4
- 8
docs/index.adoc View File

@@ -69,12 +69,11 @@ the current version is limited to code the compiler controls.
|xref:devguide/index.adoc[Development Environment Guide] +
(printable xref:devguide/printable.html[html]) |This is a guide to
xref:devguide/ajc.adoc[ajc], the command-line compiler;
xref:devguide/ajbrowser.adoc[ajbrowser], the stand-alone GUI for
compiling and viewing crosscutting structure; and the
and the
xref:devguide/antsupport.adoc[Ant tasks] for building AspectJ programs.

|xref:pdguide/index.adoc[Problem Diagnosis Guide] +
(printable xref:pdguide/printable.html[html]) |This has a guide to the
(xref:pdguide/pdguide.adoc[single page]) |This has a guide to the
various features available such as messages and trace to help you both
solve problems with you own programs and report bugs to the AspectJ
team.
@@ -168,7 +167,7 @@ components
https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Compiler[Compiler]
(for the AspectJ compiler, ajc)
https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=IDE[IDE]
(for AJBrowser and AJDE bugs),
(for AJDE bugs),
https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Ant[Ant]
(for the Ant tasks), and
https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Docs[Docs]
@@ -190,10 +189,7 @@ pointcuts, concepts AOP adds to OOP. To read about how the
link:https://github.com/eclipse-aspectj/aspectj/tree/master/docs/dist/doc/examples[examples] work, see the
xref:progguide/examples.adoc[Examples] section in the
xref:progguide/index.adoc[Programming Guide]. View and navigate the
crosscutting structure using https://eclipse.org/ajdt[AJDT]; if you can't
use Eclipse, try the `ajbrowser` structure viewer, as described in the
xref:devguide/ajbrowser.adoc[AspectJ Browser] section of the
xref:devguide/index.adoc[Development Environment Guide].
crosscutting structure using https://eclipse.org/ajdt[AJDT].

To start using AspectJ with your own code, modify the example aspects to
apply to your classes. As you learn, use the compiler's `-Xlint` flags

+ 1
- 1
docs/sandbox/ubc-design-patterns/patterns-readme.adoc View File

@@ -12,7 +12,7 @@ Build options

* To build the code manually with ajc, use the corresponding build.lst
files, creating the aspect library first (to create lib.jar).
* Ajbrowser and the other IDE support does not support options like
* IDE support does not support options like
sourceroots or -outjar in the .lst files, so you'll have to create new
.lst files if you want to build portions of the project in an IDE.
* To build with eclipse, there are .project and .classpath files, but

+ 0
- 9
org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/core/builder/AjBuildManagerTest.java View File

@@ -255,15 +255,6 @@ public class AjBuildManagerTest extends TestCase {
// deleted,
// ((File)manager.buildConfig.getSourceRoots().get(0)).getAbsolutePath());
//
// JavaBuilder jbuilder = manager.getJavaBuilder();
// jbuilder.lastState = new State(jbuilder);
// jbuilder.binaryLocationsPerProject = new SimpleLookupTable();
//
// AjBuildManager.IncrementalBuilder builder
// = manager.getIncrementalBuilder(messageWriter); // XXX trap errors
// TestNotifier testNotifier = new TestNotifier(builder, jbuilder.currentProject);
// jbuilder.notifier = testNotifier;
//
// IContainer[] sourceFolders = new IContainer[] {
// new FilesystemFolder(((File)manager.buildConfig.getSourceRoots().get(0)).getAbsolutePath())
// };

+ 0
- 2
testing/src/test/java/org/aspectj/testing/util/WebInstall.java View File

@@ -94,8 +94,6 @@ public class WebInstall {
protected static String[] packages = new String[]
{ "aspectj-tools-", ""
, "aspectj-docs-", ""
, "ajde-forteModule-", ""
, "ajde-jbuilderOpenTool-", ""
};

/**

Loading…
Cancel
Save