Project

General

Profile

Download (1.24 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.ui.openurl;
12

    
13
import java.util.List;
14

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

    
18
/**
19
 * @author n.hoffmann
20
 * @created Jan 31, 2011
21
 * @version 1.0
22
 */
23
public class OpenUrlContentProvider implements IStructuredContentProvider {
24

    
25
	/* (non-Javadoc)
26
	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
27
	 */
28
	@Override
29
	public void dispose() {
30

    
31
	}
32

    
33
	/* (non-Javadoc)
34
	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
35
	 */
36
	@Override
37
	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
38

    
39
	}
40

    
41
	/* (non-Javadoc)
42
	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
43
	 */
44
	@Override
45
	public Object[] getElements(Object inputElement) {
46
		if(inputElement instanceof List){
47
			return ((List) inputElement).toArray();
48
		}
49
		
50
		
51
		return new Object[]{};
52
	}
53

    
54
}
(2-2/7)