OTDT 0.8.0 (Incubation) - New and Noteworthy

Views & Dialogs

Compiler preferences page cleaned up
since 0.8.0M5
335739

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.

OT/J Compiler preferences

Content assist

Create role method quickfix
since 0.8.0M4
329988

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 int parameter and return in the screenshot below):

Create Role Method Quickfix

Refactoring

Extract role interface
since 0.8.0M6
339264

A new option has been added to the Extract Interface refactoring: If the enclosing class is a role class a new check box appears:

Extract as role interface checkbox

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.

Extract as role interface preview

The refactored result looks like this

Extract as role interface result

Language

Precedence among tsupers
since 0.8.0M3
326969

Previously, OTJLD §1.5(e) was inconsistent between its first and second sentences. The first sentence defines the general precendence between super and tsuper, which will remain unchanged. However, the precendence among different tsupers has been adjusted as demonstrated using this example:

public team class Team0 {
   protected team class InnerTeamA {
       protected class Role {
           public void rm() { ... }
       }
       public void tm() { ... }
   }
   protected team class InnerTeamB extends InnerTeamA {
       protected class Role {
           public void rm() { ... }
       }
       public void tm() { ... }
   }
}
public team class Team1 extends Team0 {
   protected team class InnerTeamA {
       protected class Role {
           public void rm() { ... }
       }
       public void tm() { ... }
   }
   protected team class InnerTeamB extends InnerTeamA {
       // details inherited from Team1.InnerTeamA and Team0.InnerTeamB
   }
}
When invoking tm() on an instance of Team1.InnerTeamB two implementation are candidates for execution:
  • Team1.InnerTeamA.tm()
  • Team0.InnerTeamB.tm(),
from which OTJLD §1.5(e) selects Team0.InnerTeamB.
Correspondingly, when invoking rm() on an instance of Team1.InnerTeamB.R two implementation are candidates for execution:
  • Team1.InnerTeamA.Role.rm()
  • Team0.InnerTeamB.Role.rm(),
from which OTJLD §1.5(e) now selects Team0.InnerTeamB.Role, consistent with the above.

Compiler

Severity of write decapsulation
since 0.8.0M5
335523

When a role uses a callout set to field with decapsulation this may be considered more severe than a corresponding get access. Therefor, the compiler now supports separate configurability for both kinds of problems.

Callouts to field with different severity