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