Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322898 - [hierarchy] revive and adjust traditional type hierarchy for OT/J
Summary: [hierarchy] revive and adjust traditional type hierarchy for OT/J
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTDT (show other bugs)
Version: 0.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.7.1   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2010-08-17 08:55 EDT by Stephan Herrmann CLA
Modified: 2010-09-23 12:34 EDT (History)
0 users

See Also:


Attachments
proposed implementation (16.43 KB, patch)
2010-08-17 12:50 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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