Revision 19c6a52f
ref #6911 Fix part labeling
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptContentProvider.java | ||
---|---|---|
18 | 18 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
19 | 19 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship; |
20 | 20 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType; |
21 |
import eu.etaxonomy.taxeditor.editor.e4.TaxonEditorInputE4; |
|
22 | 21 |
|
23 | 22 |
/** |
24 | 23 |
* @author n.hoffmann |
... | ... | |
39 | 38 |
@Override |
40 | 39 |
public Object[] getElements(Object inputElement) { |
41 | 40 |
Taxon taxon = null; |
42 |
if(inputElement instanceof TaxonEditorInputE4){ |
|
43 |
taxon = ((TaxonEditorInputE4) inputElement).getTaxon(); |
|
44 |
} |
|
45 |
else if(inputElement instanceof Taxon){ |
|
41 |
if(inputElement instanceof Taxon){ |
|
46 | 42 |
taxon = (Taxon) inputElement; |
47 | 43 |
} |
48 | 44 |
if(taxon!=null){ |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/ConceptViewPartE4.java | ||
---|---|---|
24 | 24 |
import org.eclipse.jface.viewers.StructuredSelection; |
25 | 25 |
import org.eclipse.jface.viewers.ViewerSorter; |
26 | 26 |
import org.eclipse.swt.widgets.Composite; |
27 |
import org.eclipse.ui.IEditorInput; |
|
28 | 27 |
|
29 | 28 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
30 | 29 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship; |
... | ... | |
82 | 81 |
showEmptyPage(); |
83 | 82 |
} |
84 | 83 |
else if(partObject instanceof TaxonNameEditorE4){ |
85 |
IEditorInput input = ((TaxonNameEditorE4) partObject).getEditorInput();
|
|
86 |
if(input!=null){
|
|
87 |
showViewer(new StructuredSelection(input), activePart, viewer);
|
|
84 |
Taxon taxon = ((TaxonNameEditorE4) partObject).getTaxon();
|
|
85 |
if(taxon!=null){
|
|
86 |
showViewer(new StructuredSelection(taxon), activePart, viewer);
|
|
88 | 87 |
} |
89 | 88 |
} |
90 | 89 |
else { |
Also available in: Unified diff