Project

General

Profile

« Previous | Next » 

Revision 20dd6f72

Added by Patrick Plitzner about 6 years ago

Fix concept relation view for bulk editor

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/ConceptViewPartE4.java
24 24

  
25 25
import eu.etaxonomy.cdm.model.taxon.Taxon;
26 26
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
27
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
28 27
import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor;
29 28
import eu.etaxonomy.taxeditor.editor.l10n.Messages;
30
import eu.etaxonomy.taxeditor.editor.name.e4.TaxonNameEditorE4;
31 29
import eu.etaxonomy.taxeditor.editor.view.concept.ConceptContentProvider;
32 30
import eu.etaxonomy.taxeditor.editor.view.concept.ConceptLabelProvider;
33 31
import eu.etaxonomy.taxeditor.editor.view.descriptive.e4.FactualDataPartE4;
......
35 33
import eu.etaxonomy.taxeditor.model.AbstractUtility;
36 34
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
37 35
import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
38
import eu.etaxonomy.taxeditor.model.LineSelection;
39 36
import eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4;
40 37
import eu.etaxonomy.taxeditor.view.e4.details.DetailsPartE4;
41 38
import eu.etaxonomy.taxeditor.view.e4.supplementaldata.SupplementalDataPartE4;
......
58 55
            viewer.getControl().setEnabled(true);
59 56
        }
60 57
        Object partObject = createPartObject(activePart);
58
        IStructuredSelection structuredSelection = createSelection(selection);
61 59

  
62 60
        if (partObject instanceof DetailsPartE4 || partObject instanceof SupplementalDataPartE4
63 61
                || partObject instanceof FactualDataPartE4|| partObject instanceof MediaViewPartE4) {
......
65 63
            // description selected in this view
66 64
            return;
67 65
        }
68
        else if(partObject instanceof BulkEditor && selection instanceof LineSelection){
69
			if(((LineSelection) selection).getFirstElement() instanceof Taxon){
70
				showViewer((LineSelection) selection, activePart, viewer);
71
			}
72
			else{
73
				showEmptyPage();
74
			}
75
			return;
76
		}
77 66
		else if(partObject instanceof AbstractGraphKeyEditor){
78 67
			showEmptyPage();
79 68
		}
80
		else if(partObject instanceof TaxonNameEditorE4){
81
		    Taxon taxon = ((TaxonNameEditorE4) partObject).getTaxon();
82
		    if(taxon!=null){
83
		        showViewer(new StructuredSelection(taxon), activePart, viewer);
84
		    }
69
		else if(selection!=null){
70
		    showViewer(structuredSelection, activePart, viewer);
85 71
		}
86 72
		else {
87 73
		    showEmptyPage();

Also available in: Unified diff