Mercurial > projects > dwt-addons
diff dwtx/jface/fieldassist/ContentProposalAdapter.d @ 104:04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
These new wrappers now use the tango.util.containers instead of the tango.util.collections.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 07 Aug 2008 15:01:33 +0200 |
parents | 5df4896124c7 |
children | 862b05e0334a |
line wrap: on
line diff
--- a/dwtx/jface/fieldassist/ContentProposalAdapter.d Sun Aug 03 17:01:51 2008 +0200 +++ b/dwtx/jface/fieldassist/ContentProposalAdapter.d Thu Aug 07 15:01:33 2008 +0200 @@ -19,7 +19,6 @@ import dwtx.jface.fieldassist.IContentProposalListener; import dwtx.jface.fieldassist.IContentProposalListener2; -import tango.util.collection.ArraySeq; import dwt.DWT; import dwt.events.DisposeEvent; @@ -1048,17 +1047,18 @@ // Check each string for a match. Use the string displayed to the // user, not the proposal content. - auto list = new ArraySeq!(IContentProposal); + scope IContentProposal[] list = new IContentProposal[proposals.length]; + int idx = 0; for (int i = 0; i < proposals.length; i++) { String string = getString(proposals[i]); if (string.length >= filterString.length && string.substring(0, filterString.length) .equalsIgnoreCase(filterString)) { - list.append(proposals[i]); + list[idx++] = proposals[i]; } } - return list.toArray(); + return list[ 0 .. idx ].dup; } Listener getTargetControlListener() {