1 |
4db49a38
|
Alexander Oppermann
|
/**
|
2 |
|
|
* Copyright (C) 2007 EDIT
|
3 |
|
|
* European Distributed Institute of Taxonomy
|
4 |
|
|
* http://www.e-taxonomy.eu
|
5 |
|
|
*
|
6 |
|
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7 |
|
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8 |
|
|
*/
|
9 |
|
|
|
10 |
|
|
package eu.etaxonomy.taxeditor.editor.view.checklist;
|
11 |
|
|
|
12 |
|
|
import java.util.List;
|
13 |
|
|
|
14 |
|
|
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
15 |
|
|
import org.eclipse.jface.viewers.Viewer;
|
16 |
|
|
|
17 |
|
|
/**
|
18 |
|
|
*
|
19 |
|
|
* @author a.oppermann
|
20 |
|
|
* @created 30.04.2014
|
21 |
|
|
* @version 1.0
|
22 |
|
|
*/
|
23 |
|
|
public class ChecklistContentProvider implements IStructuredContentProvider {
|
24 |
|
|
/* (non-Javadoc)
|
25 |
|
|
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
|
26 |
|
|
*/
|
27 |
|
|
/**
|
28 |
|
|
* <p>dispose</p>
|
29 |
|
|
*/
|
30 |
|
|
@Override
|
31 |
|
|
public void dispose() {
|
32 |
|
|
|
33 |
|
|
}
|
34 |
|
|
|
35 |
|
|
/* (non-Javadoc)
|
36 |
|
|
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
|
37 |
|
|
*/
|
38 |
|
|
/** {@inheritDoc} */
|
39 |
|
|
@Override
|
40 |
|
|
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
41 |
|
|
|
42 |
|
|
}
|
43 |
|
|
|
44 |
|
|
/*
|
45 |
|
|
* (non-Javadoc)
|
46 |
|
|
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
|
47 |
|
|
*/
|
48 |
|
|
/** {@inheritDoc} */
|
49 |
|
|
@Override
|
50 |
|
|
public Object[] getElements(Object inputElement) {
|
51 |
|
|
if(inputElement instanceof List){
|
52 |
|
|
return ((List) inputElement).toArray();
|
53 |
|
|
}
|
54 |
|
|
return new Object[]{};
|
55 |
|
|
}
|
56 |
|
|
}
|