Revision 3b4a059e
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/AbstractCdmEditorPartE4.java | ||
---|---|---|
28 | 28 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType; |
29 | 29 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
30 | 30 |
import eu.etaxonomy.taxeditor.editor.ITaxonEditor; |
31 |
|
|
32 | 31 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
33 | 32 |
import eu.etaxonomy.taxeditor.model.IDirtyMarkable; |
34 | 33 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
... | ... | |
64 | 63 |
} |
65 | 64 |
} |
66 | 65 |
|
66 |
public Viewer getViewer() { |
|
67 |
return viewer; |
|
68 |
} |
|
69 |
|
|
67 | 70 |
protected void showViewer(IStructuredSelection selection, MPart activePart, Viewer viewer){ |
68 | 71 |
if(viewer!=null){ |
69 | 72 |
Object element = selection.getFirstElement(); |
... | ... | |
74 | 77 |
Object part = createPartObject(activePart); |
75 | 78 |
if(part instanceof ITaxonEditor){ |
76 | 79 |
Taxon accepted = ((ITaxonEditor) part).getTaxon(); |
77 |
|
|
80 |
|
|
78 | 81 |
// Taxon accepted= ((ITaxonEditor)activePart).getTaxon(); |
79 | 82 |
Set<TaxonRelationship> rels = taxon.getTaxonRelations(accepted); |
80 | 83 |
|
... | ... | |
82 | 85 |
TaxonRelationship rel = rels.iterator().next(); |
83 | 86 |
if (rel.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())){ |
84 | 87 |
viewer.setInput(rel); |
85 |
|
|
88 |
|
|
86 | 89 |
return; |
87 | 90 |
} |
88 | 91 |
} |
... | ... | |
92 | 95 |
} |
93 | 96 |
} |
94 | 97 |
viewer.setInput(element); |
95 |
|
|
96 |
|
|
98 |
|
|
99 |
|
|
97 | 100 |
} |
98 | 101 |
selectionProvidingPart = activePart; |
99 | 102 |
} |
Also available in: Unified diff
ref #6908 #6907 refactor abstract viewer class