Project

General

Profile

Download (1.21 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.bulkeditor.referencingobjects;
11

    
12
import java.util.Collection;
13

    
14
import org.apache.log4j.Logger;
15
import org.eclipse.jface.viewers.IStructuredContentProvider;
16
import org.eclipse.jface.viewers.Viewer;
17

    
18
/**
19
 * <p>ReferencingObjectsContentProvider class.</p>
20
 *
21
 * @author p.ciardelli
22
 * @created 09.07.2009
23
 * @version 1.0
24
 */
25
public class ReferencingObjectsContentProvider implements
26
		IStructuredContentProvider {
27
	@SuppressWarnings("unused")
28
    private static final Logger logger = Logger
29
			.getLogger(ReferencingObjectsContentProvider.class);
30

    
31
	/** {@inheritDoc} */
32
	@Override
33
    public Object[] getElements(Object inputElement) {
34
		if (inputElement instanceof Collection) {
35
			return ((Collection<?>) inputElement).toArray();
36
		}
37
		return new Object[0];
38
	}
39

    
40
	/**
41
	 * <p>dispose</p>
42
	 */
43
	@Override
44
    public void dispose() {}
45

    
46
	/** {@inheritDoc} */
47
	@Override
48
    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
49
}
(1-1/2)