blob: 50a659b7666d0f64abf4851535d2b6a25920bd02 [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">
6 <title>OTDT 2.0.0 - New and Noteworthy</title>
7</head>
8<body>
9<h1>OTDT 2.0.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>
101 <tr>
102 <td><p align="right"><b>Precedence among tsupers</b><br>
103 <span class="since">since&nbsp;0.8.0M3</span><br>
104 <a class="buglink" title="[compiler] implement changed precedence among different tsupers" href="https://bugs.eclipse.org/326969">326969</a></p></td>
105 <td><p>
106 Previously, <a class="otjldlink" href="http://www.objectteams.org/def/1.3/s1.html#s1.5.e">OTJLD &sect;1.5(e)</a>
107 was inconsistent between its first and second sentences.
108 The first sentence defines the general precendence between <code class="keyword">super</code> and <code class="keyword">tsuper</code>,
109 which will remain unchanged.
110 However, the precendence among different tsupers has been adjusted as demonstrated using this example:
111 <div class="listbox"><div class="listing"><pre><code class="keyword">public team class</code> <font color="blue">Team0</font> {
112 <code class="keyword">protected team class</code> <font color="darkblue">InnerTeamA</font> {
113 <code class="keyword">protected class</code> <b>Role</b> {
114 <code class="keyword">public void</code> rm() { ... }
115 }
116 <code class="keyword">public void</code> tm() { ... }
117 }
118 <code class="keyword">protected team class</code> InnerTeamB <code class="keyword">extends</code> <font color="darkblue">InnerTeamA</font> {
119 <code class="keyword">protected class</code> <b>Role</b> {
120 <code class="keyword">public void</code> rm() { ... }
121 }
122 <code class="keyword">public void</code> tm() { ... }
123 }
124}
125<code class="keyword">public team class</code> <font color="blue">Team1 <code class="keyword">extends</code> Team0</font> {
126 <code class="keyword">protected team class</code> <font color="darkblue">InnerTeamA</font> {
127 <code class="keyword">protected class</code> <b>Role</b> {
128 <code class="keyword">public void</code> rm() { ... }
129 }
130 <code class="keyword">public void</code> tm() { ... }
131 }
132 <code class="keyword">protected team class</code> <font color="darkblue">InnerTeamB</font> <code class="keyword">extends</code> <font color="darkblue">InnerTeamA</font> {
133 <font color="green">// details inherited from Team1.InnerTeamA and Team0.InnerTeamB</font>
134 }
135}
136</pre></div></div>
137 When invoking <code>tm()</code> on an instance of <code>Team1.InnerTeamB</code> two implementation are
138 candidates for execution:<ul>
139 <li><code>Team1.InnerTeamA.tm()</code></li>
140 <li><code>Team0.InnerTeamB.tm()</code>,</li></ul>
141 from which <a class="otjldlink" href="http://www.objectteams.org/def/1.3/s1.html#s1.5.e">OTJLD &sect;1.5(e)</a>
142 selects <code>Team0.InnerTeamB</code>.<br />
143 Correspondingly, when invoking <code>rm()</code> on an instance of <code>Team1.InnerTeamB.R</code> two implementation are
144 candidates for execution:<ul>
145 <li><code>Team1.InnerTeamA.Role.rm()</code></li>
146 <li><code>Team0.InnerTeamB.Role.rm()</code>,</li></ul>
147 from which <a class="otjldlink" href="http://www.objectteams.org/def/1.3/s1.html#s1.5.e">OTJLD &sect;1.5(e)</a>
148 now selects <code>Team0.InnerTeamB.Role</code>, consistent with the above.
149 </p>
150 </td>
151 </tr>
152 <tr>
153 <td><p align="right"><b>Avoid role cache</b><br>
154 <span class="since">since&nbsp;0.8.0M6</span><br>
155 <a class="buglink" title="consider optimization by avoiding the role cache" href="https://bugs.eclipse.org/338582">338582</a></p></td>
156 <td><p>
157 It has been observed that maintaining a large number of roles in the team's internal cache may have significant
158 impact on program performance (observed at 100000 roles of one particular type).
159 A new means for fine tuning has been added for situations where role identity is irrelevant.
160 A role class may now be marked with <code>@Instantiation(ALWAYS)</code> meaning that each lifting operation for this role class
161 will immediately create a new role instance without consulting the role cache. In fact such roles will never be stored in
162 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>.
163 </p>
164 </td>
165 </tr>
Stephan Herrmann077bd2c2011-05-15 15:26:10 +0000166 <tr>
Stephan Herrmann0677b912011-06-03 09:20:36 +0000167 <td id="bug337413"><p align="right"><b>Dealing with lifting problems</b><br>
Stephan Herrmann077bd2c2011-05-15 15:26:10 +0000168 <span class="since">since&nbsp;2.0RC1</span><br>
169 <a class="buglink" title="consider changing LiftingFailedException to a checked exception" href="https://bugs.eclipse.org/337413">337413</a></p></td>
170 <td><p>Whenever lifting fails (due to a role binding ambiguity or an abstract relevant role) a <code>LiftingFailedException</code> is thrown
171 from the Object Teams runtime. This exception has now been changed to a checked exception to alert clients of problematic code
172 of the chance of failure. The consequences are defined in the new section
173 <a class="otjldlink" href="http://www.objectteams.org/def/1.3/s2.html#s2.3.5">OTJLD &sect;2.3.5</a>.
174 </p>
175 <p>The compiler now has two general ways to signal lifting problems:
176 <ul>
177 <li>Unhandled exception LiftingFailedException</code></li>
178 <li>Unsafe callin mapping, because lifting to role {0} may fail due to ...</li>
179 </ul>
180 <strong>If none of these messages are given, lifting can be assumed to be safe.</strong>
181 </p>
182 <p>Application code with lifting problems may choose from different strategies:
183 <ul>
184 <li>Avoid abstractness for bound roles:
185 <ul><li>Add method bodies which log the problem.<br/>
186 Benefit: unexpected situations will actually be detected.</li>
187 <li>Remove abstract methods and require clients to cast to a specific role type.<br/>
188 Benefit: client is now clearly repsonsible for dealing with potential <code>ClassCastException</code>
189 in cases where lifting produces an unexpected result.</li>
190 </ul></li>
191 <li>Team methods with declared lifting may choose to declare <code>LiftingFailedException</code><br/>
192 Benefit: client is alerted of the chance of failure, must handle unexpected situations.</li>
193 <li>Callin bindings with unsafe lifting may in special situations pass through using
194 <code>@SuppressWarnings("hidden-lifting-problem")</code><br/>
Stephan Herrmannb4517752011-05-19 15:34:59 +0000195 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 +0000196 the callin binding will not fire due to a lifting problem.</li>
197 <li>Revise the role hierarchy to avoid abstract relevant roles and potential binding ambiguities.</li>
198 </ul>
199 </p>
200 </td>
201 </tr>
Stephan Herrmann649fdb52011-05-15 14:12:16 +0000202 <tr><td colspan="2" id="compiler"><h2>Compiler</h2></td></tr>
203 <tr>
204 <td><p align="right"><b>Severity of write decapsulation</b><br>
205 <span class="since">since&nbsp;0.8.0M5</span><br>
206 <a class="buglink" title="separate tuning of severity of decapsulation in "set" callout-to-field" href="https://bugs.eclipse.org/335523">335523</a></p></td>
207 <td><p>When a role uses a callout <code class="keyword">set</code> to field with decapsulation this may be considered more severe
208 than a corresponding <code class="keyword">get</code> access. Therefor, the compiler now supports separate configurability for both
209 kinds of problems.
210 </p>
211 <p><img alt="Callouts to field with different severity" src="../images/screenshots/NN08/CalloutToFieldSeverity.png"></p>
212 <p></p>
213 </td>
214 </tr>
215
216<!--
217 <tr><td colspan="2" id="otre"><h2>Object Teams Runtime Environment</h2></td></tr>
218-->
219</table>
220</body>