1 5 package com.nightlabs.base.entitylist; 6 7 import java.util.ArrayList ; 8 import java.util.Collection ; 9 10 import org.eclipse.jface.viewers.IStructuredContentProvider; 11 import org.eclipse.jface.viewers.Viewer; 12 13 17 public class EntityListContentProvider implements IStructuredContentProvider 18 { 19 20 public Object [] getElements(Object inputElement) 21 { 22 if(inputElement instanceof Collection ) 23 { 24 ArrayList arr = new ArrayList ((Collection )inputElement); 25 return arr.toArray(); 26 } 27 return null; 28 } 29 30 public void dispose() 31 { 32 } 33 34 public void inputChanged(Viewer viewer, Object oldInput, Object newInput) 35 { 36 } 37 38 } 39 | Popular Tags |