Revision 3be6ef3e
Added by Niels Hoffmann over 13 years ago
taxeditor-bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsContentProvider.java | ||
---|---|---|
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 |
* @author p.ciardelli |
|
21 |
* @created 09.07.2009 |
|
22 |
* @version 1.0 |
|
23 |
*/ |
|
24 |
public class ReferencingObjectsContentProvider implements |
|
25 |
IStructuredContentProvider { |
|
26 |
private static final Logger logger = Logger |
|
27 |
.getLogger(ReferencingObjectsContentProvider.class); |
|
28 |
|
|
29 |
/* (non-Javadoc) |
|
30 |
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) |
|
31 |
*/ |
|
32 |
public Object[] getElements(Object inputElement) { |
|
33 |
if (inputElement instanceof Collection) { |
|
34 |
return ((Collection) inputElement).toArray(); |
|
35 |
} |
|
36 |
return new Object[0]; |
|
37 |
} |
|
38 |
|
|
39 |
/* (non-Javadoc) |
|
40 |
* @see org.eclipse.jface.viewers.IContentProvider#dispose() |
|
41 |
*/ |
|
42 |
public void dispose() {} |
|
43 |
|
|
44 |
/* (non-Javadoc) |
|
45 |
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) |
|
46 |
*/ |
|
47 |
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} |
|
48 |
} |
|
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 |
private static final Logger logger = Logger |
|
29 |
.getLogger(ReferencingObjectsContentProvider.class); |
|
30 |
|
|
31 |
/* (non-Javadoc) |
|
32 |
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) |
|
33 |
*/ |
|
34 |
/** {@inheritDoc} */ |
|
35 |
public Object[] getElements(Object inputElement) { |
|
36 |
if (inputElement instanceof Collection) { |
|
37 |
return ((Collection) inputElement).toArray(); |
|
38 |
} |
|
39 |
return new Object[0]; |
|
40 |
} |
|
41 |
|
|
42 |
/* (non-Javadoc) |
|
43 |
* @see org.eclipse.jface.viewers.IContentProvider#dispose() |
|
44 |
*/ |
|
45 |
/** |
|
46 |
* <p>dispose</p> |
|
47 |
*/ |
|
48 |
public void dispose() {} |
|
49 |
|
|
50 |
/* (non-Javadoc) |
|
51 |
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) |
|
52 |
*/ |
|
53 |
/** {@inheritDoc} */ |
|
54 |
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} |
|
55 |
} |
Also available in: Unified diff
performed javacscript:fix and worked on documentation