diff dwtx/jface/fieldassist/SimpleContentProposalProvider.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 46a6e0e6ccd4
children
line wrap: on
line diff
--- a/dwtx/jface/fieldassist/SimpleContentProposalProvider.d	Sun Aug 03 17:01:51 2008 +0200
+++ b/dwtx/jface/fieldassist/SimpleContentProposalProvider.d	Thu Aug 07 15:01:33 2008 +0200
@@ -16,9 +16,9 @@
 import dwtx.jface.fieldassist.IContentProposalProvider;
 import dwtx.jface.fieldassist.IContentProposal;
 
-import tango.util.collection.ArraySeq;
 
 import dwt.dwthelper.utils;
+import dwtx.dwtxhelper.Collection;
 
 /**
  * SimpleContentProposalProvider is a class designed to map a static list of
@@ -61,7 +61,7 @@
 
     /**
      * Return an array of Objects representing the valid content proposals for a
-     * field. 
+     * field.
      *
      * @param contents
      *            the current contents of the field (only consulted if filtering
@@ -73,15 +73,15 @@
      */
     public IContentProposal[] getProposals(String contents, int position) {
         if (filterProposals) {
-            auto list = new ArraySeq!(IContentProposal);
+            ArrayList list = new ArrayList();
             for (int i = 0; i < proposals.length; i++) {
                 if (proposals[i].length >= contents.length
                         && proposals[i].substring(0, contents.length)
                                 .equalsIgnoreCase(contents)) {
-                    list.append(makeContentProposal(proposals[i]));
+                    list.add(cast(Object)makeContentProposal(proposals[i]));
                 }
             }
-            return list.toArray();
+            return arraycast!(IContentProposal)(list.toArray());
         }
         if (contentProposals is null) {
             contentProposals = new IContentProposal[proposals.length];