Compiling Object Teams programs

Object Teams programs are compiled automatically and incrementally using an extended Java builder.

The language accepted by the compiler is defined in the OTJLD (OT/J Language Definition), which is bundled with the OTDT.

Problems detected by the compiler are classified as either warnings or errors.
The existence of a warning does not prohibit the execution of the program; some warnings only signal a programming style that is not recommended, others may report situations that are potentially unsafe such that an undeclared exception might occur at runtime.
Compile-time errors (as specified by the OT/J Language Specification) imply that byte code generation was incomplete (it may be possible to run even programs with compile errors, but the program will terminate as soon as it tries to execute an erroneous method).

Configuring Diagnostics

For a number of problems you can specify if you want the OT/J compiler to report them as warnings, errors or to ignore them. To change the default settings, use the Window > Preferences > Java > Compiler (OT/J) preference page (or change the project properties to specify project specific settings).
For easy reference, on the preference page each group of diagnostics mentions the paragraph in the language definition that defines the issue at hand.

Also note that many of these diagnostics can be fixed using a quick fix.

Consulting the language definition on problems

When viewing OT/J-specific error/warning messages in the Problems view, the context menu offers a   Go To Language Definition  link, taking you directly to the paragraph that defines the rule which is being violated by the compiled source code. For presenting the language definition the internal HTML-browser is used to allow easy navigation within the language definition.