blob: 75d20ce82945e0cf467f701f88859635c6f13699 [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="otjld/css/ot.css">
6 <link rel=stylesheet type="text/css" href="otguide.css">
7 <title>OT/J content/code assist</title>
8 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
9 </head>
10 <body>
11 <h1 align="center">OT/J quick fixes</h1>
12 <u>Specific <a href="/help/topic/org.eclipse.jdt.doc.user/reference/ref-java-editor-quickfix.htm">quick fixes</a> are available for mending OT/J-related problems, including:</u>
13 <dl>
14 <dt>class modifiers
15 <dd>
16 &ndash; missing <code class="keyword">team</code> modifier,<br />
17 &ndash; illegal modifier for a role,<br />
18 &ndash; reducing the visibility from an (explicitly or implicitly) inherited role,<br />
Stephan Herrmann8740b762011-08-28 21:42:36 +000019 &ndash; abstract relevant role (<a href="otjld/def/s2.html#s2.5.b"><img src="../images/ot_paragraph.png"> 2.5(b)</a>).
Stephan Herrmann01664412010-04-01 20:28:43 +000020 <dt>modifiers of methods and method bindings
21 <dd>
22 &ndash; mismatch between a method's <code class="keyword">callin</code> modifier and a callin binding's modifier (<code class="keyword">before/after/replace</code>),<br />
23 &ndash; static/non-static incompatibility in a callin replace binding,<br />
Stephan Herrmann8740b762011-08-28 21:42:36 +000024 &ndash; mismatching override of callin vs. regular role methods (<a href="otjld/def/s4.html#s4.2.d"><img src="../images/ot_paragraph.png"> 4.2(d)</a>),<br />
Stephan Herrmann01664412010-04-01 20:28:43 +000025 &ndash; missing callin binding modifier (<code class="keyword">before/after/replace</code>).<br />
Stephan Herrmann8740b762011-08-28 21:42:36 +000026 &ndash; wrong callout token (<code class="keyword">-&gt;</code> vs. <code class="keyword">=&gt;</code>, <a href="otjld/def/s3.html#s3.1.e"><img src="../images/ot_paragraph.png"> 3.1(e)</a>).<br />
Stephan Herrmann01664412010-04-01 20:28:43 +000027 &ndash; insufficient visibility of a role method / constructor / field.<br />
Stephan Herrmann8740b762011-08-28 21:42:36 +000028 &ndash; also insufficient visibility of a shorthand callout binding can be fixed be prepending a visibility modifier (protected or public, see <a href="otjld/def/s3.html#s3.1.i"><img src="../images/ot_paragraph.png"> 3.1(i)</a>).<br />
Stephan Herrmann6fd12162011-08-28 21:27:52 +000029 <dt>callout/callin method bindings
30 <dd>
Stephan Herrmann8740b762011-08-28 21:42:36 +000031 &ndash; materializing inferred callout bindings (<a href="otjld/def/s3.html#s3.1.j"><img src="../images/ot_paragraph.png"> 3.1(j)</a>, <a href="otjld/def/s3.html#s3.5.h"><img src="../images/ot_paragraph.png"> 3.5(h)</a>)<br />
32 &ndash; missing callin precedence declaration (<a href="otjld/def/s4.html#s4.8"><img src="../images/ot_paragraph.png"> 4.8</a>).<br />
33 &ndash; <a href="assist/addRemoveSignatures.html">add/remove signatures in callout/callin method binding</a> (<a href="otjld/def/s3.html#s3.1.c"><img src="../images/ot_paragraph.png"> 3.1(c)</a>,<a href="otjld/def/s4.html#s4.1.c"><img src="../images/ot_paragraph.png"> 4.1(c)</a>).<br>
Stephan Herrmann6fd12162011-08-28 21:27:52 +000034 &nbsp;&nbsp;<em>This works as a quickfix if one of the method specs cannot be resolved, otherwise this change classifies as a <a href="quickassist.html">quick assist</a></em>.<br />
Stephan Herrmann01664412010-04-01 20:28:43 +000035 <dt>typing
36 <dd>
37 &ndash; add a missing anchor for the type of an externalized role
Stephan Herrmann8740b762011-08-28 21:42:36 +000038 (<a href="otjld/def/s1.html#s1.2.2"><img src="../images/ot_paragraph.png"> 1.2.2</a>, <a href="otjld/def/s9.html#s9.2"><img src="../images/ot_paragraph.png"> 9.2</a>)
Stephan Herrmann01664412010-04-01 20:28:43 +000039 (proposals are infered from the context),<br />
40 &ndash; adding missing <code class="keyword">final</code> modifier to a variable used as a type anchor, <br />
Stephan Herrmann8740b762011-08-28 21:42:36 +000041 &ndash; adding required type parameter to a callin binding capturing covariant base methods (<a href="otjld/def/s4.html#s4.9.3"><img src="../images/ot_paragraph.png"> 4.9.3</a>).
Stephan Herrmann01664412010-04-01 20:28:43 +000042
43 <dt>role files
44 <dd>
Stephan Herrmann8740b762011-08-28 21:42:36 +000045 &ndash; adding <code>@role</code> javadoc tags referring to a team's role files (<a href="otjld/def/s1.html#s1.2.5.d"><img src="../images/ot_paragraph.png"> 1.2.5.d</a>).
Stephan Herrmann01664412010-04-01 20:28:43 +000046 <dt>coding style
47 <dd>
Stephan Herrmann8740b762011-08-28 21:42:36 +000048 &ndash; change import to "<code class="keyword">import <strong>base</strong></code> ...", (<a href="otjld/def/s2.html#s2.1.2.d"><img src="../images/ot_paragraph.png"> 2.1.2(d)</a>)<br/>
Stephan Herrmann01664412010-04-01 20:28:43 +000049 &ndash; change qualified reference to a role's base class to using a simple name and "<code class="keyword">import <strong>base</strong></code> ...", <br/>
Stephan Herrmann8740b762011-08-28 21:42:36 +000050 &ndash; migrate syntax for externalized role from "<code>anchor.R</code>" to "<code>R&lt;@anchor&gt;</code>" (<a href="otjld/def/s1.html#s1.2.2.b"><img src="../images/ot_paragraph.png"> 1.2.2(b)</a>).<br/>
51 &ndash; adding a missing <code>@Override</code> annotation to a role class that overrides a corresponding role from the super team (<a href="otjld/def/s1.html#s1.3.1.c"><img src="../images/ot_paragraph.png"> 1.3.1(c)</a>).<br />
Stephan Herrmann01664412010-04-01 20:28:43 +000052 &ndash; adding a missing <code>@Override</code> annotation to a role method that overrides a corresponding method from the implicit super role.<br />
53 </dl>
54
55 <u>Additionally, some standard Java quickfixes and content assists have been extended to be applicable for OT/J elements, too.</u>
56 <dl>
57 <dt>suppress warnings
58 <dd>&ndash; <code style="color:#505050;">@SuppressWarnings</code> annotations can be added to method bindings, too.
59 <dt>create method
60 <dd>&ndash; applies to unresolved method specs in callout/callin bindings, too.<br />
61 &ndash; generate inherited abstract methods also respects implicit inheritance.
62 <dt>organize imports
63 <dd>&ndash; creates "<code class="keyword">import <strong>base</strong></code> ...", if appropriate
64 <dt><em>and more..</em>
65 </dl>
66 </body>
67</html>