changeset 74:dad2e11b8ae4

Make ArrayContentProvider a template for the arrays element type.
author Frank Benoit <benoit@tionex.de>
date Thu, 22 May 2008 20:08:10 +0200
parents 6787ae179808
children 5d489b9f966c
files dwtx/jface/viewers/ArrayContentProvider.d
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/dwtx/jface/viewers/ArrayContentProvider.d	Thu May 22 19:09:48 2008 +0200
+++ b/dwtx/jface/viewers/ArrayContentProvider.d	Thu May 22 20:08:10 2008 +0200
@@ -29,17 +29,17 @@
  *
  * @since 2.1
  */
-public class ArrayContentProvider : IStructuredContentProvider {
+public class ArrayContentProvider(T) : IStructuredContentProvider {
 
     /**
      * Returns the elements in the input, which must be either an array or a
      * <code>Collection</code>.
      */
     public Object[] getElements(Object inputElement) {
-        if ( auto aw = cast(ArrayWrapperObject) inputElement ) {
+        if ( auto aw = cast(ArrayWrapperT!(T)) inputElement ) {
             return aw.array;
         }
-        if ( auto col = cast(View!(Object)) inputElement ) {
+        if ( auto col = cast(View!(T)) inputElement ) {
             return col.toArray();
         }
         return null;