// $Id$
/**
* Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
+ * European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
- *
+ *
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
-import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
/**
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface
* .viewers.Viewer, java.lang.Object, java.lang.Object)
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java
* .lang.Object)
*/
@Override
public Object[] getElements(Object inputElement) {
- if (inputElement instanceof PolytomousKey) {
+ if (inputElement instanceof PolytomousKeyEditorInput) {
List<PolytomousKeyNode> result = new ArrayList<PolytomousKeyNode>();
- PolytomousKeyNode root = ((PolytomousKey) inputElement).getRoot();
+ PolytomousKeyNode root = ((PolytomousKeyEditorInput) inputElement).getKey().getRoot();
getChildrenBreadthFirst(result, root);
return result.toArray();