blob: 87bc131101a457f114a85dd04fb8c937cf1c2602 [file] [log] [blame]
Stephan Herrmann01664412010-04-01 20:28:43 +00001<html>
2 <head>
3 <meta name="copyright" content="Copyright Technical University Berlin and others 2004, 2010. This page is made available under the Eclipse Public License v1.0. For full details see http://www.eclipse.org/legal/epl-v10.html" />
4 <link rel=stylesheet type="text/css" href="../css/book.css">
5 <link rel=stylesheet type="text/css" href="otguide.css">
6 <title>Compiling Object Teams programs</title>
7 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
8 </head>
9 <body>
10 <h1>Compiling Object Teams programs</h1>
11 <p>
12 Object Teams programs are compiled <u>automatically</u> and <u>incrementally</u> using
13 an <b><a href="builder.html">extended Java builder</a></b>.
14 </p>
15 <p>The language accepted by the compiler is defined in the <a href="otjld/def/index.html">OTJLD</a>
16 (OT/J Language Definition), which is bundled with the OTDT.
17 <p>Problems detected by the compiler are classified as either <b><i>warnings</i></b> or
18 <b><i>errors</i></b>.<br />
19 The existence of a warning does not prohibit the execution of the program;
20 some warnings only signal a programming style that is not recommended,
21 others may report situations that are potentially unsafe such that an undeclared
22 exception might occur at runtime.<br />
23 Compile-time errors (as specified by the OT/J Language Specification) imply
24 that byte code generation was incomplete (it may be possible to run even programs with
25 compile errors, but the program will terminate as soon as it tries to execute an
26 erroneous method).
27 <p>
28 <h3>Configuring Diagnostics</h3>
29 For a number of problems you can specify if you want the OT/J compiler
30 to report them as warnings, errors or to ignore them.
31 To change the default settings, use the <span class="ui">Window > Preferences > Java >
32 Compiler (OT/J)</span> preference page (or change the project properties to specify
33 project specific settings).<br />
34 For easy reference, on the preference page each group of diagnostics
35 mentions the paragraph in the language definition that defines the issue at hand.</p>
36 Also note that many of these diagnostics can be fixed using a <a href="quickfix.html">quick fix</a>.
37
38 <h3>Consulting the language definition on problems</h3>
39 <p>When viewing OT/J-specific error/warning messages in the Problems view, the context menu
40 offers a &nbsp;<img src="../icons/ot_paragraph.gif"> <span class="ui">Go To Language Definition</span> &nbsp;link,
41 taking you directly to the paragraph
42 that defines the rule which is being violated by the compiled source code. For presenting the
43 language definition the internal HTML-browser is used to allow easy navigation within the
44 language definition.</p>
45 <img title="Language Definition Integrated in the OTDT" src="images/screenshots/langdef.png"/>
46 </body>
47</html>