Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 151644 - Create a common interface between Table and Tree
Summary: Create a common interface between Table and Tree
Status: RESOLVED DUPLICATE of bug 4394
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-24 17:21 EDT by Chris Gross CLA
Modified: 2006-10-03 11:11 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Gross CLA 2006-07-24 17:21:25 EDT
Create a common interface between Table-Tree, TableItem-TreeItem, TableColumn-TreeColumn to allow classes to work against either widget.  This will allow for simplification of the JFace viewers.  It will also allow the Nebula Grid to implement the same interfaces and utilize the viewers as well.

See bug 149193.
Comment 1 Boris Bokowski CLA 2006-07-26 18:44:06 EDT
Could abstract classes be used rather than interfaces?
Comment 2 Chris Gross CLA 2006-07-27 08:28:14 EDT
I'm assuming you want to avoid the problem of brittle interfaces?  i.e. interface2, interface3, etc...

An abstract class is ok as long as its design doesn't preclude a class other than Table or Tree extending it.  
Comment 3 Grant Gayed CLA 2006-08-03 12:05:57 EDT
This has come up before and the consensus has been to not add such interfaces to swt.  SN if anything has changed here then please reopen this report.  In the meantime marking as a duplicate.


*** This bug has been marked as a duplicate of 4394 ***
Comment 4 Steve Northover CLA 2006-08-04 19:03:29 EDT
We may yet to do this with an abstact class.  We wouldn't do this with an interface for reasons that go beyond the scope of this bug report.  There is a move afoot to add a Header and HeaderItem class (but this is waiting on the 3.3 plan).  It's possible that TableColumn and TreeColumn would be subclasses of this.
Comment 5 Chris Gross CLA 2006-08-04 19:37:28 EDT
<voice type="Homer Simpson>wahoo!</voice>

btw, I would be interested to hear the reasoning behind avoiding interfaces out of curiousity (brittle? added complexity for little gain? having to enforce exact behavior between classes?).  Maybe it could be a blog post.