Project

General

Profile

Revision 487f1047

ID487f1047ffb4706e01377ad4ca59c5f36f05befd
Parent 53e55562
Child 3bed313a

Added by Katja Luther 3 months ago

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

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/CreateDefinedTermHandlerE4.java
21 21
import org.eclipse.e4.ui.services.IServiceConstants;
22 22
import org.eclipse.jface.viewers.IStructuredSelection;
23 23

  
24
import eu.etaxonomy.cdm.model.common.Language;
24 25
import eu.etaxonomy.cdm.model.location.Country;
25 26
import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto;
26 27
import eu.etaxonomy.cdm.persistence.dto.TermDto;
......
88 89
        }
89 90
        canExecute &= vocabularyUuid!=null
90 91
                // TODO temporary fix for #7933
91
                && !vocabularyUuid.equals(Country.uuidCountryVocabulary);
92
                && !vocabularyUuid.equals(Country.uuidCountryVocabulary) && !Language.cdmVocabularyUuids().contains(vocabularyUuid);
92 93
        menuItem.setVisible(canExecute);
93 94
        return canExecute;
94 95
    }
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/DeleteTermBaseHandlerE4.java
22 22
import org.eclipse.e4.ui.services.IServiceConstants;
23 23
import org.eclipse.jface.viewers.IStructuredSelection;
24 24

  
25
import eu.etaxonomy.cdm.model.common.Language;
25 26
import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto;
26 27
import eu.etaxonomy.cdm.persistence.dto.TermDto;
27 28
import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
......
75 76
        }else if(firstElement instanceof TermVocabularyDto){
76 77
            vocabularyUuid = ((TermVocabularyDto) firstElement).getUuid();
77 78
        }
78
        canExecute &= vocabularyUuid!=null;
79
        canExecute &= vocabularyUuid!=null && !Language.cdmVocabularyUuids().contains(vocabularyUuid);
79 80
        menuItem.setVisible(canExecute);
80 81
        return canExecute;
81 82
    }
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/MoveDefinedTermHandler.java
27 27
import org.eclipse.jface.wizard.WizardDialog;
28 28
import org.eclipse.swt.widgets.Shell;
29 29

  
30
import eu.etaxonomy.cdm.model.common.Language;
30 31
import eu.etaxonomy.cdm.model.location.Country;
31 32
import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto;
32 33
import eu.etaxonomy.cdm.persistence.dto.TermDto;
......
96 97
        canExecute = selection.size()==1
97 98
                && firstElement instanceof TermDto
98 99
                // TODO temporary fix for #7933
99
                && !((TermDto) firstElement).getVocabularyUuid().equals(Country.uuidCountryVocabulary);
100
                && !((TermDto) firstElement).getVocabularyUuid().equals(Country.uuidCountryVocabulary)
101
                && !Language.cdmVocabularyUuids().contains(((TermDto) firstElement).getVocabularyUuid());
100 102
        menuItem.setVisible(canExecute);
101 103
        return canExecute;
102 104
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)