| 1 | /** |
| 2 | * |
| 3 | */ |
| 4 | package de.uka.ipd.sdq.sensorframework.visualisation.tabs.filters; |
| 5 | |
| 6 | import org.eclipse.jface.viewers.IStructuredContentProvider; |
| 7 | import org.eclipse.jface.viewers.Viewer; |
| 8 | |
| 9 | import de.uka.ipd.sdq.sensorframework.visualisation.editor.ConfigEditorInput; |
| 10 | |
| 11 | /** |
| 12 | * @author Roman Andrej |
| 13 | */ |
| 14 | public class FiltersTabContentProvider implements |
| 15 | IStructuredContentProvider { |
| 16 | |
| 17 | /* (non-Javadoc) |
| 18 | * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) |
| 19 | */ |
| 20 | public Object[] getElements(Object inputElement) { |
| 21 | if (inputElement instanceof ConfigEditorInput) { |
| 22 | ConfigEditorInput configuration = (ConfigEditorInput) inputElement; |
| 23 | return configuration.getFiltersManager() |
| 24 | .getFactories().toArray(); |
| 25 | } |
| 26 | return null; |
| 27 | } |
| 28 | |
| 29 | /* (non-Javadoc) |
| 30 | * @see org.eclipse.jface.viewers.IContentProvider#dispose() |
| 31 | */ |
| 32 | public void dispose() { |
| 33 | // The implementation is not necessary. |
| 34 | } |
| 35 | |
| 36 | /* (non-Javadoc) |
| 37 | * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) |
| 38 | */ |
| 39 | public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { |
| 40 | // The implementation is not necessary. |
| 41 | } |
| 42 | |
| 43 | } |