Project

General

Profile

« Previous | Next » 

Revision 239530ee

Added by Katja Luther over 5 years ago

ref #7922: add preference to save distribution editor factual data to their own fact

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/handler/OpenChecklistEditorHandlerE4.java
14 14

  
15 15
import eu.etaxonomy.cdm.api.service.IClassificationService;
16 16
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
17
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
17 18
import eu.etaxonomy.cdm.model.taxon.Classification;
18 19
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
19 20
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
......
23 24
import eu.etaxonomy.taxeditor.editor.view.checklist.e4.ChecklistEditorE4;
24 25
import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
25 26
import eu.etaxonomy.taxeditor.model.MessagingUtils;
26
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
27
import eu.etaxonomy.taxeditor.preference.EditorPreferencePredicate;
27 28
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
28 29
import eu.etaxonomy.taxeditor.store.CdmStore;
29 30
import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
......
46 47
	@Override
47 48
	protected void open(ITaxonTreeNode entity, Shell shell, EPartService partService) {
48 49

  
49
		if (PreferencesUtil.getBooleanValue(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE)) {
50
			if (StringUtils.isBlank(PreferencesUtil.getStringValue(IPreferenceKeys.DISTRIBUTION_VOCABULARIES) )){
50
		if (PreferencesUtil.getBooleanValue(EditorPreferencePredicate.DistributionEditorActivated.getKey())) {
51
			if (StringUtils.isBlank(PreferencesUtil.getStringValue(PreferencePredicate.AvailableDistributionAreaVocabularies.getKey()) )){
51 52

  
52 53
				MessagingUtils.informationDialog(Messages.OpenChecklistEditorHandler_NO_AREAS, Messages.OpenChecklistEditorHandler_CHOOSE_AREA
53 54
						+ Messages.OpenChecklistEditorHandler_GOTO_PREFERENCES);
......
93 94
     */
94 95
    @Override
95 96
    protected boolean canExecute(ITaxonTreeNode entity) {
96
        return entity!=null && PreferencesUtil.getBooleanValue(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE);
97
        return entity!=null && PreferencesUtil.getBooleanValue(EditorPreferencePredicate.DistributionEditorActivated.getKey());
97 98
    }
98 99

  
99 100
    @Override

Also available in: Unified diff