Revision a3de3443
Added by Katja Luther about 10 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigator.java | ||
---|---|---|
22 | 22 |
import org.eclipse.core.runtime.IProgressMonitor; |
23 | 23 |
import org.eclipse.jface.viewers.DoubleClickEvent; |
24 | 24 |
import org.eclipse.jface.viewers.TreePath; |
25 |
import org.eclipse.jface.viewers.ViewerComparator; |
|
25 | 26 |
import org.eclipse.ui.IMemento; |
26 | 27 |
import org.eclipse.ui.IViewSite; |
27 | 28 |
import org.eclipse.ui.PartInitException; |
... | ... | |
31 | 32 |
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled; |
32 | 33 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
33 | 34 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
35 |
import eu.etaxonomy.cdm.model.taxon.TaxonComparatorSearch; |
|
34 | 36 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
35 | 37 |
import eu.etaxonomy.taxeditor.model.DataChangeBridge; |
36 | 38 |
import eu.etaxonomy.taxeditor.model.IDataChangeBehavior; |
... | ... | |
74 | 76 |
/** {@inheritDoc} */ |
75 | 77 |
@Override |
76 | 78 |
protected IAdaptable getInitialInput() { |
79 |
TaxonComparatorSearch comparator = new TaxonComparatorSearch(); |
|
80 |
TaxonNodeComparator viewerComparator = new TaxonNodeComparator(comparator); |
|
81 |
this.getCommonViewer().setComparator(viewerComparator); |
|
77 | 82 |
if (CdmStore.isActive()) { |
78 | 83 |
// TODO when closing and reopening the taxon navigator |
79 | 84 |
// we do not preserve state. Closing the view, in contrary to |
... | ... | |
90 | 95 |
public void init(IViewSite site) throws PartInitException { |
91 | 96 |
super.init(site); |
92 | 97 |
init(); |
98 |
|
|
93 | 99 |
} |
94 | 100 |
|
95 | 101 |
/** |
... | ... | |
103 | 109 |
conversation.registerForDataStoreChanges(TaxonNavigator.this); |
104 | 110 |
} |
105 | 111 |
CdmStore.getLoginManager().addObserver(this); |
112 |
|
|
113 |
|
|
114 |
|
|
106 | 115 |
} |
107 | 116 |
|
108 | 117 |
/** |
... | ... | |
192 | 201 |
* @return |
193 | 202 |
*/ |
194 | 203 |
private TreePath createTreePathFromString(String string) { |
195 |
|
|
204 |
|
|
205 |
|
|
196 | 206 |
List<CdmBase> pathList = new ArrayList<CdmBase>(); |
197 | 207 |
|
198 | 208 |
if (string.length() == 0) { |
Also available in: Unified diff
#4114 sort order in taxon navigator