1 11 12 package com.bull.eclipse.jonas; 13 14 import java.util.Collection ; 15 16 import org.eclipse.jface.viewers.IStructuredContentProvider; 17 import org.eclipse.jface.viewers.Viewer; 18 19 23 public class ArrayContentProvider implements IStructuredContentProvider { 24 25 29 public Object [] getElements(Object inputElement) { 30 if (inputElement instanceof Object []) 31 return (Object []) inputElement; 32 if (inputElement instanceof Collection ) 33 return ((Collection ) inputElement).toArray(); 34 return new Object [0]; 35 } 36 37 40 public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { 41 } 42 43 46 public void dispose() { 47 } 48 } | Popular Tags |