Revision 69d856ba
Added by Katja Luther almost 10 years ago
- not running imports and exports deleted from menu
- preferences for concept relations fixed
- open taxon editor with one click in taxon navigator
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigator.java | ||
---|---|---|
21 | 21 |
import org.eclipse.core.runtime.IAdaptable; |
22 | 22 |
import org.eclipse.core.runtime.IProgressMonitor; |
23 | 23 |
import org.eclipse.jface.viewers.DoubleClickEvent; |
24 |
import org.eclipse.jface.viewers.IStructuredSelection; |
|
25 |
import org.eclipse.jface.viewers.SelectionChangedEvent; |
|
24 | 26 |
import org.eclipse.jface.viewers.TreePath; |
25 | 27 |
import org.eclipse.ui.IMemento; |
26 | 28 |
import org.eclipse.ui.IViewSite; |
27 | 29 |
import org.eclipse.ui.PartInitException; |
28 | 30 |
import org.eclipse.ui.navigator.CommonNavigator; |
31 |
import org.eclipse.jface.viewers.ISelectionChangedListener; |
|
29 | 32 |
|
30 | 33 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
31 | 34 |
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled; |
32 | 35 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
33 | 36 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
37 |
import eu.etaxonomy.cdm.model.description.FeatureTree; |
|
34 | 38 |
import eu.etaxonomy.cdm.model.taxon.TaxonComparatorSearch; |
35 | 39 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
36 | 40 |
import eu.etaxonomy.taxeditor.model.DataChangeBridge; |
... | ... | |
79 | 83 |
TaxonComparatorSearch comparator = new TaxonComparatorSearch(); |
80 | 84 |
TaxonNodeComparator viewerComparator = new TaxonNodeComparator(comparator); |
81 | 85 |
this.getCommonViewer().setComparator(viewerComparator); |
86 |
this.getCommonViewer().addSelectionChangedListener(new ISelectionChangedListener() { |
|
87 |
|
|
88 |
@Override |
|
89 |
public void selectionChanged(SelectionChangedEvent arg0) { |
|
90 |
IStructuredSelection selection = (IStructuredSelection) getCommonViewer().getSelection(); |
|
91 |
|
|
92 |
Object firstElement = selection.getFirstElement(); |
|
93 |
NavigationUtil.executeEditHandler(); |
|
94 |
|
|
95 |
} |
|
96 |
} ); |
|
82 | 97 |
|
83 | 98 |
if (CdmStore.isActive()) { |
84 | 99 |
|
... | ... | |
97 | 112 |
public void init(IViewSite site) throws PartInitException { |
98 | 113 |
super.init(site); |
99 | 114 |
init(); |
115 |
|
|
100 | 116 |
} |
101 | 117 |
|
102 | 118 |
/** |
... | ... | |
110 | 126 |
conversation.registerForDataStoreChanges(TaxonNavigator.this); |
111 | 127 |
} |
112 | 128 |
CdmStore.getLoginManager().addObserver(this); |
129 |
|
|
113 | 130 |
} |
114 | 131 |
|
115 | 132 |
/** |
Also available in: Unified diff