1 11 package org.eclipse.ui.internal.activities.ws; 12 13 import java.util.Collection ; 14 15 import org.eclipse.jface.viewers.IStructuredContentProvider; 16 import org.eclipse.jface.viewers.Viewer; 17 import org.eclipse.ui.activities.IActivityManager; 18 19 22 public class ActivityContentProvider implements IStructuredContentProvider { 23 24 27 public ActivityContentProvider() { 28 } 29 30 35 public void dispose() { 36 } 37 38 43 public Object [] getElements(Object inputElement) { 44 Object [] activities = new Object [0]; 45 if (inputElement instanceof IActivityManager) { 46 activities = ((IActivityManager) inputElement) 47 .getDefinedActivityIds().toArray(); 48 } else if (inputElement instanceof Collection ) { 49 activities = ((Collection ) inputElement).toArray(); 50 } 51 return activities; 52 } 53 54 60 public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { 61 } 62 } 63 | Popular Tags |