CodeAid plugin |
Version 0.3 (Jan. 01, 2001) By Jason Ginchereau <jg5@cs.wustl.edu> André Kaplan <akaplan@users.sourceforge.net> |
CodeAid is a code completion tool for Java programmers.
It gives a pop-up list of possible field or method names when "." is typed after a variable name. The name can be selected from the list, and/or completed with the "Tab" or "Enter" key.
![]() |
---|
Figure 1 - CodeAid member completion |
CodeAid also lists the signatures of all possible methods when "(" is typed after a method name.
![]() |
---|
Figure 2 - CodeAid method completion |
The plugin also provides optionally on-the-fly syntax and semantic error checking, so that most errors can be caught before compiling. To fully benefit from this feature, you will need to install the ErrorList plugin. With ErrorList, the syntaxic/semantic errors are highlighted within the text area with tooltips giving the error message. Also, the ErrorList window gives you a convenient access to all errors.
However, this option sometimes reports errors incorrectly and so is considered as experimental.
You won't be able to get much use out of the advanced features of
CodeAid without first generating some "code databases" for
the parser to use as a reference. In the future, pre-built databases
may be provided for download, or a nicer graphical tool may be used,
but for now you will need to use a command-line tool called
cdbbuild
.
Usage: cdbbuild <options> Parses source files to a database for use with CodeAid. -f --fullcomments <yes|NO> store full javadoc comments (> 1 sentence) -p --privateinfo <yes|NO> store private and package-private info -s --source <dirname> parse .java files in directory tree -s --source <zipfile>[!<path>] parse .java files in zip/jar -i --include <filename.cdb> include other .cdb in output -r --read <filename.cdb> read other .cdb but don't include in output -o --output <filename.cdb> output new database to .cdb file Example: cdbbuild -s src.jar!src -o java.cdb Example: cdbbuild -r java.cdb -s "C:/Program Files/jEdit" -o jedit.cdb Commands are executed in the order they are parsed, which means information from later sources will overwrite earlier information, and also output should usually be the last command.
A DOS .bat file and unix shell script for cdbbuild
are located
in the CodeAid directory under the jEdit user directory (for example
C:\Program Files\jEdit\jars\CodeAid).
Once created, all .cdb files should be placed in the codeaid subdirectory (C:\WINDOWS\.jedit\codeaid in Windows, ~/.jedit/codeaid in UNIX)
If you do this correctly, you should be able to get pop-ups for any class that was included in the database. Most users will at least want to create a database for the standard Java runtime libraries, as shown in the first example above. But you can also create a database for any other package you import into your code, as long as you have the source code to that package.
By default, CodeAid is configured to automatically display popups for members or methods. However, if you don't like this behaviour and prefer to have popups only at user request, you can disable automatic popups and instead configure keyboard shortcuts in the Global Options for the two main CodeAid actions:
C+SPACE
)
C+COMMA
)
new
keyword.
cdbbuild
tool
requires source code, but it could also parse class files out
of a jar (such as a standard extension). However you would not
get parameter names or javadoc comment information. Alternatively,
it should be possible to parse this information out of generated
javadoc html files (but that might be a lot of work).
The preferred way to send bug reports or feature requests is to use the Sourceforge Bug Tracker at http://sourceforge.net/bugs/?group_id=588.
You can also write to:
org.gjt.sp.jedit.textarea.InputHandler
changes
isAssignableTo(paramTypes[i], args[i], true)
isAssignableTo(args[i], paramTypes[i], true)
if (plus && type1.equals("java.lang.String"))
if (plus && !(isNumericType(type1) && isNumericType(type2)))
codeaid.info.SourceLocation
java.awt.Component
org.gjt.sp.util.Log
to log some messages