Ticket #220 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Support override markers/indicators for role classes

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

Description

(spawning from #176):

When a role class overrides a role from its team's super-team this should be visualized in the tools just like method overriding is shown:

  • outline and similar views should add an override indicator (overlay) to the role's icon
  • the editor should show override markers supporting the "Open super implementation" action.

Attachments

multiple-role-decorations.png Download (52.1 KB) - added by stephan 3 years ago.
Screenshot showing multiple role decorations

Change History

Changed 3 years ago by stephan

  • status changed from new to accepted
  • milestone set to OTDT_1.2.8

r19740 implements the core part for checking whether a role has one or more tsuper roles.

  • IRoleType / RoleType implement a new method getTSuperRoles() and if this finds any, that fact is recorded by setting AccOverriding
  • the compiler part is about retrieving AccOverriding from the corresponding bit in OT_CLASS_FLAGS

Changed 3 years ago by stephan

Screenshot showing multiple role decorations

Changed 3 years ago by stephan

  • status changed from accepted to closed
  • resolution set to fixed

Implemented in r19743:

  • Define a new decorations via extension point org.eclipse.ui.decorators, use a dummy implementation, because the ViewAdaptor already implements the decoration, all we need is to register decorations for the preferences.
  • ViewAdaptor uses AccOverriding (first priority because lightweight) or IRoleType.getTSuperRoles() to determin overriding.

Here's a screenshot showing off several decorations:

Screenshot showing multiple role decorations

  • roles Subscriber and Item have both an override and a bound-role decoration
  • role FlightItem only has the bound-role decoration
  • decorations are shown in the outline and also in the breadcrumbs
  • the vertical rules shows override annotations for Subscriber and Item
  • hover on such annotations says: "overrides bonussystem.Bonus.Item"

Not shown in the screenshot: the context menu on the vertical ruler offers the "Open super implementation" action, which in this case takes you directly to the overridden role "bonussystem.Bonus.Item".

Note: See TracTickets for help on using tickets.