Community
Participate
Working Groups
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.
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.
Fix works fine in real-world usage, closing.
Verified using I201009211735