blob: ee26b38f283815c3b9527f1b8de7437223e75928 [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.2 - New and Noteworthy</title>
</head>
<body>
<h1>OTDT 2.2 - New and Noteworthy</h1>
<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-->
<!--a href="#releng">&bull; Release Engineering</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>OT elements in structure compare</b><br>
<span class="since">since&nbsp;2.2</span><br>
<a class="buglink" title="[compare] show callin / callout elements in structure compare" href="https://bugs.eclipse.org/408460">408460</a></p></td>
<td>
<p>Object Teams elements are now properly displayed in structure comparisons of any compare editors.</p>
<img src="../images/screenshots/NN22/ot-elements-in-structure-compare.png"/>
</td>
</tr>
<!--
<tr><td colspan="2" id="assist"><h2>Content assist</h2></td></tr>
<tr>
<td><p align="right"><b>HEADING</b><br>
<span class="since">since&nbsp;2.1M6</span><br>
<a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
<td><p>PARA</p>
</td>
</tr>
<tr><td colspan="2" id="formatting"><h2>Formatting</h2></td></tr>
<tr>
<td><p align="right"><b>HEADING</b><br>
<span class="since">since&nbsp;2.1M6</span><br>
<a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
<td><p>PARA</p>
</td>
</tr>
-->
<tr><td colspan="2" id="refactor"><h2>Refactoring</h2></td></tr>
<tr>
<td><p align="right"><b>Pull-up callout bindings</b><br>
<span class="since">since&nbsp;2.2M1</span><br>
<a class="buglink" title="[refactoring] pull-up refactoring cannot handle callout bindings" href="https://bugs.eclipse.org/386587">386587</a><br>
<a class="buglink" title="[refactoring] pull-up should distinguish callouts that can be pull-up vs. abstract decl." href="https://bugs.eclipse.org/386814">386814</a></p></td>
<td><p>The pull-up refactoring has been made smarter so that it can correctly handle callout method bindings, too.</p>
<p>A callout binding can either be pulled-up as such or a corresponding abstract method can be created in ths super-role.</p>
<p>When choosing among the above strategies in the wizard, pull-up will only be accepted if a super-role has a compatible <code class="keyword">playedBy</code> binding.</p>
<p>This is particularly interesting when pulling up a method that calls a callout:</p>
<p><b><u>Pull-up:</u></b></p>
<p><div style="position:relative;"><div class="listbox" style="width:45%;margin-right:2px;margin-bottom:30px;float:left;"><div class="listing"><pre><code class="keyword">public team class</code> T {
<code class="keyword">protected class</code> R0 <code class="keyword">playedBy</code> B {
}
<code class="keyword">protected class</code> R1 <code class="keyword">extends</code> R0 {
<code class="keyword">void</code> foo() -> <code class="keyword">void</code> bar();
<code class="keyword">void</code> test() {
foo();
}
}
}</pre></div></div><div style="margin-top:80px;float:left;">=></div><div class="listbox" style="width:45%;margin-right:2px;float:left;"><div class="listing"><pre><code class="keyword">public team class</code> T {
<code class="keyword">protected class</code> R0 <code class="keyword">playedBy</code> B {
<code class="keyword">void</code> foo() -> <code class="keyword">void</code> bar();
<code class="keyword">void</code> test() {
foo();
}
}
<code class="keyword">protected class</code> R1 <code class="keyword">extends</code> R0 {
}
}</pre></div></div></div></p>
<p style="clear:both;"><b><u>Declare abstract:</u></b></p>
<p><div style="position:relative;"><div class="listbox" style="width:45%;margin-right:2px;margin-bottom:30px;float:left;"><div class="listing"><pre><code class="keyword">public team class</code> T {
<code class="keyword">protected class</code> R0 {
}
<code class="keyword">protected class</code> R1 <code class="keyword">extends</code> R0
<code class="keyword">playedBy</code> B {
<code class="keyword">void</code> foo() -> <code class="keyword">void</code> bar();
<code class="keyword">void</code> test() {
foo();
}
}
}</pre></div></div><div style="margin-top:80px;float:left;">=></div><div class="listbox" style="width:45%;margin-right:2px;float:left;"><div class="listing"><pre><code class="keyword">public team class</code> T {
<code class="keyword">protected abstract class</code> R0 {
<code class="keyword">abstract void</code> foo();
<code class="keyword">void</code> test() {
foo();
}
}
<code class="keyword">protected class</code> R1 <code class="keyword">extends</code> R0
<code class="keyword">playedBy</code> B {
<code class="keyword">void</code> foo() -> <code class="keyword">void</code> bar();
}
}</pre></div></div></div></p>
<p style="clear:both;">
In the latter example you see that <code>test()</code> can be successfully pulled up, although no implementation for <code>foo()</code> is available in the super role <code>R0</code>.
</p>
</td>
</tr>
<tr>
<td><p align="right"><b>Move to role file</b><br>
<span class="since">since&nbsp;2.2M7</span><br>
<a class="buglink" title="[refactoring] change inline role to role file and vice versa" href="https://bugs.eclipse.org/382186">382186</a></p></td>
<td><p>A new refactoring has been added to move an inline role to a new role file (see <a class="otjldlink" href="http://www.objectteams.org/def/1.3/s1.html#s1.2.5">OTJLD &sect;1.2.5</a>).</p>
<p>This refactoring is relevant when a team with inline roles grows to a size where maintainability suffers from a lack of decomposition.
Since teams typically start with only a few, small roles, it is natural that this issue arises only during evolution.
Re-organizing the file structure using this new refactoring is the natural answer to such issues.</p>
<p>By definition this refactoring does not change the semantics of a program. Still the following items are considered by the refactoring:</p>
<ul>
<li>Create the folder representing the team package, if necessary.</li>
<li>Insert a <code>@role</code> javadoc tag into the team class. This serves as an index of role files logically contained in a team,
and thus facilitates navigation (F3) and helps the compiler during incremental compilation.</li>
<li>Try to identify comments before and after the role class which likely belong to the role class and thus should be moved to the new file, too.</li>
</ul>
<p>The refactoring is invoked via the <b>Refactor</b> menu or context menu as <b>Move to Role File</b>. No further input is needed.</p>
</td>
</tr>
<tr><td colspan="2" id="language"><h2>Language</h2></td></tr>
<tr>
<td><p align="right"><b>Callin to Constructor</b><br>
<span class="since">since&nbsp;2.2</span><br>
<a class="buglink" title="[compiler][otre] OT/J: support for callin-interception of constructor-calls" href="https://bugs.eclipse.org/316616">316616</a></p></td>
<td>
<p>It is now possible to define a callin-after binding to a constructor of a role's base class:</p>
<p><div class="listbox" style="margin-right:2px;float:left;"><div class="listing"><pre><code class="keyword">class</code> SomeBase {
SomeBase() {
<em class="comment">// ... body omitted</em>
}
}
<code class="keyword">public team class</code> T {
<code class="keyword">protected class</code> R <code class="keyword">playedBy</code> SomeBase {
<code class="keyword">void</code> test() <code class="keyword">&lt;- after</code> SomeBase();
<code class="keyword">void</code> test() {
<em class="comment">// ... body omitted</em>
}
}
}</pre></div></div></p>
<p style="clear:both;">
Within the intercepting role method the base instance can be assumed to be fully initialized, and thus the role is fully
operational, e.g., in terms of calling callout-bound methods. It is for these reasons that <code class="keyword">before</code>
and <code class="keyword">replace</code> bindings are not allowed for constructors: the base instance wouldn't be accessible
and thus the role cannot yet be created at this point.
</p>
</td>
</tr>
<!--
<tr><td colspan="2" id="debug"><h2>Run / Debug</h2></td></tr>
<tr>
<td><p align="right"><b>HEADING</b><br>
<span class="since">since&nbsp;2.1M6</span><br>
<a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
<td><p>PARA</p>
</td>
</tr>
<tr><td colspan="2" id="api"><h2>API</h2></td></tr>
<tr>
<td><p align="right"><b>HEADING</b><br>
<span class="since">since&nbsp;2.1M6</span><br>
<a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
<td><p>PARA</p>
</td>
</tr>
<tr><td colspan="2" id="compiler"><h2>Compiler</h2></td></tr>
<tr>
<td><p align="right"><b>HEADING</b><br>
<span class="since">since&nbsp;2.1M6</span><br>
<a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
<td><p>PARA</p>
</td>
</tr>
<tr><td colspan="2" id="otre"><h2>Object Teams Runtime Environment</h2></td></tr>
<tr>
<td><p align="right"><b>HEADING</b><br>
<span class="since">since&nbsp;2.1M6</span><br>
<a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
<td><p>PARA</p>
</td>
</tr>
<tr><td colspan="2" id="releng"><h2>Release Engineering</h2></td></tr>
<tr>
<td><p align="right"><b>HEADING</b><br>
<span class="since">since&nbsp;2.1M6</span><br>
<a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
<td><p>PARA</p>
</td>
</tr>
-->
</table>
</body>