Project

General

Profile

Download (1.08 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
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.preference.menu;
11

    
12
import java.util.Collection;
13

    
14
import org.eclipse.jface.viewers.IStructuredContentProvider;
15
import org.eclipse.jface.viewers.Viewer;
16

    
17
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
18

    
19
/**
20
 * <p>DefinedTermBaseContentProvider class.</p>
21
 *
22
 * @author n.hoffmann
23
 * @created Aug 5, 2010
24
 * @version 1.0
25
 */
26
public class DefinedTermBaseContentProvider implements
27
		IStructuredContentProvider {
28

    
29
	/** {@inheritDoc} */
30
	public Object[] getElements(Object inputElement) {	
31
		if(inputElement instanceof Collection){
32
			return ((Collection<DefinedTermBase>) inputElement).toArray(new DefinedTermBase[0]);
33
		}
34
		return new Object[]{};
35
	}
36

    
37
	/**
38
	 * <p>dispose</p>
39
	 */
40
	public void dispose() {}
41

    
42
	/** {@inheritDoc} */
43
	public void inputChanged(Viewer viewer, Object oldInput,
44
			Object newInput) {}
45
}
(3-3/21)