commit 487f1047ffb4706e01377ad4ca59c5f36f05befd
Author: Katja Luther <k.luther@bgbm.org>
Date:   Tue Sep 14 09:57:01 2021 +0200

    fix #9747: use language uuid to check for managed cdm vocabulary

diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/CreateDefinedTermHandlerE4.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/CreateDefinedTermHandlerE4.java
index d42fcef8b..d08625452 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/CreateDefinedTermHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/CreateDefinedTermHandlerE4.java
@@ -21,6 +21,7 @@ import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
 import org.eclipse.e4.ui.services.IServiceConstants;
 import org.eclipse.jface.viewers.IStructuredSelection;
 
+import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.location.Country;
 import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto;
 import eu.etaxonomy.cdm.persistence.dto.TermDto;
@@ -88,7 +89,7 @@ public class CreateDefinedTermHandlerE4 {
         }
         canExecute &= vocabularyUuid!=null
                 // TODO temporary fix for #7933
-                && !vocabularyUuid.equals(Country.uuidCountryVocabulary);
+                && !vocabularyUuid.equals(Country.uuidCountryVocabulary) && !Language.cdmVocabularyUuids().contains(vocabularyUuid);
         menuItem.setVisible(canExecute);
         return canExecute;
     }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/DeleteTermBaseHandlerE4.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/DeleteTermBaseHandlerE4.java
index f99d02199..469208bb2 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/DeleteTermBaseHandlerE4.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/DeleteTermBaseHandlerE4.java
@@ -22,6 +22,7 @@ import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem;
 import org.eclipse.e4.ui.services.IServiceConstants;
 import org.eclipse.jface.viewers.IStructuredSelection;
 
+import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto;
 import eu.etaxonomy.cdm.persistence.dto.TermDto;
 import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
@@ -75,7 +76,7 @@ public class DeleteTermBaseHandlerE4 {
         }else if(firstElement instanceof TermVocabularyDto){
             vocabularyUuid = ((TermVocabularyDto) firstElement).getUuid();
         }
-        canExecute &= vocabularyUuid!=null;
+        canExecute &= vocabularyUuid!=null && !Language.cdmVocabularyUuids().contains(vocabularyUuid);
         menuItem.setVisible(canExecute);
         return canExecute;
     }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/MoveDefinedTermHandler.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/MoveDefinedTermHandler.java
index 4de964be4..a30b9822e 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/MoveDefinedTermHandler.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/MoveDefinedTermHandler.java
@@ -27,6 +27,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.swt.widgets.Shell;
 
+import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.location.Country;
 import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto;
 import eu.etaxonomy.cdm.persistence.dto.TermDto;
@@ -96,7 +97,8 @@ public class MoveDefinedTermHandler {
         canExecute = selection.size()==1
                 && firstElement instanceof TermDto
                 // TODO temporary fix for #7933
-                && !((TermDto) firstElement).getVocabularyUuid().equals(Country.uuidCountryVocabulary);
+                && !((TermDto) firstElement).getVocabularyUuid().equals(Country.uuidCountryVocabulary)
+                && !Language.cdmVocabularyUuids().contains(((TermDto) firstElement).getVocabularyUuid());
         menuItem.setVisible(canExecute);
         return canExecute;
     }
