blob: a7f03f2fb5cad687e1e54f4009e0951487cd1af2 [file] [log] [blame]
Stephan Herrmann649fdb52011-05-15 14:12:16 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html>
3<head>
4 <link rel=stylesheet type="text/css" href="../css/style.css">
5 <link rel=stylesheet type="text/css" href="../css/nn.css">
Stephan Herrmann6fd12162011-08-28 21:27:52 +00006 <title>OTDT 2.0 - New and Noteworthy</title>
Stephan Herrmann649fdb52011-05-15 14:12:16 +00007</head>
8<body>
Stephan Herrmann6fd12162011-08-28 21:27:52 +00009<h1>OTDT 2.0 - New and Noteworthy</h1>
Stephan Herrmann0677b912011-06-03 09:20:36 +000010<div class="navigation"><i>Changes since the 0.7.1 Release</i></div>
Stephan Herrmann6ec85a02011-05-17 20:28:56 +000011<div style="width:40%; padding:2px;background-color:#707070;"><div style="text-align:justify;background-color:#def4fe;padding:3px;">
12Note, that milestones towards the 2.0.0 release where named 0.8.0M<i>x</i>.
13The switch in version numbers has been made between 0.8.0M7 and 2.0.0 RC1 in preparation for the project's graduation from incubation status.
14</div></div>
Stephan Herrmann649fdb52011-05-15 14:12:16 +000015<div class="navigation">On this page:
16<!--a href="#metrics">&bull; Metrics Plug-in</a-->
17<!--a href="#configuration">&bull; Configuration</a-->
18<a href="#views">&bull; Views/Dialogs</a>
19<a href="#assist">&bull; Content Assist</a>
20<a href="#refactor">&bull; Refactoring</a>
21<!--a href="#formatting">&bull; Formatting</a>
22<a href="#debug">&bull; Run/Debug</a-->
23<a href="#language">&bull; Language</a>
24<!--a href="#api">&bull; API</a-->
25<a href="#compiler">&bull; Compiler</a>
26<!--a href="#otre">&bull; Runtime</a>
27<a href="#otequinox">&bull; OT/Equinox</a-->
28</div>
29<table cellpadding="10" cellspacing="0" width="100%">
30 <colgroup>
31 <col width="20%">
32 <col width="80%">
33 </colgroup>
34 <tbody>
35<!--
36 <tr><td colspan="2" id="NAME"><h2>HEADING</h2></td></tr>
37 <tr>
38 <td><p align="right"><b>DESC</b><br>
39 <span class="since">since&nbsp;0.7.1</span><br>
40 <a class="buglink" title="TITLE" href="https://bugs.eclipse.org/308029">308029</a></p></td>
41 <td><p>
42
43 </p>
44 <p><img alt="TEXT" src="../images/screenshots/NN07/.png"></p>
45 <p></p>
46 </td>
47 </tr>
48 <div class="listbox"><div class="listing"><pre><code class="keyword">public team class</code> <font color="blue">MyTeam</font> {
49}</pre></div></div>
50-->
51 <tr><td colspan="2" id="views"><h2>Views & Dialogs</h2></td></tr>
52 <tr>
53 <td><p align="right"><b>Compiler preferences page cleaned up</b><br>
54 <span class="since">since&nbsp;0.8.0M5</span><br>
55 <a class="buglink" title="cleanup OT/J compiler preferences page" href="https://bugs.eclipse.org/335739">335739</a></p></td>
56 <td><p>The preference page for OT/J compiler options has be revamped following recent improvements in the JDT UI.
57 The page is now structured into expandable sections per group of problems.
58 Also incremental search within the tree of options is supported.
59 The option to disable "scoped keywords" was apparently never used and has been removed from the preferences.
60 </p>
61 <p><img alt="OT/J Compiler preferences" src="../images/screenshots/NN08/CompilerPreferences.png"></p>
62 <p></p>
63 </td>
64 </tr>
65
66 <tr><td colspan="2" id="assist"><h2>Content assist</h2></td></tr>
67 <tr>
68 <td><p align="right"><b>Create role method quickfix</b><br>
69 <span class="since">since&nbsp;0.8.0M4</span><br>
70 <a class="buglink" title="Quickfix method generation on missing replace callin method generates wrong method" href="https://bugs.eclipse.org/329988">329988</a></p></td>
71 <td><p>If a role class has a callin binding whose left-hand side does not resolve to an existing role method
72 a quickfix exists for creating the missing role method.
73 Since 0.8.0M4 this quickfix respects the signature of the bound base method even if the callin binding does not declare any signatures
74 (see the <b>int</b> parameter and return in the screenshot below):
75 </p>
76 <p><img alt="Create Role Method Quickfix" src="../images/screenshots/NN08/CreateRoleMethodQuickfix.png"></p>
77 <p></p>
78 </td>
79 </tr>
80 <tr><td colspan="2" id="refactor"><h2>Refactoring</h2></td></tr>
81 <tr>
82 <td><p align="right"><b>Extract role interface</b><br>
83 <span class="since">since&nbsp;0.8.0M6</span><br>
84 <a class="buglink" title="extract interface on a role should create a role interface" href="https://bugs.eclipse.org/339264">339264</a></p></td>
85 <td><p>A new option has been added to the Extract Interface refactoring:
86 If the enclosing class is a role class a new check box appears:
87 </p>
88 <p><img alt="Extract as role interface checkbox" src="../images/screenshots/NN08/ExtractInterface1.png"></p>
89 <p>If this box is checked the new interface will not be created as a top-level type (as normally done by the JDT),
90 but as a role interface of the current enclosing team.</p>
91 <p><img alt="Extract as role interface preview" src="../images/screenshots/NN08/ExtractInterface2.png"></p>
92 <p>The refactored result looks like this</p>
93 <p><img alt="Extract as role interface result" src="../images/screenshots/NN08/ExtractInterface3.png"></p>
94 </td>
95 </tr>
96<!--
97 <tr><td colspan="2" id="debug"><h2>Run / Debug</h2></td></tr>
98 <tr><td colspan="2" id="api"><h2>API</h2></td></tr>
99-->
100 </tr> <tr><td colspan="2" id="language"><h2>Language</h2></td></tr>
Stephan Herrmann6fd12162011-08-28 21:27:52 +0000101 <tr>
102 <td><p align="right"><b>Java 7 support</b><br>
103 <span class="since">since&nbsp;2.0.1RC1</span><br>
104 <a class="buglink" title="Upgrade to Java7" href="https://bugs.eclipse.org/353894">353894</a></p></td>
105 <td><p>Starting with 2.0.1 RC1 OT/J has been integrated with Java 7, i.e., the OT/J compiler also supports all
106 <a href="http://www.eclipse.org/jdt/ui/r3_8/Java7news/whats-new-java-7.html">new features introduced in Java 7</a>.
107 </p>
108 </td>
109 </tr>
Stephan Herrmann649fdb52011-05-15 14:12:16 +0000110 <tr>
Stephan Herrmann6fd12162011-08-28 21:27:52 +0000111 <td id="bug326969"><p align="right"><b>Precedence among tsupers</b><br>
Stephan Herrmann649fdb52011-05-15 14:12:16 +0000112 <span class="since">since&nbsp;0.8.0M3</span><br>
113 <a class="buglink" title="[compiler] implement changed precedence among different tsupers" href="https://bugs.eclipse.org/326969">326969</a></p></td>
114 <td><p>
115 Previously, <a class="otjldlink" href="http://www.objectteams.org/def/1.3/s1.html#s1.5.e">OTJLD &sect;1.5(e)</a>
116 was inconsistent between its first and second sentences.
117 The first sentence defines the general precendence between <code class="keyword">super</code> and <code class="keyword">tsuper</code>,
118 which will remain unchanged.
119 However, the precendence among different tsupers has been adjusted as demonstrated using this example:
120 <div class="listbox"><div class="listing"><pre><code class="keyword">public team class</code> <font color="blue">Team0</font> {
121 <code class="keyword">protected team class</code> <font color="darkblue">InnerTeamA</font> {
122 <code class="keyword">protected class</code> <b>Role</b> {
123 <code class="keyword">public void</code> rm() { ... }
124 }
125 <code class="keyword">public void</code> tm() { ... }
126 }
127 <code class="keyword">protected team class</code> InnerTeamB <code class="keyword">extends</code> <font color="darkblue">InnerTeamA</font> {
128 <code class="keyword">protected class</code> <b>Role</b> {
129 <code class="keyword">public void</code> rm() { ... }
130 }
131 <code class="keyword">public void</code> tm() { ... }
132 }
133}
134<code class="keyword">public team class</code> <font color="blue">Team1 <code class="keyword">extends</code> Team0</font> {
135 <code class="keyword">protected team class</code> <font color="darkblue">InnerTeamA</font> {
136 <code class="keyword">protected class</code> <b>Role</b> {
137 <code class="keyword">public void</code> rm() { ... }
138 }
139 <code class="keyword">public void</code> tm() { ... }
140 }
141 <code class="keyword">protected team class</code> <font color="darkblue">InnerTeamB</font> <code class="keyword">extends</code> <font color="darkblue">InnerTeamA</font> {
142 <font color="green">// details inherited from Team1.InnerTeamA and Team0.InnerTeamB</font>
143 }
144}
145</pre></div></div>
146 When invoking <code>tm()</code> on an instance of <code>Team1.InnerTeamB</code> two implementation are
147 candidates for execution:<ul>
148 <li><code>Team1.InnerTeamA.tm()</code></li>
149 <li><code>Team0.InnerTeamB.tm()</code>,</li></ul>
150 from which <a class="otjldlink" href="http://www.objectteams.org/def/1.3/s1.html#s1.5.e">OTJLD &sect;1.5(e)</a>
151 selects <code>Team0.InnerTeamB</code>.<br />
152 Correspondingly, when invoking <code>rm()</code> on an instance of <code>Team1.InnerTeamB.R</code> two implementation are
153 candidates for execution:<ul>
154 <li><code>Team1.InnerTeamA.Role.rm()</code></li>
155 <li><code>Team0.InnerTeamB.Role.rm()</code>,</li></ul>
156 from which <a class="otjldlink" href="http://www.objectteams.org/def/1.3/s1.html#s1.5.e">OTJLD &sect;1.5(e)</a>
157 now selects <code>Team0.InnerTeamB.Role</code>, consistent with the above.
158 </p>
159 </td>
160 </tr>
161 <tr>
Stephan Herrmann6fd12162011-08-28 21:27:52 +0000162 <td id="bug338582"><p align="right"><b>Avoid role cache</b><br>
Stephan Herrmann649fdb52011-05-15 14:12:16 +0000163 <span class="since">since&nbsp;0.8.0M6</span><br>
164 <a class="buglink" title="consider optimization by avoiding the role cache" href="https://bugs.eclipse.org/338582">338582</a></p></td>
165 <td><p>
166 It has been observed that maintaining a large number of roles in the team's internal cache may have significant
167 impact on program performance (observed at 100000 roles of one particular type).
168 A new means for fine tuning has been added for situations where role identity is irrelevant.
169 A role class may now be marked with <code>@Instantiation(ALWAYS)</code> meaning that each lifting operation for this role class
170 will immediately create a new role instance without consulting the role cache. In fact such roles will never be stored in
171 any internal cache. Please read the implications discussed in <a href="http://www.objectteams.org/def/1.3/s2.html#s2.3.1.d">OTJLD &sect;2.3.1(d)</a>.
172 </p>
173 </td>
174 </tr>
Stephan Herrmann077bd2c2011-05-15 15:26:10 +0000175 <tr>
Stephan Herrmann0677b912011-06-03 09:20:36 +0000176 <td id="bug337413"><p align="right"><b>Dealing with lifting problems</b><br>
Stephan Herrmann077bd2c2011-05-15 15:26:10 +0000177 <span class="since">since&nbsp;2.0RC1</span><br>
178 <a class="buglink" title="consider changing LiftingFailedException to a checked exception" href="https://bugs.eclipse.org/337413">337413</a></p></td>
179 <td><p>Whenever lifting fails (due to a role binding ambiguity or an abstract relevant role) a <code>LiftingFailedException</code> is thrown
180 from the Object Teams runtime. This exception has now been changed to a checked exception to alert clients of problematic code
181 of the chance of failure. The consequences are defined in the new section
182 <a class="otjldlink" href="http://www.objectteams.org/def/1.3/s2.html#s2.3.5">OTJLD &sect;2.3.5</a>.
183 </p>
184 <p>The compiler now has two general ways to signal lifting problems:
185 <ul>
186 <li>Unhandled exception LiftingFailedException</code></li>
187 <li>Unsafe callin mapping, because lifting to role {0} may fail due to ...</li>
188 </ul>
189 <strong>If none of these messages are given, lifting can be assumed to be safe.</strong>
190 </p>
191 <p>Application code with lifting problems may choose from different strategies:
192 <ul>
193 <li>Avoid abstractness for bound roles:
194 <ul><li>Add method bodies which log the problem.<br/>
195 Benefit: unexpected situations will actually be detected.</li>
196 <li>Remove abstract methods and require clients to cast to a specific role type.<br/>
197 Benefit: client is now clearly repsonsible for dealing with potential <code>ClassCastException</code>
198 in cases where lifting produces an unexpected result.</li>
199 </ul></li>
200 <li>Team methods with declared lifting may choose to declare <code>LiftingFailedException</code><br/>
201 Benefit: client is alerted of the chance of failure, must handle unexpected situations.</li>
202 <li>Callin bindings with unsafe lifting may in special situations pass through using
203 <code>@SuppressWarnings("hidden-lifting-problem")</code><br/>
Stephan Herrmannb4517752011-05-19 15:34:59 +0000204 Benefit: owner of the role has to explicitly assert that s/he is aware of the chance that
Stephan Herrmann077bd2c2011-05-15 15:26:10 +0000205 the callin binding will not fire due to a lifting problem.</li>
206 <li>Revise the role hierarchy to avoid abstract relevant roles and potential binding ambiguities.</li>
207 </ul>
208 </p>
209 </td>
210 </tr>
Stephan Herrmann649fdb52011-05-15 14:12:16 +0000211 <tr><td colspan="2" id="compiler"><h2>Compiler</h2></td></tr>
212 <tr>
213 <td><p align="right"><b>Severity of write decapsulation</b><br>
214 <span class="since">since&nbsp;0.8.0M5</span><br>
Stephan Herrmann6fd12162011-08-28 21:27:52 +0000215 <a class="buglink" title="separate tuning of severity of decapsulation in &quot;set&quot; callout-to-field" href="https://bugs.eclipse.org/335523">335523</a></p></td>
Stephan Herrmann649fdb52011-05-15 14:12:16 +0000216 <td><p>When a role uses a callout <code class="keyword">set</code> to field with decapsulation this may be considered more severe
217 than a corresponding <code class="keyword">get</code> access. Therefor, the compiler now supports separate configurability for both
218 kinds of problems.
219 </p>
220 <p><img alt="Callouts to field with different severity" src="../images/screenshots/NN08/CalloutToFieldSeverity.png"></p>
221 <p></p>
222 </td>
223 </tr>
224
225<!--
226 <tr><td colspan="2" id="otre"><h2>Object Teams Runtime Environment</h2></td></tr>
227-->
228</table>
229</body>