Bug 258907

Summary: [Structure Compare] StructureDiffViewer should allow subclassing
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: igor.burilo, jtk499, markus.kell.r, pawel.pogorzelski1, Szymon.Brandys, tomasz.zarna
Version: 3.5Keywords: api, investigate
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: fix candidate
Attachments:
Description Flags
Fix v01 none

Description Dani Megert CLA 2008-12-16 04:52:15 EST
3.5 M4.

In order to allow clients to contribute a structure diff viewer Compare should allow to extend StructureDiffViewer. Currently JDT and PDE already illegally do this.

Rewriting or copying what's in StructureDiffViewer is not a good option.
Comment 1 Dani Megert CLA 2009-01-29 09:26:26 EST
Can you target this for M6 (API freeze)?
Comment 2 Tomasz Zarna CLA 2009-01-29 10:56:03 EST
Created attachment 124157 [details]
Fix v01
Comment 3 Tomasz Zarna CLA 2009-03-10 11:42:39 EDT
The latest news: PDE no longer illegally extends StructureDiffViewer, see bug 267878.
Comment 4 Pawel Pogorzelski CLA 2010-04-19 07:36:01 EDT
Moving to 3.7 as we missed API freeze.
Comment 5 Dani Megert CLA 2011-03-01 02:58:59 EST
Ping! I guess it's getting late again? ;-)
Comment 6 Szymon Brandys CLA 2011-03-07 06:27:26 EST
Couldn't JDT apply a similar fix as PDE did? I wonder what the limitations are in the current API.
Comment 7 Markus Keller CLA 2011-03-07 08:21:37 EST
I talked to Szymon: StructureDiffViewer extends DiffTreeViewer, which illegally extends TreeViewer. As long as TreeViewer is @noextend (bug 232268), it would be problematic to make StructureDiffViewer subclassable.

I quickly looked at JavaStructureDiffViewer, and some of the things we do there could also be written differently, so that we just configure a plain StructureDiffViewer instance from the outside.

AFAIK, we haven't tried to get rid of JavaStructureDiffViewer yet, and we currently don't know what APIs would be missing to achieve this. I'm taking this bug back to JDT/UI for now.