1
|
/**
|
2
|
* Copyright (C) 2009 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
|
package eu.etaxonomy.taxeditor.editor.definedterm;
|
10
|
|
11
|
import java.util.Collection;
|
12
|
|
13
|
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
14
|
import org.eclipse.jface.viewers.Viewer;
|
15
|
|
16
|
import eu.etaxonomy.cdm.model.common.TermVocabulary;
|
17
|
|
18
|
/**
|
19
|
* @author l.morris
|
20
|
* @date 8 Dec 2011
|
21
|
*
|
22
|
*/
|
23
|
public class VocabularyContentProvider implements IStructuredContentProvider {
|
24
|
|
25
|
/* (non-Javadoc)
|
26
|
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
|
27
|
*/
|
28
|
@Override
|
29
|
public void dispose() {
|
30
|
// TODO Auto-generated method stub
|
31
|
|
32
|
}
|
33
|
|
34
|
/* (non-Javadoc)
|
35
|
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
|
36
|
*/
|
37
|
@Override
|
38
|
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
39
|
// TODO Auto-generated method stub
|
40
|
|
41
|
}
|
42
|
|
43
|
/* (non-Javadoc)
|
44
|
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
|
45
|
*/
|
46
|
@Override
|
47
|
public Object[] getElements(Object inputElement) {
|
48
|
|
49
|
Collection<TermVocabulary> inputElements = (Collection<TermVocabulary>) inputElement;
|
50
|
return inputElements.toArray();
|
51
|
|
52
|
}
|
53
|
|
54
|
}
|