Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322898

Summary: [hierarchy] revive and adjust traditional type hierarchy for OT/J
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTDTAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: noteworthy
Version: 0.7   
Target Milestone: 0.7.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
proposed implementation none

Description Stephan Herrmann CLA 2010-08-17 08:55:29 EDT
Prior to bug 321411 the "traditional" two-way mode of the type hierarchy view did not work for OT/J because it relies on a meaningful implementation of getSuperclass(), which did not exist for roles with multiple superclasses.

As bug 321411 is now fixed, we should re-enable the traditional mode and adjust it to give a best possible rendering of OT/J hierarchies. While the part below the focus type gives the same rendering as the subtypes mode, the up-chain from the focus type to java.lang.Object should visualize the actual superclass linearization.
Comment 1 Stephan Herrmann CLA 2010-08-17 12:50:16 EDT
Created attachment 176812 [details]
proposed implementation

Re-enabling the traditional mode was already committed in bug 321411, this patch provides the following:

* ensure HierarchyResolver reaches STATE_ROLES_LINKED: links for explicit
  inheritance were not properly copied to the interface part.

* provide special API in OTTypeHierarchies that acts differently above vs.
  below the focus type: only above it traverses the getSuperclass() linearized
  chain using the result for answering a single subclass of the given type.
  This solves the issue that linearization is only implemented bottom-to-top
  whereas the hierarchy view needs to create its tree top-to-bottom.

* hook the new functionality into the TraditionalHierarchyContentProvider

Patch also includes a few tests.
Comment 2 Stephan Herrmann CLA 2010-08-21 17:11:20 EDT
Fix works fine in real-world usage, closing.
Comment 3 Stephan Herrmann CLA 2010-09-23 12:34:21 EDT
Verified using I201009211735