dc84b3c5ac4da4aa5baeaaf34e9803aef8d1784c
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / src / main / java / eu / etaxonomy / taxeditor / bulkeditor / referencingobjects / ReferencingObjectsContentProvider.java
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 */
24 public class ReferencingObjectsContentProvider implements
25 IStructuredContentProvider {
26
27 @SuppressWarnings("unused")
28 private static final Logger logger = Logger.getLogger(ReferencingObjectsContentProvider.class);
29
30 @Override
31 public Object[] getElements(Object inputElement) {
32 if (inputElement instanceof Collection) {
33 return ((Collection<?>) inputElement).toArray();
34 }
35 return new Object[0];
36 }
37
38 @Override
39 public void dispose() {}
40
41 @Override
42 public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
43 }