Bug 1904

Summary: [Dialogs] SelectionDialog interface inconsistent (1GBWTFX)
Product: [Eclipse Project] Platform Reporter: Dirk Baeumer <dirk_baeumer>
Component: UIAssignee: Tod Creasey <Tod_Creasey>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 Keywords: investigate
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: Windows 2000   
Whiteboard:

Description Dirk Baeumer CLA 2001-10-10 22:21:57 EDT
The SelectionDialog interface is inconsistent. The public API is array based but the protected API is List based. This is really
	hard to program.


NOTES:
	RG (4/9/01 11:41:38 AM)
	The fields result and initialSelections should be of type object[] 
	(along with the return type of their accessors)
	This will be a breaking api change but the class was only made public in build 042.

EG (4/10/01 3:04:31 PM)
	it was public before (around 33). We are now duplicating the Workbench version of the SelectionDialog and
	this should not be required.

RG (4/16/01 5:39:10 PM)
	Awaiting approval to release API change

jeem (5/4/01 6:37:03 PM)
	There is a minor inconsistency in the API in one method: protected void setResult(List newResult).
It really should have been protected void setResult(Object[] newResult). SelectionDialog is allowed 
to have arbitrary subclasses which may call this method; a change of method signature would be a
breaking change for these clients. Since this inconsistency is an annoyance rather than a hinderance,
making this change would likely do more harm than good.

RG (5/7/01 9:16:10 AM)
	The other inconsistent method is 
		protected List getInitialSelections()getInitialSelections() 
	It returns a list even though the API to set the initial selections takes an array
		public void setInitialSelections(Object[] selectedElements)
	Although selection dialog will have subclasses that will be affected it only became officially public 
    in build 042 (it had the @private tag previously) so the number of people using it may be limited
   	at this point.
Comment 1 DJ Houghton CLA 2001-10-24 06:49:35 EDT
PRODUCT VERSION:
	0.042


Comment 2 Kevin Haaland CLA 2002-01-21 20:45:55 EST
There are no plans to change the current API. 
Comment 3 Randy Giffen CLA 2002-08-06 16:07:03 EDT
Reopened for investigation
Comment 4 Tod Creasey CLA 2002-08-20 13:27:29 EDT
The public interface is consistent - it takes and returns arrays of Objects. 
Making the internal representation a List was done for effeciencies sake. There 
are 30 references  in 2.0 to the List implementation so changing this now is of 
very little value and a lot of pain.