+ public static void openDistributionEditor(UuidAndTitleCache parentUuidAndTitleCache, EModelService modelService, EPartService partService, MApplication application){
+ Collection<MPart> parts = partService.getParts();
+ String partId = AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_CHECKLIST_E4_DISTRIBUTIONEDITORPART;
+ checkAndCloseFactsAndMediaParts(partService);
+ MPart part = showPart(partId, modelService, partService, application);
+ DistributionEditorPart editor = (DistributionEditorPart) part.getObject();
+ editor.init(parentUuidAndTitleCache);
+ }
+
+ public static void openDistributionEditor(List<UuidAndTitleCache> parentTaxonUuidList, EModelService modelService, EPartService partService, MApplication application){
+ Collection<MPart> parts = partService.getParts();
+ String partId = AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_CHECKLIST_E4_DISTRIBUTIONEDITORPART;
+ checkAndCloseFactsAndMediaParts(partService);
+ MPart part = showPart(partId, modelService, partService, application);
+ DistributionEditorPart editor = (DistributionEditorPart) part.getObject();
+ editor.init(parentTaxonUuidList);
+ }
+
+ public static void checkAndCloseFactsAndMediaParts(EPartService partService) {
+ String partIdFactualData = AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_DESCRIPTIVE_E4_FACTUALDATAPARTE4;
+ String partIdMedia = AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_MEDIA_E4_MEDIAVIEWPARTE4;
+ MPart part1 = partService.findPart(AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_DESCRIPTIVE_E4_FACTUALDATAPARTE4);
+ if (factsVisible || (part1!=null && part1.getWidget() != null && partService.isPartVisible(part1))){
+ factsVisible = true;
+ }else{
+ factsVisible = false;
+ }
+ part1 = partService.findPart(AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_MEDIA_E4_MEDIAVIEWPARTE4);
+ if (mediaVisible || (part1!=null && part1.getWidget() != null && partService.isPartVisible(part1))){
+ mediaVisible = true;
+ }else{
+ mediaVisible = false;
+ }
+ closePart(partIdMedia, partService);
+ closePart(partIdFactualData, partService);
+ }
+
+