Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353669 - Support functions of arrays
Summary: Support functions of arrays
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Matt Heitz CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-02 16:35 EDT by Matt Heitz CLA
Modified: 2017-02-23 14:17 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.