BGBM BDI Projects
/
taxeditor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
53e5556
)
fix #9747: use language uuid to check for managed cdm vocabulary
author
Katja Luther
<k.luther@bgbm.org>
Tue, 14 Sep 2021 07:57:01 +0000
(09:57 +0200)
committer
Katja Luther
<k.luther@bgbm.org>
Tue, 14 Sep 2021 07:57:01 +0000
(09:57 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/CreateDefinedTermHandlerE4.java
patch
|
blob
|
history
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/DeleteTermBaseHandlerE4.java
patch
|
blob
|
history
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/e4/handler/MoveDefinedTermHandler.java
patch
|
blob
|
history
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 d42fcef8bab38684735f21cffd9121d079a75633..d0862545272ab69424a95f86aa2c3864e76b48a3 100644
(file)
--- 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 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;
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
}
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;
}
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 f99d02199543861152fa6fa9192662faa36beacf..469208bb26290843607edf30c04e7ae526a5fb6b 100644
(file)
--- 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 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;
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();
}
}else if(firstElement instanceof TermVocabularyDto){
vocabularyUuid = ((TermVocabularyDto) firstElement).getUuid();
}
- canExecute &= vocabularyUuid!=null;
+ canExecute &= vocabularyUuid!=null
&& !Language.cdmVocabularyUuids().contains(vocabularyUuid)
;
menuItem.setVisible(canExecute);
return canExecute;
}
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 4de964be4c6d3f5a70aca64145280eb30baae4d2..a30b9822e2996614b5ae29acddb224663a714d3a 100644
(file)
--- 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 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;
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
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;
}
menuItem.setVisible(canExecute);
return canExecute;
}