Revision 41c668f3
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/OpenRelatedConceptHandlerE4.java | ||
---|---|---|
13 | 13 |
|
14 | 14 |
import org.eclipse.e4.core.di.annotations.Execute; |
15 | 15 |
import org.eclipse.e4.core.di.annotations.Optional; |
16 |
import org.eclipse.e4.ui.model.application.MApplication; |
|
16 | 17 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
17 | 18 |
import org.eclipse.e4.ui.services.IServiceConstants; |
19 |
import org.eclipse.e4.ui.workbench.modeling.EModelService; |
|
20 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
|
18 | 21 |
import org.eclipse.jface.viewers.ISelection; |
19 | 22 |
|
20 | 23 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
... | ... | |
39 | 42 |
|
40 | 43 |
@Execute |
41 | 44 |
public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart, |
42 |
@Optional@Named(IServiceConstants.ACTIVE_SELECTION) TaxonRelationship taxonRelationship) { |
|
45 |
@Optional@Named(IServiceConstants.ACTIVE_SELECTION) TaxonRelationship taxonRelationship, EModelService modelService, EPartService partService, MApplication application) {
|
|
43 | 46 |
|
44 | 47 |
TaxonNameEditorE4 editor = null; |
45 | 48 |
BulkEditor bulkEditor = null; |
... | ... | |
72 | 75 |
String.format(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE ,relatedTaxon), null); |
73 | 76 |
} |
74 | 77 |
else{ |
75 |
openConcept(relatedTaxon); |
|
78 |
openConcept(relatedTaxon, modelService, partService, application);
|
|
76 | 79 |
} |
77 | 80 |
} |
78 | 81 |
|
79 |
/** |
|
80 |
* @param relatedTaxon |
|
81 |
*/ |
|
82 |
protected void openConcept(TaxonBase<?> relatedTaxon) { |
|
83 |
EditorUtil.openTaxonBaseE4(relatedTaxon.getUuid()); |
|
82 |
protected void openConcept(TaxonBase<?> relatedTaxon, EModelService modelService, EPartService partService, MApplication application) { |
|
83 |
EditorUtil.openTaxonBaseE4(relatedTaxon.getUuid(), modelService, partService, application); |
|
84 | 84 |
} |
85 | 85 |
|
86 | 86 |
private Taxon getRelatedTaxon(TaxonRelationship relationship, Taxon taxon){ |
Also available in: Unified diff
ref #6595 code refactoring