Project

General

Profile

Download (1.22 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10

    
11
package eu.etaxonomy.taxeditor.bulkeditor.referencingobjects;
12

    
13
import java.util.Collection;
14

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

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

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

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

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