1 | /** |
2 | * |
3 | */ |
4 | package de.uka.ipd.sdq.sensorframework.dialogs.dataset; |
5 | |
6 | import java.util.Collection; |
7 | |
8 | import org.eclipse.jface.viewers.IStructuredContentProvider; |
9 | import org.eclipse.jface.viewers.Viewer; |
10 | |
11 | public class DatasourceListContentProvider implements IStructuredContentProvider { |
12 | |
13 | /* (non-Javadoc) |
14 | * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) |
15 | */ |
16 | public Object[] getElements(Object inputElement) { |
17 | if (inputElement instanceof Collection<?>) { |
18 | Collection<?> sources = (Collection<?>) inputElement; |
19 | return sources.toArray(); |
20 | } |
21 | return null; |
22 | } |
23 | |
24 | /* (non-Javadoc) |
25 | * @see org.eclipse.jface.viewers.IContentProvider#dispose() |
26 | */ |
27 | public void dispose() { |
28 | // TODO Auto-generated method stub |
29 | |
30 | } |
31 | |
32 | /* (non-Javadoc) |
33 | * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) |
34 | */ |
35 | public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { |
36 | // TODO Auto-generated method stub |
37 | |
38 | } |
39 | |
40 | } |