Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353669

Summary: Support functions of arrays
Product: z_Archived Reporter: Matt Heitz <mheitz>
Component: EDTAssignee: Matt Heitz <mheitz>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Matt Heitz CLA 2011-08-02 16:35:26 EDT
Support functions of arrays
Comment 1 Matt Heitz CLA 2011-08-31 23:02:41 EDT
I was just poking around in EglList while fixing Bug 356378.  I corrected a few other mistakes.  Haven't tested much yet.

There's a TODO comment in the resize method and I don't know how to solve it.
Comment 2 Matt Heitz CLA 2011-09-02 10:43:50 EDT
The problem in resize is that we don't have a way to create new elements when the new size is larger than the current size.

The solution is to pass in an object which we can use to create new elements.  A Class object might work (call newInstance).  The object will be null if the array's element type is nullable, since elements are initially null.
Comment 3 Matt Heitz CLA 2011-09-12 12:15:52 EDT
I changed ListTypeTemplate and EglList.  The resize method and EglList constructor are now passed a Class object which is used to make new elements when necessary.
Comment 4 Matt Heitz CLA 2011-09-14 15:10:22 EDT
Closing.