import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.api.service.IClassificationService;
import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.TaxonComparatorSearch;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.model.DataChangeBridge;
private IDataChangeBehavior dataChangeBehavior;
+ private Root root;
+
/*
* (non-Javadoc)
*
// we do not preserve state. Closing the view, in contrary to
// closing the whole application
// should be handled by the state manager too
-
- return new Root(conversation);
+ root = new Root(conversation);
+ return root;
}
return new EmptyRoot();
}
* a {@link org.eclipse.core.runtime.IProgressMonitor} object.
*/
public void restore(IMemento memento, IProgressMonitor monitor) {
+ root = new Root(conversation);
if (memento == null) {
- getCommonViewer().setInput(new Root(conversation));
+ getCommonViewer().setInput(root);
return;
}
int mementoWork = 0;
subProgressMonitor.worked(1);
conversation.registerForDataStoreChanges(TaxonNavigator.this);
subProgressMonitor.worked(1);
- getCommonViewer().setInput(new Root(conversation));
+ getCommonViewer().setInput(root);
subProgressMonitor.worked(1);
getCommonViewer().refresh();
subProgressMonitor.worked(1);
* @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
*/
@Override
- public <T extends CdmBase> List<T> getRootEntities() {
+ public List<Classification> getRootEntities() {
+ if(root != null) {
+ return root.getParentBeans();
+ }
return null;
}
}