Ticket #216 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

Decorate icon of bound roles

Reported by: stephan Owned by: stephan
Priority: major Milestone: OTDT_1.2.8
Component: jdt.ui.adaptor Version: 1.2.7
Keywords: Cc:

Description

It would be great if a label decoration would show if a role is bound to (playedBy) a base class. This decoration should be placed in the upper-right of the icon: this corner normally holds the static decoration which is not applicable to roles anyway.

Attachments

role-decorations.png Download (6.3 KB) - added by stephan 4 years ago.
Screenshot of corrected feature (no longer shows "implements" decoration)

Change History

Changed 4 years ago by stephan

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to OTDT_1.2.8

Implemented in r19731 as shown in this snapshot (note, that Company is an unbound role):

Screenshot of corrected feature (no longer shows "implements" decoration)

Further note that the abstract decoration ("A") also applies to roles and also occupies the upper right corner. In outline and other views this looks OK, in the package explorer a double decoration for bound abstract roles looks crowded, but that's the way the package explorer works for other combinations, too.

Changed 4 years ago by stephan

r19738 extends the solution to apply to binary types, too.

The implementation uses the CallinRoleBaseBindings attribute while initializing all roles from the InnerInfo of their enclosing team.

  • ClassFileReader stores a map role->base
  • ClassFileInfo fetches base class name and pipes it into OTModelManager.addType()
  • lookup of a BinaryRoleType's baseclass directly finds the !IType in the project using the stored qualified name
  • RoleType also prepares for reading anchored base types from binary (not yet tested)

Changed 4 years ago by stephan

Further improvements from r19743:

  • avoid clash between bits used for ViewAdaptor.BOUND_ROLE and JavaElementImageDescriptor.OVERRIDES
  • make decoration configurable via preference (see also #220).

Changed 4 years ago by stephan

Screenshot of corrected feature (no longer shows "implements" decoration)

Note: See TracTickets for help on using tickets.