Revision 852ab2c5
Added by Katja Luther about 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/VocabularyAdminPreferences.java | ||
---|---|---|
14 | 14 |
import org.eclipse.swt.widgets.Composite; |
15 | 15 |
import org.eclipse.swt.widgets.Control; |
16 | 16 |
|
17 |
import eu.etaxonomy.cdm.api.application.ICdmRepository; |
|
18 |
import eu.etaxonomy.cdm.api.service.IPreferenceService; |
|
19 | 17 |
import eu.etaxonomy.cdm.model.metadata.CdmPreference; |
20 | 18 |
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate; |
21 | 19 |
import eu.etaxonomy.taxeditor.l10n.Messages; |
22 | 20 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
23 | 21 |
import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage; |
24 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
25 | 22 |
import eu.etaxonomy.taxeditor.ui.element.CommandHandlerButton; |
26 | 23 |
|
27 | 24 |
/** |
... | ... | |
79 | 76 |
if (pref == null){ |
80 | 77 |
return true; |
81 | 78 |
} |
82 |
ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration(); |
|
83 | 79 |
|
84 |
if(controller!=null){ |
|
85 |
IPreferenceService service = controller.getPreferenceService(); |
|
80 |
PreferencesUtil.updateDBPreferences(); |
|
86 | 81 |
|
87 |
CdmPreference pref = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.CommonNameAreaVocabularies); |
|
88 |
if(pref==null){ |
|
89 |
pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.CommonNameAreaVocabularies, ""); |
|
90 |
} |
|
91 |
pref.setAllowOverride(allowOverride); |
|
92 |
service.set(pref); |
|
93 |
|
|
94 |
PreferencesUtil.updateDBPreferences(); |
|
95 |
} |
|
96 | 82 |
return true; |
97 | 83 |
|
98 | 84 |
} |
Also available in: Unified diff
ref #7849: add message to term selection wizard that no selection -> all terms available, smaller adapation in areaselection dialogs