Next: Distribution, Previous: Testing, Up: Top [Contents][Index]
The Daikon source code follows the Google Java Style and also Michael Ernst’s coding conventions.
• Eclipse setup | ||
• Editing daikon.texinfo |
Next: Editing daikon.texinfo, Up: Editing [Contents][Index]
• Start up Eclipse | ||
• Existing projects | ||
• External tools | ||
• Eclipse debugger | ||
• Using Git with Eclipse |
Next: Existing projects, Up: Eclipse setup [Contents][Index]
Just run the command eclipse
at the command shell.
There is one big catch: take note of where you launch Eclipse and
always launch Eclipse from the same location. For example, you might
want to alias run-eclipse with cd $HOME; eclipse
.
For convenience, this is already done for you if you source the
daikon-dev.bashrc startup script.
There are ways around the launch location inconvenience, such as
the -data switch, but the alias trick should be the simplest and least
confusing workaround.
It is strongly recommended that you make the following customizations to Eclipse:
Window >> Preferences >> Workbench >> Refresh Workspace on Startup Window >> Preferences >> Java >> Compiler >> Problems >> Unused imports >> Ignore Window >> Preferences >> Java >> Compiler >> Style >> Non-static access >> >> Ignore
Next: External tools, Previous: Start up Eclipse, Up: Eclipse setup [Contents][Index]
• Import existing project | ||
• Import different project |
Next: Import different project, Up: Existing projects [Contents][Index]
Second, import Daikon into Eclipse. To import: start Eclipse, then choose menu item ‘File->Import->ExistingProjectIntoWorkspace’, then enter (the full name of) directory $DAIKONDIR/java for Project Contents.
Those two steps are all there is to it!
(This simple procedure works because there are already .project and .classpath files in $DAIKONDIR/java. To import a project that doesn’t have these files, you would need to create them (for instance, copy them from Daikon’s), or else follow a different procedure to work on your project in Eclipse.)
Previous: Import existing project, Up: Existing projects [Contents][Index]
Before working on code in Eclipse, you must import the code into
the Eclipse workspace. You also need to set up various compilation
settings and specify jars and classes that should be in the
compilation classpath. (By default, Eclipse does not use your
CLASSPATH
environment variable.)
Note that if you follow these directions, then the compiled classes do not appear in the directory from which you imported in the previous step. Instead, the compiled classes appear in the Eclipse workspace directory. If you followed the setup instructions above, then the compiled code will be in "$HOME/.eclipse/Daikon/bin", which you should add to your classpath in order to use the updates you make from Eclipse.
Next: Eclipse debugger, Previous: Existing projects, Up: Eclipse setup [Contents][Index]
Eclipse compiles your project whenever you save. However, it parses frequently during editing and issues most or all of the errors and warnings that the compiler would have. In order to clear a warning/error (in the Task List), you must save the file, however.
If you change files outside Eclipse, you should refresh Eclipse, via right-clicking on the project or via menu item File >> Refresh.
Next: Using Git with Eclipse, Previous: External tools, Up: Eclipse setup [Contents][Index]
To begin debugging, you can click on the bug icon in the toolbar or select Run->Debug from the menu. You will see the same window as if you selected Run->Run, but when the Java application launches, Eclipse will switch to the Debugging Perspective, which reveals many windows such as the stack trace window, the variable values window, and the step control panel.
Debugging features (window locations given for default setup):
Previous: Eclipse debugger, Up: Eclipse setup [Contents][Index]
This section has yet to be written, although you can just do all the editing, compiling, and running from the Eclipse IDE while doing version control commands from the shell or whatever current system you use.
Previous: Eclipse setup, Up: Editing [Contents][Index]
The Daikon manual appears in doc/daikon.texinfo. The manual is written using the Texinfo formatting system, which makes it easy to produce HTML, info, or printed (PDF) output.
You can edit the manual using an ordinary text editor. Emacs has a useful Texinfo mode. You can mimic the formatting commands that already appear in the manual, but it’s also a good idea to read the Texinfo documentation.
If you wish to create a new section of the manual, insert two lines like the following:
@node @Short title @chapter @Long title
where you select the short and the long titles (which may
be the same), and you may replace @chapter
by @section
,
@subsection
, or @subsubsection
.
Follow the Texinfo conventions for marking up text. In particular:
@code
is for names of classes, functions, variables, keywords, and
other fragments of source code.
@var
is for meta-syntactic variables, not for referring to variables
that appear literally in the source code.
@file
is for the names of files.
@option
is for command-line options.
@samp
is for sample input or output. (Alternatively, you can use
@example
to set off longer input/output strings.)
@command
is for command lines.
@example
and @smallexample
in the same section since it
looks funny to have examples in two different sized fonts. If your example
is too wide to fit on the page with @example
, it’s better to insert some
line breaks to make it more readable than to shrink the font.
Once you have edited the manual, run make
twice (yes, you must run
it twice) in order to generate formatted versions of the manual
(daikon.{html,pdf}).
Previous: Eclipse setup, Up: Editing [Contents][Index]