blob: c76a85050da02c532eb1ecfbefee47a2e1f62994 [file] [log] [blame]
Stephan Herrmann1ef20572013-05-28 16:13:42 +02001<!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.2 - New and Noteworthy</title>
7</head>
8<body>
9<h1>OTDT 2.2 - New and Noteworthy</h1>
10<div class="navigation">On this page:
11<!--a href="#metrics">&bull; Metrics Plug-in</a-->
12<!--a href="#configuration">&bull; Configuration</a-->
13<a href="#views">&bull; Views/Dialogs</a>
14<!--a href="#assist">&bull; Content Assist</a-->
15<a href="#refactor">&bull; Refactoring</a>
16<!--a href="#formatting">&bull; Formatting</a-->
17<!--a href="#debug">&bull; Run/Debug</a-->
18<a href="#language">&bull; Language</a>
19<!--a href="#api">&bull; API</a-->
20<!--a href="#compiler">&bull; Compiler</a-->
21<!--a href="#otre">&bull; Runtime</a-->
22<!--a href="#otequinox">&bull; OT/Equinox</a-->
23<!--a href="#releng">&bull; Release Engineering</a-->
24</div>
25<table cellpadding="10" cellspacing="0" width="100%">
26 <colgroup>
27 <col width="20%">
28 <col width="80%">
29 </colgroup>
30 <tbody>
31<!--
32 <tr><td colspan="2" id="NAME"><h2>HEADING</h2></td></tr>
33 <tr>
34 <td><p align="right"><b>DESC</b><br>
35 <span class="since">since&nbsp;0.7.1</span><br>
36 <a class="buglink" title="TITLE" href="https://bugs.eclipse.org/308029">308029</a></p></td>
37 <td><p>
38
39 </p>
40 <p><img alt="TEXT" src="../images/screenshots/NN07/.png"></p>
41 <p></p>
42 </td>
43 </tr>
44 <div class="listbox"><div class="listing"><pre><code class="keyword">public team class</code> <font color="blue">MyTeam</font> {
45}</pre></div></div>
46-->
47 <tr><td colspan="2" id="views"><h2>Views & Dialogs</h2></td></tr>
48 <tr>
49 <td><p align="right"><b>OT elements in structure compare</b><br>
50 <span class="since">since&nbsp;2.2</span><br>
51 <a class="buglink" title="[compare] show callin / callout elements in structure compare" href="https://bugs.eclipse.org/408460">408460</a></p></td>
52 <td>
53 <p>Object Teams elements are no properly displayed in structure comparisons of any compare editors.</p>
54 <img src="../images/screenshots/NN22/ot-elements-in-structure-compare.png"/>
55 </td>
56 </tr>
57<!--
58 <tr><td colspan="2" id="assist"><h2>Content assist</h2></td></tr>
59 <tr>
60 <td><p align="right"><b>HEADING</b><br>
61 <span class="since">since&nbsp;2.1M6</span><br>
62 <a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
63 <td><p>PARA</p>
64 </td>
65 </tr>
66 <tr><td colspan="2" id="formatting"><h2>Formatting</h2></td></tr>
67 <tr>
68 <td><p align="right"><b>HEADING</b><br>
69 <span class="since">since&nbsp;2.1M6</span><br>
70 <a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
71 <td><p>PARA</p>
72 </td>
73 </tr>
74-->
75 <tr><td colspan="2" id="refactor"><h2>Refactoring</h2></td></tr>
76 <tr>
77 <td><p align="right"><b>Pull-up callout bindings</b><br>
78 <span class="since">since&nbsp;2.2M1</span><br>
79 <a class="buglink" title="[refactoring] pull-up refactoring cannot handle callout bindings" href="https://bugs.eclipse.org/386587">386587</a><br>
80 <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>
81 <td><p>The pull-up refactoring has been made smarter so that it can correctly handle callout method bindings, too.</p>
82 <p>A callout binding can either be pulled-up as such or a corresponding abstract method can be created in ths super-role.</p>
83 <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>
84 <p>This is particularly interesting when pulling up a method that calls a callout:</p>
85 <p><b><u>Pull-up:</u></b></p>
86 <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 {
87 <code class="keyword">protected class</code> R0 <code class="keyword">playedBy</code> B {
88 }
89 <code class="keyword">protected class</code> R1 <code class="keyword">extends</code> R0 {
90 <code class="keyword">void</code> foo() -> <code class="keyword">void</code> bar();
91 <code class="keyword">void</code> test() {
92 foo();
93 }
94 }
95}</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 {
96 <code class="keyword">protected class</code> R0 <code class="keyword">playedBy</code> B {
97 <code class="keyword">void</code> foo() -> <code class="keyword">void</code> bar();
98 <code class="keyword">void</code> test() {
99 foo();
100 }
101 }
102 <code class="keyword">protected class</code> R1 <code class="keyword">extends</code> R0 {
103 }
104}</pre></div></div></div></p>
105 <p style="clear:both;"><b><u>Declare abstract:</u></b></p>
106 <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 {
107 <code class="keyword">protected class</code> R0 {
108 }
109 <code class="keyword">protected class</code> R1 <code class="keyword">extends</code> R0
110 <code class="keyword">playedBy</code> B {
111 <code class="keyword">void</code> foo() -> <code class="keyword">void</code> bar();
112 <code class="keyword">void</code> test() {
113 foo();
114 }
115 }
116}</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 {
117 <code class="keyword">protected abstract class</code> R0 {
118 <code class="keyword">abstract void</code> foo();
119 <code class="keyword">void</code> test() {
120 foo();
121 }
122 }
123 <code class="keyword">protected class</code> R1 <code class="keyword">extends</code> R0
124 <code class="keyword">playedBy</code> B {
125 <code class="keyword">void</code> foo() -> <code class="keyword">void</code> bar();
126 }
127}</pre></div></div></div></p>
128 <p style="clear:both;">
129 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>.
130 </p>
131 </td>
132 </tr>
133 <tr>
134 <td><p align="right"><b>Move to role file</b><br>
135 <span class="since">since&nbsp;2.2M7</span><br>
136 <a class="buglink" title="[refactoring] change inline role to role file and vice versa" href="https://bugs.eclipse.org/382186">382186</a></p></td>
137 <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>
138 <p>This refactoring is relevant when a team with inline roles grows to a size where maintainability suffers from a lack of decomposition.
139 Since teams typically start with only a few, small roles, it is natural that this issue arises only during evolution.
140 Re-organizing the file structure using this new refactoring is the natural answer to such issues.</p>
141 <p>By definition this refactoring does not change the semantics of a program. Still the following items are considered by the refactoring:</p>
142 <ul>
143 <li>Create the folder representing the team package, if necessary.</li>
144 <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,
145 and thus facilitates navigation (F3) and helps the compiler during incremental compilation.</li>
146 <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>
147 </ul>
148 <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>
149 </td>
150 </tr>
151 <tr><td colspan="2" id="language"><h2>Language</h2></td></tr>
152 <tr>
153 <td><p align="right"><b>Callin to Constructor</b><br>
154 <span class="since">since&nbsp;2.2</span><br>
155 <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>
156 <td>
157 <p>It is now possible to define a callin-after binding to a constructor of a role's base class:</p>
158 <p><div class="listbox" style="width:45%;margin-right:2px;float:left;"><div class="listing"><pre><code class="keyword">class</code> SomeBase {
159 SomeBase() {
160 <em class="comment">// ... body omitted</em>
161 }
162}
163<code class="keyword">public team class</code> T {
164 <code class="keyword">protected class</code> R <code class="keyword">playedBy</code> SomeBase {
165 <code class="keyword">void</code> test() <code class="keyword">&lt;- after</code> SomeBase();
166 <code class="keyword">void</code> test() {
167 <em class="comment">// ... body omitted</em>
168 }
169 }
170}</pre></div></div></p>
171 <p style="clear:both;">
172 Within the intercepting role method the base instance can be assumed to be fully initialized, and thus the role is fully
173 operational, e.g., in terms of calling callout-bound methods. It is for these reasons that <code class="keyword">before</code>
174 and <code class="keyword">replace</code> bindings are not allowed for constructors: the base instance wouldn't be accessible
175 and thus the role cannot yet be created at this point.
176 </p>
177 </td>
178 </tr>
179<!--
180
181 <tr><td colspan="2" id="debug"><h2>Run / Debug</h2></td></tr>
182 <tr>
183 <td><p align="right"><b>HEADING</b><br>
184 <span class="since">since&nbsp;2.1M6</span><br>
185 <a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
186 <td><p>PARA</p>
187 </td>
188 </tr>
189
190 <tr><td colspan="2" id="api"><h2>API</h2></td></tr>
191 <tr>
192 <td><p align="right"><b>HEADING</b><br>
193 <span class="since">since&nbsp;2.1M6</span><br>
194 <a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
195 <td><p>PARA</p>
196 </td>
197 </tr>
198
199 <tr><td colspan="2" id="compiler"><h2>Compiler</h2></td></tr>
200 <tr>
201 <td><p align="right"><b>HEADING</b><br>
202 <span class="since">since&nbsp;2.1M6</span><br>
203 <a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
204 <td><p>PARA</p>
205 </td>
206 </tr>
207
208
209 <tr><td colspan="2" id="otre"><h2>Object Teams Runtime Environment</h2></td></tr>
210 <tr>
211 <td><p align="right"><b>HEADING</b><br>
212 <span class="since">since&nbsp;2.1M6</span><br>
213 <a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
214 <td><p>PARA</p>
215 </td>
216 </tr>
217
218 <tr><td colspan="2" id="releng"><h2>Release Engineering</h2></td></tr>
219 <tr>
220 <td><p align="right"><b>HEADING</b><br>
221 <span class="since">since&nbsp;2.1M6</span><br>
222 <a class="buglink" title="TITLE" href="https://bugs.eclipse.org/301314">301314</a></p></td>
223 <td><p>PARA</p>
224 </td>
225 </tr>
226-->
227</table>
228</body>