commit 695f0fab7f973e9c93e95cdfa7234b636951c6c2
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Fri Nov 16 12:47:50 2018 +0100

    Revert "Revert "ref #7849: move general db preferences to its own tab to avoid saving if not edited""
    
    This reverts commit e78f3e6c944dd0630daef5ecfab96773a875c695.

diff --git a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle.properties b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle.properties
index fe1c5dee2..ab9d0a717 100644
--- a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle.properties
+++ b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle.properties
@@ -188,6 +188,7 @@ page.name.21 = Distribution Editor
 page.name.40 = ABCD Import
 page.name.41 = ABCD Import Provider
 page.name.42 = Database Preferences
+page.name.50 = General Database Preferences
 page.name.43 = Nomenclatural Code
 page.name.44 = Name Details View
 extension-point.name = Cdm Viewer
diff --git a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle_de.properties b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle_de.properties
index b6deb1562..de229283c 100644
--- a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle_de.properties
+++ b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/bundle_de.properties
@@ -188,6 +188,7 @@ page.name.21 = Verbreitungs-Editor
 page.name.40 = ABCD Import
 page.name.41 = Biocase Provider
 page.name.42 = Datenbank Präferenzen
+page.name.50 = Allgemeine Datenbank Präferenzen
 page.name.43 = Nomenklatorischer Code
 page.name.44 = Detailsview für wissenschaftliche Namen
 extension-point.name = Cdm Viewer
diff --git a/eu.etaxonomy.taxeditor.store/plugin.xml b/eu.etaxonomy.taxeditor.store/plugin.xml
index 6d831eb2f..f5cd3fe51 100755
--- a/eu.etaxonomy.taxeditor.store/plugin.xml
+++ b/eu.etaxonomy.taxeditor.store/plugin.xml
@@ -591,6 +591,12 @@
          id="eu.etaxonomy.taxeditor.preferences.general"
          name="%page.name">
    </page>  -->
+   <page
+         category="eu.etaxonomy.taxeditor.preferences.general"
+         class="eu.etaxonomy.taxeditor.databaseAdmin.preferencePage.GeneralAdminPreferencePage"
+         id="eu.etaxonomy.taxeditor.preferences.generalPreferences"
+         name="%page.name.50">
+   </page>
    <page 
          category="eu.etaxonomy.taxeditor.preferences.general"
          class="eu.etaxonomy.taxeditor.databaseAdmin.preferencePage.DistributionAdminPreferences"
@@ -628,8 +634,7 @@
          name="%page.name.45">
    </page>
    <page
-        
-         class="eu.etaxonomy.taxeditor.databaseAdmin.preferencePage.GeneralAdminPreferencePage"
+         class="eu.etaxonomy.taxeditor.databaseAdmin.preferencePage.EmptyAdminPreferencePage"
          id="eu.etaxonomy.taxeditor.preferences.general"
          name="%page.name.42">
    </page>
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/GeneralAdminPreferencePage.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/GeneralAdminPreferencePage.java
index 239a37cbb..c08fcdc37 100755
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/GeneralAdminPreferencePage.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/GeneralAdminPreferencePage.java
@@ -9,15 +9,23 @@
 package eu.etaxonomy.taxeditor.databaseAdmin.preferencePage;
 
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 
 import eu.etaxonomy.cdm.api.application.ICdmRepository;
 import eu.etaxonomy.cdm.api.service.IPreferenceService;
 import eu.etaxonomy.cdm.model.metadata.CdmPreference;
+import eu.etaxonomy.cdm.model.metadata.CdmPreference.PrefKey;
 import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
+import eu.etaxonomy.cdm.model.metadata.PreferenceSubject;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * @author k.luther
@@ -41,85 +49,85 @@ public class GeneralAdminPreferencePage extends CdmPreferencePage implements IE4
         final Composite composite = new Composite(parent, SWT.NULL);
 
 
-//        GridLayout gridLayout = new GridLayout();
-//        composite.setLayout(gridLayout);
-//        controller = CdmStore.getCurrentApplicationConfiguration();
-//        if (controller != null){
-//            IPreferenceService service = controller.getPreferenceService();
-//            PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowImportExportMenu);
-//            CdmPreference isShowSpecimenPref = service.find(key);
-//            if (isShowSpecimenPref != null){
-//                this.isShowIOMenu = Boolean.valueOf(isShowSpecimenPref.getValue());
-//            }
-//
-//            key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowMediaView);
-//            CdmPreference isShowMediaViewPref = service.find(key);
-//            if (isShowMediaViewPref != null){
-//                this.isShowMediaView = Boolean.valueOf(isShowMediaViewPref.getValue());
-//            }
-//
-//            key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowChecklistPerspective);
-//            CdmPreference isShowChecklistPref = service.find(key);
-//            if (isShowChecklistPref != null){
-//                this.isShowCheckListPerspective = Boolean.valueOf(isShowChecklistPref.getValue());
-//            }
-//
-//            key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowTaxonNodeWizard);
-//            CdmPreference isShowTaxonNodeWizardPref = service.find(key);
-//            if (isShowTaxonNodeWizardPref != null){
-//                this.isShowTaxonNodeWizard = Boolean.valueOf(isShowTaxonNodeWizardPref.getValue());
-//            }
-//        }
-//        final Button showIOMenuButton = new Button(composite, SWT.CHECK);
-//
-//        showIOMenuButton.setText(Messages.DatabasePreferncesPage_Show_IOMenu);
-//
-//        showIOMenuButton.setSelection(isShowIOMenu);
-//        showIOMenuButton.addSelectionListener(new SelectionAdapter(){
-//             @Override
-//             public void widgetSelected(SelectionEvent e) {
-//                 isShowIOMenu = showIOMenuButton.getSelection();
-//
-//              }
-//         });
-//
-//        final Button showMediaViewButton = new Button(composite, SWT.CHECK);
-//
-//        showMediaViewButton.setText(Messages.DatabasePreferncesPage_Show_MediaView);
-//
-//        showMediaViewButton.setSelection(isShowMediaView);
-//        showMediaViewButton.addSelectionListener(new SelectionAdapter(){
-//             @Override
-//             public void widgetSelected(SelectionEvent e) {
-//                 isShowMediaView = showIOMenuButton.getSelection();
-//
-//              }
-//         });
-//        final Button showChecklistPerspectiveButton = new Button(composite, SWT.CHECK);
-//
-//        showChecklistPerspectiveButton.setText(Messages.DatabasePreferncesPage_Show_ChecklistPerspective);
-//
-//        showChecklistPerspectiveButton.setSelection(isShowCheckListPerspective);
-//        showChecklistPerspectiveButton.addSelectionListener(new SelectionAdapter(){
-//             @Override
-//             public void widgetSelected(SelectionEvent e) {
-//                 isShowCheckListPerspective = showChecklistPerspectiveButton.getSelection();
-//
-//              }
-//         });
-//
-//        final Button showTaxonNodeWizardButton = new Button(composite, SWT.CHECK);
-//
-//        showTaxonNodeWizardButton.setText(Messages.DatabasePreferncesPage_Show_TaxonNodeWizard);
-//
-//        showTaxonNodeWizardButton.setSelection(isShowTaxonNodeWizard);
-//        showTaxonNodeWizardButton.addSelectionListener(new SelectionAdapter(){
-//             @Override
-//             public void widgetSelected(SelectionEvent e) {
-//                 isShowTaxonNodeWizard = showTaxonNodeWizardButton.getSelection();
-//
-//              }
-//         });
+        GridLayout gridLayout = new GridLayout();
+        composite.setLayout(gridLayout);
+        controller = CdmStore.getCurrentApplicationConfiguration();
+        if (controller != null){
+            IPreferenceService service = controller.getPreferenceService();
+            PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowImportExportMenu);
+            CdmPreference isShowSpecimenPref = service.find(key);
+            if (isShowSpecimenPref != null){
+                this.isShowIOMenu = Boolean.valueOf(isShowSpecimenPref.getValue());
+            }
+
+            key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowMediaView);
+            CdmPreference isShowMediaViewPref = service.find(key);
+            if (isShowMediaViewPref != null){
+                this.isShowMediaView = Boolean.valueOf(isShowMediaViewPref.getValue());
+            }
+
+            key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowChecklistPerspective);
+            CdmPreference isShowChecklistPref = service.find(key);
+            if (isShowChecklistPref != null){
+                this.isShowCheckListPerspective = Boolean.valueOf(isShowChecklistPref.getValue());
+            }
+
+            key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowTaxonNodeWizard);
+            CdmPreference isShowTaxonNodeWizardPref = service.find(key);
+            if (isShowTaxonNodeWizardPref != null){
+                this.isShowTaxonNodeWizard = Boolean.valueOf(isShowTaxonNodeWizardPref.getValue());
+            }
+        }
+        final Button showIOMenuButton = new Button(composite, SWT.CHECK);
+
+        showIOMenuButton.setText(Messages.DatabasePreferncesPage_Show_IOMenu);
+
+        showIOMenuButton.setSelection(isShowIOMenu);
+        showIOMenuButton.addSelectionListener(new SelectionAdapter(){
+             @Override
+             public void widgetSelected(SelectionEvent e) {
+                 isShowIOMenu = showIOMenuButton.getSelection();
+
+              }
+         });
+
+        final Button showMediaViewButton = new Button(composite, SWT.CHECK);
+
+        showMediaViewButton.setText(Messages.DatabasePreferncesPage_Show_MediaView);
+
+        showMediaViewButton.setSelection(isShowMediaView);
+        showMediaViewButton.addSelectionListener(new SelectionAdapter(){
+             @Override
+             public void widgetSelected(SelectionEvent e) {
+                 isShowMediaView = showIOMenuButton.getSelection();
+
+              }
+         });
+        final Button showChecklistPerspectiveButton = new Button(composite, SWT.CHECK);
+
+        showChecklistPerspectiveButton.setText(Messages.DatabasePreferncesPage_Show_ChecklistPerspective);
+
+        showChecklistPerspectiveButton.setSelection(isShowCheckListPerspective);
+        showChecklistPerspectiveButton.addSelectionListener(new SelectionAdapter(){
+             @Override
+             public void widgetSelected(SelectionEvent e) {
+                 isShowCheckListPerspective = showChecklistPerspectiveButton.getSelection();
+
+              }
+         });
+
+        final Button showTaxonNodeWizardButton = new Button(composite, SWT.CHECK);
+
+        showTaxonNodeWizardButton.setText(Messages.DatabasePreferncesPage_Show_TaxonNodeWizard);
+
+        showTaxonNodeWizardButton.setSelection(isShowTaxonNodeWizard);
+        showTaxonNodeWizardButton.addSelectionListener(new SelectionAdapter(){
+             @Override
+             public void widgetSelected(SelectionEvent e) {
+                 isShowTaxonNodeWizard = showTaxonNodeWizardButton.getSelection();
+
+              }
+         });
 
 
         return composite;
