id="eu.etaxonomy.taxeditor.preferences.termEditor"
name="%page.name.101">
</page>
+ <page
+ category="eu.etaxonomy.taxeditor.preference.UIPreferences"
+ class="eu.etaxonomy.taxeditor.preference.SupplementalDataPreferences"
+ id="eu.etaxonomy.taxeditor.preferences.supplemental"
+ name="%view.name.3">
+ </page>
+
<page
category="eu.etaxonomy.taxeditor.preferences.description"
class="eu.etaxonomy.taxeditor.preference.menu.FeatureMenuPreferences"
name="%page.name.60">
</page>
<page
- category="eu.etaxonomy.taxeditor.preference.UIPreferences"
+ category="eu.etaxonomy.taxeditor.preferences.supplemental"
class="eu.etaxonomy.taxeditor.preference.SupplementalDataSourcePreferences"
id="eu.etaxonomy.taxeditor.preferences.supplementalDataSourcePreferences"
name="%page.name.sources">
*/
package eu.etaxonomy.taxeditor.preference;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
+import org.eclipse.jface.preference.BooleanFieldEditor;
-import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage;
+import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
+import eu.etaxonomy.taxeditor.l10n.Messages;
+import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
/**
* @author k.luther
* @since 18.01.2019
*
*/
-public class SupplementalDataPreferences extends CdmPreferencePage {
+public class SupplementalDataPreferences extends FieldEditorPreferencePageE4 {
@Override
- protected Control createContents(Composite parent) {
- noDefaultAndApplyButton();
- return null;
- }
+ protected void createFieldEditors() {
+ addField(new BooleanFieldEditor(PreferencesUtil.createPreferenceString(PreferencePredicate.ShowUuidAndIdInSupplementalDataView.getKey()),
+ Messages.SupplementalDataPreferences_0,
+ getFieldEditorParent()));
+ }
}
import org.eclipse.jface.preference.BooleanFieldEditor;
-import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
*/
public class UIPreferences extends FieldEditorPreferencePageE4 {
- /**
- * {@inheritDoc}
- */
+
@Override
protected void createFieldEditors() {
addField(new BooleanFieldEditor(PreferencesUtil.createPreferenceString(
IPreferenceKeys.SHOULD_EXPAND_SECTION_WHEN_DATA_AVAILABLE),
Messages.UIPreferences_expand,
getFieldEditorParent()));
-
- addField(new BooleanFieldEditor(PreferencesUtil.createPreferenceString(PreferencePredicate.ShowUuidAndIdInSupplementalDataView.getKey()),
- Messages.SupplementalDataPreferences_0,
- getFieldEditorParent()));
-
- }
+ }
}
vocs = CdmStore.getService(IVocabularyService.class).findVocabularyDtoByTermType(type);
}else{
String vocString = PreferencesUtil.getStringValue(PreferencePredicate.AvailableDistributionAreaVocabularies.getKey());
- if (vocString.equals("")){
+ if (vocString == null || vocString.equals("")){
vocs = CdmStore.getService(IVocabularyService.class).findVocabularyDtoByTermType(type);
return vocs;
}