blob: 2552c6ef02d9bd05aa4183e853e069c875a5ad24 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel=stylesheet type="text/css" href="../css/style.css">
<link rel=stylesheet type="text/css" href="../css/nn.css">
<title>OTDT 2.0.0 - New and Noteworthy</title>
</head>
<body>
<h1>OTDT 2.0.0 - New and Noteworthy</h1>
<div class="navigation"><i>Accumulating changes since the 0.7.1 Release - status: 2.0.0 RC1</i></div>
<div style="width:40%; padding:2px;background-color:#707070;"><div style="text-align:justify;background-color:#def4fe;padding:3px;">
Note, that milestones towards the 2.0.0 release where named 0.8.0M<i>x</i>.
The 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.
</div></div>
<div class="navigation">On this page:
<!--a href="#metrics">&bull; Metrics Plug-in</a-->
<!--a href="#configuration">&bull; Configuration</a-->
<a href="#views">&bull; Views/Dialogs</a>
<a href="#assist">&bull; Content Assist</a>
<a href="#refactor">&bull; Refactoring</a>
<!--a href="#formatting">&bull; Formatting</a>
<a href="#debug">&bull; Run/Debug</a-->
<a href="#language">&bull; Language</a>
<!--a href="#api">&bull; API</a-->
<a href="#compiler">&bull; Compiler</a>
<!--a href="#otre">&bull; Runtime</a>
<a href="#otequinox">&bull; OT/Equinox</a-->
</div>
<table cellpadding="10" cellspacing="0" width="100%">
<colgroup>
<col width="20%">
<col width="80%">
</colgroup>
<tbody>
<!--
<tr><td colspan="2" id="NAME"><h2>HEADING</h2></td></tr>
<tr>
<td><p align="right"><b>DESC</b><br>
<span class="since">since&nbsp;0.7.1</span><br>
<a class="buglink" title="TITLE" href="https://bugs.eclipse.org/308029">308029</a></p></td>
<td><p>
</p>
<p><img alt="TEXT" src="../images/screenshots/NN07/.png"></p>
<p></p>
</td>
</tr>
<div class="listbox"><div class="listing"><pre><code class="keyword">public team class</code> <font color="blue">MyTeam</font> {
}</pre></div></div>
-->
<tr><td colspan="2" id="views"><h2>Views & Dialogs</h2></td></tr>
<tr>
<td><p align="right"><b>Compiler preferences page cleaned up</b><br>
<span class="since">since&nbsp;0.8.0M5</span><br>
<a class="buglink" title="cleanup OT/J compiler preferences page" href="https://bugs.eclipse.org/335739">335739</a></p></td>
<td><p>The preference page for OT/J compiler options has be revamped following recent improvements in the JDT UI.
The page is now structured into expandable sections per group of problems.
Also incremental search within the tree of options is supported.
The option to disable "scoped keywords" was apparently never used and has been removed from the preferences.
</p>
<p><img alt="OT/J Compiler preferences" src="../images/screenshots/NN08/CompilerPreferences.png"></p>
<p></p>
</td>
</tr>
<tr><td colspan="2" id="assist"><h2>Content assist</h2></td></tr>
<tr>
<td><p align="right"><b>Create role method quickfix</b><br>
<span class="since">since&nbsp;0.8.0M4</span><br>
<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>
<td><p>If a role class has a callin binding whose left-hand side does not resolve to an existing role method
a quickfix exists for creating the missing role method.
Since 0.8.0M4 this quickfix respects the signature of the bound base method even if the callin binding does not declare any signatures
(see the <b>int</b> parameter and return in the screenshot below):
</p>
<p><img alt="Create Role Method Quickfix" src="../images/screenshots/NN08/CreateRoleMethodQuickfix.png"></p>
<p></p>
</td>
</tr>
<tr><td colspan="2" id="refactor"><h2>Refactoring</h2></td></tr>
<tr>
<td><p align="right"><b>Extract role interface</b><br>
<span class="since">since&nbsp;0.8.0M6</span><br>
<a class="buglink" title="extract interface on a role should create a role interface" href="https://bugs.eclipse.org/339264">339264</a></p></td>
<td><p>A new option has been added to the Extract Interface refactoring:
If the enclosing class is a role class a new check box appears:
</p>
<p><img alt="Extract as role interface checkbox" src="../images/screenshots/NN08/ExtractInterface1.png"></p>
<p>If this box is checked the new interface will not be created as a top-level type (as normally done by the JDT),
but as a role interface of the current enclosing team.</p>
<p><img alt="Extract as role interface preview" src="../images/screenshots/NN08/ExtractInterface2.png"></p>
<p>The refactored result looks like this</p>
<p><img alt="Extract as role interface result" src="../images/screenshots/NN08/ExtractInterface3.png"></p>
</td>
</tr>
<!--
<tr><td colspan="2" id="debug"><h2>Run / Debug</h2></td></tr>
<tr><td colspan="2" id="api"><h2>API</h2></td></tr>
-->
</tr> <tr><td colspan="2" id="language"><h2>Language</h2></td></tr>
<tr>
<td><p align="right"><b>Precedence among tsupers</b><br>
<span class="since">since&nbsp;0.8.0M3</span><br>
<a class="buglink" title="[compiler] implement changed precedence among different tsupers" href="https://bugs.eclipse.org/326969">326969</a></p></td>
<td><p>
Previously, <a class="otjldlink" href="http://www.objectteams.org/def/1.3/s1.html#s1.5.e">OTJLD &sect;1.5(e)</a>
was inconsistent between its first and second sentences.
The first sentence defines the general precendence between <code class="keyword">super</code> and <code class="keyword">tsuper</code>,
which will remain unchanged.
However, the precendence among different tsupers has been adjusted as demonstrated using this example:
<div class="listbox"><div class="listing"><pre><code class="keyword">public team class</code> <font color="blue">Team0</font> {
<code class="keyword">protected team class</code> <font color="darkblue">InnerTeamA</font> {
<code class="keyword">protected class</code> <b>Role</b> {
<code class="keyword">public void</code> rm() { ... }
}
<code class="keyword">public void</code> tm() { ... }
}
<code class="keyword">protected team class</code> InnerTeamB <code class="keyword">extends</code> <font color="darkblue">InnerTeamA</font> {
<code class="keyword">protected class</code> <b>Role</b> {
<code class="keyword">public void</code> rm() { ... }
}
<code class="keyword">public void</code> tm() { ... }
}
}
<code class="keyword">public team class</code> <font color="blue">Team1 <code class="keyword">extends</code> Team0</font> {
<code class="keyword">protected team class</code> <font color="darkblue">InnerTeamA</font> {
<code class="keyword">protected class</code> <b>Role</b> {
<code class="keyword">public void</code> rm() { ... }
}
<code class="keyword">public void</code> tm() { ... }
}
<code class="keyword">protected team class</code> <font color="darkblue">InnerTeamB</font> <code class="keyword">extends</code> <font color="darkblue">InnerTeamA</font> {
<font color="green">// details inherited from Team1.InnerTeamA and Team0.InnerTeamB</font>
}
}
</pre></div></div>
When invoking <code>tm()</code> on an instance of <code>Team1.InnerTeamB</code> two implementation are
candidates for execution:<ul>
<li><code>Team1.InnerTeamA.tm()</code></li>
<li><code>Team0.InnerTeamB.tm()</code>,</li></ul>
from which <a class="otjldlink" href="http://www.objectteams.org/def/1.3/s1.html#s1.5.e">OTJLD &sect;1.5(e)</a>
selects <code>Team0.InnerTeamB</code>.<br />
Correspondingly, when invoking <code>rm()</code> on an instance of <code>Team1.InnerTeamB.R</code> two implementation are
candidates for execution:<ul>
<li><code>Team1.InnerTeamA.Role.rm()</code></li>
<li><code>Team0.InnerTeamB.Role.rm()</code>,</li></ul>
from which <a class="otjldlink" href="http://www.objectteams.org/def/1.3/s1.html#s1.5.e">OTJLD &sect;1.5(e)</a>
now selects <code>Team0.InnerTeamB.Role</code>, consistent with the above.
</p>
</td>
</tr>
<tr>
<td><p align="right"><b>Avoid role cache</b><br>
<span class="since">since&nbsp;0.8.0M6</span><br>
<a class="buglink" title="consider optimization by avoiding the role cache" href="https://bugs.eclipse.org/338582">338582</a></p></td>
<td><p>
It has been observed that maintaining a large number of roles in the team's internal cache may have significant
impact on program performance (observed at 100000 roles of one particular type).
A new means for fine tuning has been added for situations where role identity is irrelevant.
A role class may now be marked with <code>@Instantiation(ALWAYS)</code> meaning that each lifting operation for this role class
will immediately create a new role instance without consulting the role cache. In fact such roles will never be stored in
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>.
</p>
</td>
</tr>
<tr>
<td><p align="right"><b>Dealing with lifting problems</b><br>
<span class="since">since&nbsp;2.0RC1</span><br>
<a class="buglink" title="consider changing LiftingFailedException to a checked exception" href="https://bugs.eclipse.org/337413">337413</a></p></td>
<td><p>Whenever lifting fails (due to a role binding ambiguity or an abstract relevant role) a <code>LiftingFailedException</code> is thrown
from the Object Teams runtime. This exception has now been changed to a checked exception to alert clients of problematic code
of the chance of failure. The consequences are defined in the new section
<a class="otjldlink" href="http://www.objectteams.org/def/1.3/s2.html#s2.3.5">OTJLD &sect;2.3.5</a>.
</p>
<p>The compiler now has two general ways to signal lifting problems:
<ul>
<li>Unhandled exception LiftingFailedException</code></li>
<li>Unsafe callin mapping, because lifting to role {0} may fail due to ...</li>
</ul>
<strong>If none of these messages are given, lifting can be assumed to be safe.</strong>
</p>
<p>Application code with lifting problems may choose from different strategies:
<ul>
<li>Avoid abstractness for bound roles:
<ul><li>Add method bodies which log the problem.<br/>
Benefit: unexpected situations will actually be detected.</li>
<li>Remove abstract methods and require clients to cast to a specific role type.<br/>
Benefit: client is now clearly repsonsible for dealing with potential <code>ClassCastException</code>
in cases where lifting produces an unexpected result.</li>
</ul></li>
<li>Team methods with declared lifting may choose to declare <code>LiftingFailedException</code><br/>
Benefit: client is alerted of the chance of failure, must handle unexpected situations.</li>
<li>Callin bindings with unsafe lifting may in special situations pass through using
<code>@SuppressWarnings("hidden-lifting-problem")</code><br/>
Benefit: owner of the role has to explicitly assert that s/he is aware of the chance that
the callin binding will not fire due to a lifting problem.</li>
<li>Revise the role hierarchy to avoid abstract relevant roles and potential binding ambiguities.</li>
</ul>
</p>
</td>
</tr>
<tr><td colspan="2" id="compiler"><h2>Compiler</h2></td></tr>
<tr>
<td><p align="right"><b>Severity of write decapsulation</b><br>
<span class="since">since&nbsp;0.8.0M5</span><br>
<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>
<td><p>When a role uses a callout <code class="keyword">set</code> to field with decapsulation this may be considered more severe
than a corresponding <code class="keyword">get</code> access. Therefor, the compiler now supports separate configurability for both
kinds of problems.
</p>
<p><img alt="Callouts to field with different severity" src="../images/screenshots/NN08/CalloutToFieldSeverity.png"></p>
<p></p>
</td>
</tr>
<!--
<tr><td colspan="2" id="otre"><h2>Object Teams Runtime Environment</h2></td></tr>
-->
</table>
</body>