command.name.OPEN_REFERENCING_OBJECTS_VIEW = Open Referencing Objects View\r
extension.name.1 = Store Workbench Model\r
page.name.21 = Distribution Editor\r
+page.name.140 = Import/Export\r
page.name.40 = ABCD Import\r
page.name.41 = ABCD Import Provider\r
page.name.42 = Serverside Preferences\r
command.name.OPEN_REFERENCING_OBJECTS_VIEW = Öffne Referenzierende Objekte
extension.name.1 = Store Workbench Model
page.name.21 = Verbreitungs-Editor
+page.name.140 = Import/Export
page.name.40 = ABCD Import
page.name.41 = Biocase Provider
page.name.42 = Serverseitige Präferenzen
</extension>
<extension
point="eu.etaxonomy.taxeditor.store.preferencePage">
-<page
+ <page
category="eu.etaxonomy.taxeditor.preferences.general"
class="eu.etaxonomy.taxeditor.preference.DebugPreferences"
id="eu.etaxonomy.taxeditor.preference.DebugPreferences"
name="%page.name.34">
- </page>
- <page
- category="eu.etaxonomy.taxeditor.preferences.general"
- class="eu.etaxonomy.taxeditor.preference.AbcdImportPreference"
- id="eu.etaxonomy.taxeditor.store.abcdImportPreference"
- name="%page.name.40">
- </page>
- <page
+ </page>
+ <page
+ category="eu.etaxonomy.taxeditor.preferences.general"
+ class="eu.etaxonomy.taxeditor.preference.IOPreferences"
+ id="eu.etaxonomy.taxeditor.store.IOPreferences"
+ name="%page.name.140">
+ </page>
+ <page
+ category="eu.etaxonomy.taxeditor.store.IOPreferences"
+ class="eu.etaxonomy.taxeditor.preference.AbcdImportPreference"
+ id="eu.etaxonomy.taxeditor.store.abcdImportPreference"
+ name="%page.name.40">
+ </page>
+ <page
category="eu.etaxonomy.taxeditor.store.abcdImportPreference"
class="eu.etaxonomy.taxeditor.preference.AbcdImportProvider"
id="eu.etaxonomy.taxeditor.store.abcdImportProvider"
name="%page.name.41">
- </page>
- <page
+ </page>
+ <page
class="eu.etaxonomy.taxeditor.preference.TaxonomicEditorGeneralPreferences"
id="eu.etaxonomy.taxeditor.preferences.general"
name="%page.name">
- </page>
- <page
+ </page>
+ <page
category="eu.etaxonomy.taxeditor.preferences.general"
class="eu.etaxonomy.taxeditor.preference.FactualDataPreference"
id="eu.etaxonomy.taxeditor.preferences.description"
name="%page.name.0">
- </page>
+ </page>
<page
category="eu.etaxonomy.taxeditor.preference.UIPreferences"
class="eu.etaxonomy.taxeditor.preference.DescriptionPreferences"
id="eu.etaxonomy.taxeditor.preferences.defaultFeatureTreePreferenecs"
name="%page.name.22">
</page>
- <page
- category="eu.etaxonomy.taxeditor.preferences.description"
- class="eu.etaxonomy.taxeditor.preference.CommonNameVocabularyPreferencePage"
- id="eu.etaxonomy.taxeditor.store.vocabularyPreference"
- name="%page.name.47">
- </page>
+ <page
+ category="eu.etaxonomy.taxeditor.preferences.description"
+ class="eu.etaxonomy.taxeditor.preference.CommonNameVocabularyPreferencePage"
+ id="eu.etaxonomy.taxeditor.store.vocabularyPreference"
+ name="%page.name.47">
+ </page>
<page
category="eu.etaxonomy.taxeditor.preference.defaultlanguagepditorpreferencePage"
class="eu.etaxonomy.taxeditor.preference.LanguageRepresentationPreferencePage"
id="eu.etaxonomy.taxeditor.store.page2"
name="%page.name.43">
</page>
- <page
+ <page
category="eu.etaxonomy.taxeditor.preferences.general"
+ class="eu.etaxonomy.taxeditor.databaseAdmin.preferencePage.IOAdminPreferences"
+ id="eu.etaxonomy.taxeditor.store.IOPreference"
+ name="%page.name.140">
+ </page>
+ <page
+ category="eu.etaxonomy.taxeditor.store.IOPreference"
class="eu.etaxonomy.taxeditor.databaseAdmin.preferencePage.AbcdImportAdminPreference"
id="eu.etaxonomy.taxeditor.store.abcdImportPreference"
name="%page.name.40">
*/
package eu.etaxonomy.taxeditor.databaseAdmin.preferencePage;
-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.preference.GeneralPreferencePage;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.CdmStore;
/**
* @author k.luther
*/
public class GeneralAdminPreferencePage extends GeneralPreferencePage implements IE4AdminPreferencePage {
- ICdmRepository controller = null;
+
CdmPreference isShowSpecimenPref = null;
/**
* {@inheritDoc}
@Override
public boolean performOk() {
-
if (!isApply()){
return true;
}
- if (controller != null){
- IPreferenceService service = controller.getPreferenceService();
- CdmPreference pref;
- if (isShowIOMenu == null && isAllowOverrideShowIOMenu){
- service.remove(CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowImportExportMenu));
- }else{
- pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.ShowImportExportMenu, isShowIOMenu!= null? Boolean.toString(this.isShowIOMenu):null);
- pref.setAllowOverride(isAllowOverrideShowIOMenu);
- service.set(pref);
- }
-
- if(isShowCheckListPerspective == null && isAllowOverrideShowCheckListPerspective){
- service.remove(CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowChecklistPerspective));
- }else{
- pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.ShowChecklistPerspective, isShowCheckListPerspective != null?Boolean.toString(this.isShowCheckListPerspective): null);
- pref.setAllowOverride(isAllowOverrideShowCheckListPerspective);
- service.set(pref);
- }
-
-
- PreferencesUtil.updateDBPreferences();
+ CdmPreference pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.ShowChecklistPerspective, isShowCheckListPerspective!= null? Boolean.toString(this.isShowCheckListPerspective):null);
+ pref.setAllowOverride(isAllowOverrideShowCheckListPerspective);
+ PreferencesUtil.setPreferenceToDB(pref);
+ setApply(false);
+ return true;
-
- }
- return true;
}
@Override
protected void getValues(){
isAdminPreference = true;
-
- controller = CdmStore.getCurrentApplicationConfiguration();
- if (controller != null){
- IPreferenceService service = controller.getPreferenceService();
- PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowImportExportMenu);
- CdmPreference pref = service.find(key);
- if (pref != null){
- isShowIOMenu = pref.getValue()!= null?Boolean.valueOf(pref.getValue()): null;
- isAllowOverrideShowIOMenu = pref.isAllowOverride();
- }else{
- isShowIOMenu = null;
- isAllowOverrideShowIOMenu = true;
- }
-
-// key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowMediaView);
-// pref = service.find(key);
-// if (pref != null){
-// isShowMediaView = Boolean.valueOf(pref.getValue());
-// isAllowOverrideShowMediaView = pref.isAllowOverride();
-// }else{
-// isShowMediaView = Boolean.valueOf(PreferencePredicate.ShowMediaView.getDefaultValue().toString());
-// isAllowOverrideShowMediaView = true;
-// }
-
- key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowChecklistPerspective);
- pref = service.find(key);
- if (pref != null){
- isShowCheckListPerspective = pref.getValue()!= null?Boolean.valueOf(pref.getValue()): null;
- isAllowOverrideShowCheckListPerspective = pref.isAllowOverride();
- }else{
- isShowCheckListPerspective = null;
- isAllowOverrideShowCheckListPerspective = true;
- }
-
- key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowTaxonNodeWizard);
- pref = service.find(key);
-// if (pref != null){
-// isShowTaxonNodeWizard = pref.getValue() != null?Boolean.valueOf(pref.getValue()): null;
-// isAllowOverrideShowTaxonNodeWizard = pref.isAllowOverride();
-// }else{
-// isShowTaxonNodeWizard = null;
-// isAllowOverrideShowTaxonNodeWizard = true;
-// }
- }
-
+ CdmPreference pref = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.ShowChecklistPerspective);
+ if (pref != null){
+ isShowCheckListPerspective = pref.getValue()!= null?Boolean.valueOf(pref.getValue()): null;
+ isAllowOverrideShowCheckListPerspective = pref.isAllowOverride();
+ }else{
+ isShowCheckListPerspective = null;
+ isAllowOverrideShowCheckListPerspective = true;
+ }
}
@Override
protected void performDefaults() {
- isShowIOMenu = null;
isShowCheckListPerspective = null;
- //isShowTaxonNodeWizard = null;
-
-
- isAllowOverrideShowIOMenu = true;
-
-
isAllowOverrideShowCheckListPerspective = true;
-
- //isAllowOverrideShowTaxonNodeWizard = true;
setSelections();
super.performDefaults();
}
--- /dev/null
+/**
+* Copyright (C) 2020 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.databaseAdmin.preferencePage;
+
+import eu.etaxonomy.cdm.model.metadata.CdmPreference;
+import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
+import eu.etaxonomy.taxeditor.preference.IOPreferences;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+
+/**
+ * @author k.luther
+ * @since 11.02.2020
+ */
+public class IOAdminPreferences extends IOPreferences {
+ @Override
+ public boolean performOk() {
+ if (!isApply()){
+ return true;
+ }
+ showIOMenuPref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.ShowImportExportMenu, isShowIOMenu!= null? Boolean.toString(this.isShowIOMenu):null);
+ showIOMenuPref.setAllowOverride(isAllowOverrideShowIOMenu);
+ PreferencesUtil.setPreferenceToDB(showIOMenuPref);
+ setApply(false);
+ return true;
+
+ }
+
+ @Override
+ protected void getValues(){
+ isAdminPreference = true;
+ showIOMenuPref = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.ShowImportExportMenu);
+ if (showIOMenuPref != null){
+ isShowIOMenu = showIOMenuPref.getValue()!= null?Boolean.valueOf(showIOMenuPref.getValue()): null;
+ isAllowOverrideShowIOMenu = showIOMenuPref.isAllowOverride();
+ }else{
+ isShowIOMenu = null;
+ isAllowOverrideShowIOMenu = true;
+ }
+ }
+
+ @Override
+ protected void performDefaults() {
+ isShowIOMenu = null;
+ isAllowOverrideShowIOMenu = true;
+
+ setSelections();
+ super.performDefaults();
+ }
+
+}
public static String SetAggregationConfiguration_Title;
public static String StructuredDescriptionAggregationWizardPage_SELECT_SUBTREE;
public static String StructuredDescriptionAggregationWizardPage_TOOLTIP_SELECT_SUBTREE;
+ public static String CommonNameLanguages_Title;
AggregationWizardPage_SINGLE_TAXON=Aggregation only for
SetAggregationConfiguration_Title=Aggregation configuration;
StructuredDescriptionAggregationWizardPage_SELECT_SUBTREE=Select subtree(s) for aggregation
-StructuredDescriptionAggregationWizardPage_TOOLTIP_SELECT_SUBTREE=If not all subtrees included in the descriptive data set should be aggregated, select the subtrees for the aggregation
\ No newline at end of file
+StructuredDescriptionAggregationWizardPage_TOOLTIP_SELECT_SUBTREE=If not all subtrees included in the descriptive data set should be aggregated, select the subtrees for the aggregation
+CommonNameLanguages_Title=Common Name Languages
\ No newline at end of file
AggregationWizardPage_SINGLE_TAXON=Aggregation only for
SetAggregationConfiguration_Title=Aggregationskonfiguration
StructuredDescriptionAggregationWizardPage_SELECT_SUBTREE=Select subtree(s) for aggregation
-StructuredDescriptionAggregationWizardPage_TOOLTIP_SELECT_SUBTREE=If not all subtrees included in the descriptive data set should be aggregated, select the subtrees for the aggregation
\ No newline at end of file
+StructuredDescriptionAggregationWizardPage_TOOLTIP_SELECT_SUBTREE=If not all subtrees included in the descriptive data set should be aggregated, select the subtrees for the aggregation
+CommonNameLanguages_Title=Sprachen für Trivialnamen
\ No newline at end of file
import java.net.URI;
+import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.events.SelectionAdapter;
GridData gridData = new GridData();
gridData = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);
- gridData.horizontalIndent = 5;
+ gridData.horizontalIndent = 9;
gridData.minimumWidth=100;
// classificationSelection.setLayoutData(gridData);
Label unitIdLabel = new Label(composite, SWT.NONE);
Label labelRef = new Label(composite, SWT.NONE);
labelRef.setText("Biocase provider for associated DNA");
textDNAProviderString = new Combo(composite, SWT.BORDER);
+
+ gridData = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);
+ gridData.horizontalIndent = 9;
+ gridData.minimumWidth=200;
+
+ textDNAProviderString.setLayoutData(gridData);
+ GridLayoutFactory.fillDefaults();
String biocaseProvider = null;
CdmPreference pref = null;
}
textDNAProviderString.setEnabled(true);
- textDNAProviderString.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 1, 1));
+ // textDNAProviderString.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 1, 1));
textDNAProviderString.addSelectionListener(this);
Label nomenclaturalCodeLabel = new Label(composite, SWT.NONE);
nomenclaturalCodeLabel.setText("Nomenclatural Code");
nomenclaturalCodeSelectionCombo = new Combo(composite, SWT.BORDER| SWT.READ_ONLY);
+ gridData = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);
+ gridData.horizontalIndent = 9;
nomenclaturalCodeSelectionCombo.setLayoutData(gridData);
-
+ GridLayoutFactory.fillDefaults();
for(NomenclaturalCode code: NomenclaturalCode.values()){
nomenclaturalCodeSelectionCombo.add(code.getKey());
}
}
Label sep = new Label(composite, SWT.HORIZONTAL|SWT.SEPARATOR);
-
+ sep.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, true, false));
+ GridLayoutFactory.fillDefaults();
useLocalOrAdmin = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
if (!isAdminPreference){
useLocalOrAdmin.add(LocalOrDefaultEnum.Default.getLabel(), 0);
}
GridData gridDataLocal = new GridData();
gridDataLocal = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);
- gridDataLocal.horizontalIndent = 9;
+ // gridDataLocal.horizontalIndent = 9;
gridDataLocal.minimumWidth=100;
gridDataLocal.widthHint= nomenclaturalCodeSelectionCombo.getBorderWidth();
useLocalOrAdmin.setLayoutData(gridDataLocal);
+ GridLayoutFactory.fillDefaults();
setSelections();
return composite;
}
+ /**
+ * @param title
+ */
+ public AbstractGeneralTermPreference(String title) {
+ super(title);
+ }
+
public boolean isLocalPref() {
return !isAdminPreference;
}
getValues();\r
Composite composite = new Composite(parent, SWT.NULL);\r
composite.setLayout(new GridLayout());\r
- if (!isAdminPreference && distributionEditorPref != null && !distributionEditorPref.isAllowOverride()&& isEditorActivated != null && !isEditorActivated ) {\r
+ if (!isAdminPreference && distributionEditorPref != null && !distributionEditorPref.isAllowOverride() ) {\r
Label label = new Label(composite, SWT.NONE);\r
label.setText(\r
"The CDM settings don't allow to set the preferences for using the distribution editor locally. If you need to make local settings, please ask an administrator.");\r
\r
@Override\r
protected void performDefaults() {\r
- setApply(true);\r
\r
+ setApply(true);\r
isEditorActivated = null;\r
activateCombo.select(0);\r
\r
if (prefStatus == null){
List<CdmPreference> prefsToDelete =cache.getAllForPredicate(PreferencePredicate.AvailableDistributionStatus.getKey());
PreferencesUtil.removeFromDB(prefsToDelete);
+ return true;
}
List<CdmPreference> toDelete = new ArrayList<>();
*/
public class GeneralPreferencePage extends CdmPreferencePage implements SelectionListener{
-
- protected Boolean isShowIOMenu;
-// protected boolean isShowMediaView;
protected Boolean isShowCheckListPerspective;
- protected boolean isAllowOverrideShowIOMenu;
protected boolean isAllowOverrideShowMediaView;
protected boolean isAllowOverrideShowCheckListPerspective;
- protected boolean isOverrideShowIOMenu;
protected boolean isOverrideShowMediaView;
protected boolean isOverrideShowCheckListPerspective;
-
- protected Combo showIOMenuButton;
- protected Button allowOverrideShowIOMenuButton;
protected Combo showChecklistPerspectiveButton;
protected Button allowOverrideShowChecklistButton;
- final String SHOW = Messages.GeneralPreference_yes;
- final String DO_NOT_SHOW = Messages.GeneralPreference_no;
- /**
- * {@inheritDoc}
- */
@Override
protected Control createContents(Composite parent) {
getValues();
separator.setLayoutData(gridData);
separator.setVisible(false);
- showIOMenuButton = createBooleanCombo(composite, SHOW, DO_NOT_SHOW, PreferencePredicate.ShowImportExportMenu, "Show Export/Import Menu",
- isAdminPreference);
-
- showIOMenuButton.addSelectionListener(this);
-
-
- if (isAdminPreference){
- allowOverrideShowIOMenuButton = createAllowOverrideButton(composite);
-
-
- allowOverrideShowIOMenuButton.addSelectionListener(new SelectionAdapter(){
- @Override
- public void widgetSelected(SelectionEvent e) {
- isAllowOverrideShowIOMenu = allowOverrideShowIOMenuButton.getSelection();
- setApply(true);
- }
- });
- }
showChecklistPerspectiveButton = createBooleanCombo(composite, SHOW, DO_NOT_SHOW, PreferencePredicate.ShowChecklistPerspective, "Set Checklist Perspective as Default Perspective",
});
}
-
- if(!isAdminPreference){
- if (!isAllowOverrideShowIOMenu){
- showIOMenuButton.setEnabled(false);
-
- }
- if (!isAllowOverrideShowCheckListPerspective){
- showChecklistPerspectiveButton.setEnabled(false);
-
- }
-
- }
-
setSelections();
return composite;
}
}
- if (isAllowOverrideShowIOMenu){
- if (isShowIOMenu != null){
- PreferencesUtil.setBooleanValue(PreferencePredicate.ShowImportExportMenu.getKey(), isShowIOMenu);
- }
- PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowImportExportMenu.getKey()), isOverrideShowIOMenu);
- }
-
-
+ return true;
+ }
- return true;
- }
@Override
protected void getValues(){
isAdminPreference = false;
CdmPreferenceCache cache = CdmPreferenceCache.instance();
- isOverrideShowIOMenu = PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowImportExportMenu.getKey()), true) != null?
- PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowImportExportMenu.getKey()), true): false;
- if (isOverrideShowIOMenu){
- isShowIOMenu = PreferencesUtil.getBooleanValue(PreferencePredicate.ShowImportExportMenu.getKey(), true);
- }
-
-
- PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowImportExportMenu);
- CdmPreference pref = cache.findBestMatching(key);
- if (pref != null){
- isAllowOverrideShowIOMenu = pref.isAllowOverride();
- }else{
- isAllowOverrideShowIOMenu = true;
- }
-
isOverrideShowCheckListPerspective = PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowChecklistPerspective.getKey()), true) != null? PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowChecklistPerspective.getKey()), true): false;
if (isOverrideShowCheckListPerspective){
isShowCheckListPerspective = PreferencesUtil.getBooleanValue(PreferencePredicate.ShowChecklistPerspective.getKey(), true);
}
-
- key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowChecklistPerspective);
- pref = cache.findBestMatching(key);
+ PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowChecklistPerspective);
+ CdmPreference pref = cache.findBestMatching(key);
if (pref != null){
isAllowOverrideShowCheckListPerspective = pref.isAllowOverride();
}else{
}
-
-
- /**
- * {@inheritDoc}
- */
@Override
public void widgetSelected(SelectionEvent e) {
-
- if (e.getSource().equals(this.showIOMenuButton)) {
- String text = showIOMenuButton.getText();
- if (text.startsWith(Messages.Preference_Use_Default)){
- isOverrideShowIOMenu = false;
- isShowIOMenu = null;
-
- }else if (text.equals(SHOW)){
- isShowIOMenu = true;
- isOverrideShowIOMenu = true;
-
- }else{
- isShowIOMenu = false;
- isOverrideShowIOMenu = true;
- }
- }
if (e.getSource().equals(this.showChecklistPerspectiveButton)) {
String text = showChecklistPerspectiveButton.getText();
if (text.startsWith(Messages.Preference_Use_Default)){
@Override
protected void performDefaults() {
-
-
isOverrideShowCheckListPerspective = false;
isShowCheckListPerspective = null;
- isOverrideShowIOMenu = false;
- isShowIOMenu = null;
setSelections();
setApply(true);
}
protected void setSelections(){
- if (isShowIOMenu == null || (!isOverrideShowIOMenu && !isAdminPreference)){
- showIOMenuButton.select(0);
-// if (isAdminPreference){
-// allowOverrideShowIOMenuButton.setEnabled(false);
-// }
- }else{
-// if (isAdminPreference){
-// allowOverrideShowIOMenuButton.setEnabled(true);
-// }
- if (isShowIOMenu){
- showIOMenuButton.select(1);
- }else{
- showIOMenuButton.select(2);
- }
- }
-
if (isShowCheckListPerspective == null || (!isOverrideShowCheckListPerspective && !isAdminPreference)){
showChecklistPerspectiveButton.select(0);
}else{
}
}
-
-
if (isAdminPreference){
- allowOverrideShowIOMenuButton.setSelection(isAllowOverrideShowIOMenu);
allowOverrideShowChecklistButton.setSelection(isAllowOverrideShowCheckListPerspective);
-
}
}
*/
public class GeneralTermPreferencePage extends AbstractGeneralTermPreference<TermDto> {
+
+ public GeneralTermPreferencePage(String title) {
+ super(title);
+ }
+ public GeneralTermPreferencePage() {
+ super();
+ }
+
@Override
protected List<TermDto> getTermsFromStringValues(List<String> listValue) {
Collection<TermDto> termlist = new ArrayList<>();
--- /dev/null
+/**
+* Copyright (C) 2020 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.preference;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+
+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.menu.CdmPreferencePage;
+
+/**
+ * @author k.luther
+ * @since 11.02.2020
+ */
+public class IOPreferences extends CdmPreferencePage implements SelectionListener {
+
+ protected Boolean isShowIOMenu;
+ protected CdmPreference showIOMenuPref;
+ protected boolean isAllowOverrideShowIOMenu;
+ protected boolean isOverrideShowIOMenu;
+
+ protected Combo showIOMenuButton;
+ protected Button allowOverrideShowIOMenuButton;
+
+ @Override
+ protected Control createContents(Composite parent) {
+ getValues();
+ final Composite composite = createComposite(parent);
+
+ GridData gridData = createTextGridData();
+ if (!isAdminPreference && showIOMenuPref != null && !showIOMenuPref.isAllowOverride() ) {
+ Label label = new Label(composite, SWT.NONE);
+ label.setText(
+ "The CDM settings don't allow to set the preferences for using the distribution editor locally. If you need to make local settings, please ask an administrator.");
+ this.setDefaultButtonActivated(false);
+ } else {
+ Label separator= new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
+ separator.setLayoutData(gridData);
+ separator.setVisible(false);
+ showIOMenuButton = createBooleanCombo(composite, SHOW, DO_NOT_SHOW, PreferencePredicate.ShowImportExportMenu, "Show Export/Import Menu",
+ isAdminPreference);
+
+ int index = 0;
+ for (String itemLabel : showIOMenuButton.getItems()) {
+ if (isShowIOMenu == null && itemLabel.startsWith(Messages.Preference_Use_Default)) {
+ showIOMenuButton.select(index);
+ break;
+ }
+ if (isShowIOMenu != null && itemLabel.equals(SHOW) && isShowIOMenu){
+ showIOMenuButton.select(index);
+ break;
+ }
+ if (isShowIOMenu != null && itemLabel.equals(DO_NOT_SHOW) && !isShowIOMenu){
+ showIOMenuButton.select(index);
+ break;
+ }
+ index++;
+ }
+
+ showIOMenuButton.addSelectionListener(this);
+
+
+ if (isAdminPreference){
+ allowOverrideShowIOMenuButton = createAllowOverrideButton(composite);
+ allowOverrideShowIOMenuButton.addSelectionListener(new SelectionAdapter(){
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ isAllowOverrideShowIOMenu = allowOverrideShowIOMenuButton.getSelection();
+ setApply(true);
+ }
+ });
+ allowOverrideShowIOMenuButton.setSelection(isAllowOverrideShowIOMenu);
+
+ }
+ if(!isAdminPreference){
+ if (!isAllowOverrideShowIOMenu){
+ showIOMenuButton.setEnabled(false);
+ }
+ }
+ }
+ return composite;
+
+ }
+
+ @Override
+ public boolean performOk() {
+ if (!isApply()){
+ return true;
+ }
+
+ if (isAllowOverrideShowIOMenu){
+ if (isShowIOMenu != null){
+ PreferencesUtil.setBooleanValue(PreferencePredicate.ShowImportExportMenu.getKey(), isShowIOMenu);
+ }
+ PreferencesUtil.setBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowImportExportMenu.getKey()), isOverrideShowIOMenu);
+ }
+
+
+
+ return true;
+ }
+
+ @Override
+ protected void getValues(){
+ isAdminPreference = false;
+
+ CdmPreferenceCache cache = CdmPreferenceCache.instance();
+ isOverrideShowIOMenu = PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowImportExportMenu.getKey()), true) != null?
+ PreferencesUtil.getBooleanValue(PreferencesUtil.prefOverrideKey(PreferencePredicate.ShowImportExportMenu.getKey()), true): false;
+ if (isOverrideShowIOMenu){
+ isShowIOMenu = PreferencesUtil.getBooleanValue(PreferencePredicate.ShowImportExportMenu.getKey(), true);
+ }
+
+
+ PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.ShowImportExportMenu);
+ showIOMenuPref = cache.findBestMatching(key);
+ if (showIOMenuPref != null){
+ isAllowOverrideShowIOMenu = showIOMenuPref.isAllowOverride();
+ }else{
+ isAllowOverrideShowIOMenu = true;
+ }
+ }
+
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setApply(true);
+ if (e.getSource().equals(this.showIOMenuButton)) {
+ String text = showIOMenuButton.getText();
+ if (text.startsWith(Messages.Preference_Use_Default)){
+ isOverrideShowIOMenu = false;
+ isShowIOMenu = null;
+
+ }else if (text.equals(SHOW)){
+ isShowIOMenu = true;
+ isOverrideShowIOMenu = true;
+
+ }else{
+ isShowIOMenu = false;
+ isOverrideShowIOMenu = true;
+ }
+ }
+ }
+
+ @Override
+ protected void performDefaults() {
+ isOverrideShowIOMenu = false;
+ isShowIOMenu = null;
+ setSelections();
+ setApply(true);
+ }
+
+ protected void setSelections(){
+ if (isShowIOMenu == null || (!isOverrideShowIOMenu && !isAdminPreference)){
+ showIOMenuButton.select(0);
+ }else{
+ if (isShowIOMenu){
+ showIOMenuButton.select(1);
+ }else{
+ showIOMenuButton.select(2);
+ }
+ }
+ if (isAdminPreference){
+ allowOverrideShowIOMenuButton.setSelection(isAllowOverrideShowIOMenu);
+ }
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
import java.awt.Toolkit;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
import java.net.URL;
+import java.util.ArrayList;
import javax.swing.event.DocumentEvent;
import org.apache.commons.lang.StringUtils;
+import org.eclipse.equinox.internal.p2.ui.misc.StringMatcher;
+import org.eclipse.jface.fieldassist.ComboContentAdapter;
+import org.eclipse.jface.fieldassist.ContentProposalAdapter;
+import org.eclipse.jface.fieldassist.IContentProposal;
+import org.eclipse.jface.fieldassist.IContentProposalProvider;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Text;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
private static final String noProvider = Messages.ListComponent_NO_PROVIDER_AVAILABLE;
private static final String serverSidePreference = "Server Side Preference:";
private Button removeButton;
- private Text providerURI;
+ private Combo providerURI;
protected Label labelException;
boolean isAdmin = false;
CdmPreferencePage preferencePage;
CdmPreference providerListPreference;
String providerList;
+ String[] items;
public CdmPreference getProviderListPreference() {
list.setLayoutData(dataList);
- providerURI = new Text(parent, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
+ providerURI = new Combo(parent, SWT.BORDER);
+
+ URL url;
+ String response = null;
+ try {
+ url = new URL("https://www.biocase.org/whats_biocase/gbif_biocase.cgi");
+
+ HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+ conn.setRequestProperty("Accept", "application/json");
+ // conn.setConnectTimeout(TIMEOUT*9);
+ // conn.setReadTimeout(TIMEOUT*9);
+
+ if (conn.getResponseCode() != 200) {
+ throw new RuntimeException("Failed : HTTP error code : " + conn.getResponseCode());
+ }
+ BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));
+
+ StringBuilder builder = new StringBuilder();
+ String line;
+ while ((line = br.readLine()) != null) {
+ builder.append(line);
+ }
+ conn.disconnect();
+ response = builder.toString();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ JSONArray jsonResponseArray;
+ try {
+ jsonResponseArray =new JSONArray(response);
+
+ int i = 0;
+ String service_url = null;
+ items = new String[jsonResponseArray.length()];
+ while (i<jsonResponseArray.length()){
+ JSONObject object = jsonResponseArray.getJSONObject(i);
+ service_url = (String) object.get("service_url");
+ if (service_url != null){
+ providerURI.add(service_url);
+ items[i] = service_url;
+ }
+ i++;
+ }
+
+ } catch (JSONException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+
GridData dataProviderUri = new GridData();
dataProviderUri.horizontalAlignment = GridData.FILL;
dataProviderUri.horizontalSpan = 3;
providerURI.setLayoutData(dataProviderUri);
- providerURI.addModifyListener(this);
+ // providerURI.setVisible(false);
+
+ ContentProposalAdapter adapter = new ContentProposalAdapter(providerURI, new ComboContentAdapter(), getProposalProvider(), null, null);
+ adapter.setPropagateKeys(true);
+ adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
+// String[] proposals = new String[providerURI.getItems().length];
+//
+// for (int i = 0; i < providerURI.getItems().length; i++) {
+// proposals[i] = providerURI.getItem(i);
+// }
+//
+// ComboViewer comboViewer = new ComboViewer(parent, SWT.NONE);
+// comboViewer.setContentProvider(new ArrayContentProvider());
+// comboViewer.setLabelProvider(new LabelProvider(){
+// @Override
+// public String getText(final Object element){
+// if(element instanceof String){
+// return (String) element;
+// }
+// return element.toString();
+// }
+// });
+// comboViewer.setInput(proposals);
+// // additionally, configure the comboViewer arbitrary
+// AutoCompleteField field = new AutoCompleteField(comboViewer.getCombo(), new ComboContentAdapter(), proposals);
+
+
+
+
+ //providerURI.addModifyListener(this);
labelException = new Label(parent, SWT.NULL);
labelException.setText("");
}
+ /**
+ * @return
+ */
+ IContentProposalProvider getProposalProvider() {
+ return new IContentProposalProvider() {
+ @Override
+ public IContentProposal[] getProposals(String contents, int position) {
+ //String[] items = getStringItems();
+ if (contents.length() == 0 || items.length == 0) {
+ return new IContentProposal[0];
+ }
+ StringMatcher matcher = new StringMatcher("*" + contents + "*", true, false); //$NON-NLS-1$ //$NON-NLS-2$
+ ArrayList<String> matches = new ArrayList<String>();
+ for (int i = 0; i < items.length; i++) {
+ if (matcher.match(items[i])) {
+ matches.add(items[i]);
+ }
+ }
+
+ // We don't want to autoactivate if the only proposal exactly matches
+ // what is in the combo. This prevents the popup from
+ // opening when the user is merely scrolling through the combo values or
+ // has accepted a combo value.
+ if (matches.size() == 1 && matches.get(0).equals(providerURI.getText())) {
+ return new IContentProposal[0];
+ }
+
+ if (matches.isEmpty()) {
+ return new IContentProposal[0];
+ }
+
+ // Make the proposals
+ IContentProposal[] proposals = new IContentProposal[matches.size()];
+ for (int i = 0; i < matches.size(); i++) {
+ final String proposal = matches.get(i);
+ proposals[i] = new IContentProposal() {
+
+ @Override
+ public String getContent() {
+ return proposal;
+ }
+
+ @Override
+ public int getCursorPosition() {
+ return proposal.length();
+ }
+
+ @Override
+ public String getDescription() {
+ return null;
+ }
+
+ @Override
+ public String getLabel() {
+ return null;
+ }
+ };
+ }
+ return proposals;
+ }
+ };
+ }
+
public boolean isAdmin() {
return isAdmin;
}
//User didn't type in a unique name...
if (name.equals("") || alreadyInList(name) || !StringUtils.isBlank(labelException.getText())) { //$NON-NLS-1$
Toolkit.getDefaultToolkit().beep();
- providerURI.selectAll();
+ //providerURI.selectAll();
return;
}
for (String item: list.getItems()){
if (item.equals(noProvider) || item.equals(serverSidePreference)){
//do nothing
- }else if (first || allProviderString == null || allProviderString == ""){ //$NON-NLS-1$
+ }else if (first || StringUtils.isBlank(allProviderString)){ //$NON-NLS-1$
allProviderString = item.trim();
first = false;
}else {
import eu.etaxonomy.cdm.model.description.Feature;
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
import eu.etaxonomy.cdm.model.metadata.CdmPreference.PrefKey;
-import eu.etaxonomy.cdm.model.metadata.IKeyLabel;
import eu.etaxonomy.cdm.model.metadata.IPreferencePredicate;
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
import eu.etaxonomy.cdm.model.metadata.PreferenceSubject;
String overrideKey = createPreferenceString(createOverridePreferenceString(name));
boolean override = getPreferenceStore().getBoolean(overrideKey);
- if (local || pref == null || (pref != null && pref.isAllowOverride() && override)){
+
+ if (local || (pref == null && override)|| (pref != null && pref.isAllowOverride() && override)){
+ //local preference
String dbSpecific = prefKey(name);
if (getPreferenceStore().contains(dbSpecific)){
- prefValue = getPreferenceStore().getString(dbSpecific);
- }else{
- prefValue = getPreferenceStore().
- getString(name);
+ return getPreferenceStore().getString(dbSpecific);
}
- if (StringUtils.isBlank(prefValue) || (pref == null && !override)){
- IPreferencePredicate pred = PreferencePredicate.getByKey(name);
- if (pred != null){
- if (pred.getDefaultValue() instanceof String){
- return (String)pred.getDefaultValue();
- }else if (pred.getDefaultValue() != null){
- return pred.getDefaultValue().toString();
- }
- }
- return prefValue;
+ }else if (pref != null){
+ //db preference
+ if (pref.getValue() == null){
+ Object result = PreferencePredicate.getByKey(pref.getPredicate()).getDefaultValue();
+ if (result instanceof String){
+ return (String)result;
+ }else{
+ return result.toString();
+ }
+ }
+ return pref.getValue();
+ }
+ //no override but default value
+ IPreferencePredicate pred = PreferencePredicate.getByKey(name);
+ if (pred != null){
+ if (pred.getDefaultValue() instanceof String){
+ return (String)pred.getDefaultValue();
+ }else if (pred.getDefaultValue() != null){
+ return pred.getDefaultValue().toString();
}
+ }
+ return null;
- }else if (pref != null){
- if (pref.getValue() == null){
- Object result = PreferencePredicate.getByKey(pref.getPredicate()).getDefaultValue();
- if (result instanceof String){
- return (String)result;
- }else{
- if (result == null){
- return null;
- }
- if (result instanceof IKeyLabel){
- return ((IKeyLabel)result).getKey();
- }
- return result.toString();
- }
- }
- prefValue = pref.getValue();
- }
- return prefValue;
+// if (local || (pref == null && override) || (pref != null && pref.isAllowOverride() && override)){
+// String dbSpecific = prefKey(name);
+// if (getPreferenceStore().contains(dbSpecific)){
+// prefValue = getPreferenceStore().getString(dbSpecific);
+// }else{
+// prefValue = getPreferenceStore().
+// getString(name);
+// }
+// if (StringUtils.isBlank(prefValue) || (pref == null && !override)){
+// IPreferencePredicate pred = PreferencePredicate.getByKey(name);
+// if (pred != null){
+// if (pred.getDefaultValue() instanceof String){
+// return (String)pred.getDefaultValue();
+// }else if (pred.getDefaultValue() != null){
+// return pred.getDefaultValue().toString();
+// }
+// }
+// return prefValue;
+// }
+//
+// }else if (pref != null){
+// if (pref.getValue() == null){
+// Object result = PreferencePredicate.getByKey(pref.getPredicate()).getDefaultValue();
+// if (result instanceof String){
+// return (String)result;
+// }else{
+// if (result == null){
+// return null;
+// }
+// if (result instanceof IKeyLabel){
+// return ((IKeyLabel)result).getKey();
+// }
+// return result.toString();
+// }
+// }
+// prefValue = pref.getValue();
+// }
+// return prefValue;
}
}catch(NumberFormatException e){
logger.debug("Preference value of " + name + " is not a number");
}
-
String overrideKey = createPreferenceString(createOverridePreferenceString(name));
- boolean override = true;
- if (getPreferenceStore().contains(overrideKey)){
- override = getPreferenceStore().getBoolean(overrideKey);
- }
- if (local || pref == null || (pref != null && pref.isAllowOverride() && override)){
+ boolean override = getPreferenceStore().getBoolean(overrideKey);
+ if (local || (pref == null && override) || (pref != null && pref.isAllowOverride() && override)){
String dbSpecific = prefKey(name);
if (getPreferenceStore().contains(dbSpecific)){
result = getPreferenceStore().getInt(dbSpecific);
public static Boolean getBooleanValue(String name, boolean local) {
if (CdmStore.isActive()){
CdmPreference pref = getDBPreferenceValue(name);
-
String overrideKey = createPreferenceString(createOverridePreferenceString(name));
boolean override = getPreferenceStore().getBoolean(overrideKey);
- if (local || pref == null || (pref != null && pref.isAllowOverride() && override)){
+ if (local || (pref == null && override)|| (pref != null && pref.isAllowOverride() && override)){
+ //local preference
String dbSpecific = prefKey(name);
if (getPreferenceStore().contains(dbSpecific)){
return getPreferenceStore().getBoolean(dbSpecific);
- }else{
- IPreferencePredicate pred = PreferencePredicate.getByKey(name);
- if (pred != null){
- if (pred.getDefaultValue() instanceof Boolean){
- return (Boolean)pred.getDefaultValue();
- }else if (pred.getDefaultValue() != null){
- return Boolean.valueOf(pred.getDefaultValue().toString());
- }
- }
- return null;
}
- }else{
+ }else if (pref != null){
+ //db preference
if (pref.getValue() == null){
Object result = PreferencePredicate.getByKey(pref.getPredicate()).getDefaultValue();
if (result instanceof Boolean){
}
return Boolean.valueOf(pref.getValue());
}
-
+ //no override but default value
+ IPreferencePredicate pred = PreferencePredicate.getByKey(name);
+ if (pred != null){
+ if (pred.getDefaultValue() instanceof Boolean){
+ return (Boolean)pred.getDefaultValue();
+ }else if (pred.getDefaultValue() != null){
+ return Boolean.valueOf(pred.getDefaultValue().toString());
+ }
+ }
+ return null;
}else{
+ // no connection to db, use local preference
return getPreferenceStore().getBoolean(name);
}
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
import eu.etaxonomy.cdm.model.term.TermType;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.preference.GeneralTermPreferencePage;
/**
* <p>Constructor for LanguageMenuPreferences.</p>
*/
public CommonNameLanguagePreferences() {
- super();
+ super(Messages.CommonNameLanguages_Title);
+
isAdminPreference = false;
setPredicate(PreferencePredicate.CommonNameLanguages);
type = TermType.Language;
+
}
String text = multiLanguageEditing.getText();
if(text.startsWith(Messages.Preference_Use_Default)){
isMultilanguageTextEditingCapability = null;
- treeComposite.setEnabled(multiLangugeActivatedPref == null? true: multiLangugeActivatedPref.getValue() != null?Boolean.parseBoolean(multiLangugeActivatedPref.getValue().toString()): true);
+ treeComposite.setEnabled(multiLangugeActivatedPref == null? true: multiLangugeActivatedPref.getValue() != null?Boolean.valueOf(multiLangugeActivatedPref.getValue().toString()): true);
if (!isAdminPreference) {
overrideActivated = false;
}
if (isMultilanguageTextEditingCapability != null){
treeComposite.setEnabled(isMultilanguageTextEditingCapability);
}else{
- treeComposite.setEnabled(multiLangugeActivatedPref == null? true: multiLangugeActivatedPref.getValue() != null?Boolean.parseBoolean(multiLangugeActivatedPref.getValue().toString()): true);
+ treeComposite.setEnabled(multiLangugeActivatedPref == null? true: multiLangugeActivatedPref.getValue() != null?Boolean.valueOf(multiLangugeActivatedPref.getValue().toString()): true);
}
}
vocs.add(new TermVocabularyDto(voc.getUuid(), voc.getRepresentations(), voc.getTermType()));
}
+
}
return vocs;
}
activateCheckButton.addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e) {
- actualPref.setAllowOverride(overrideButton.getSelection());
- override = overrideButton.getSelection();
+ if (actualPref != null){
+ actualPref.setAllowOverride(activateCheckButton.getSelection());
+ }
+ override = activateCheckButton.getSelection();
}
});
+
return activateCheckButton;
}
String checkedValues = null;
if (actualArea == null){
checkedValues = pref.getValue();
+ override = pref.isAllowOverride();
}else{
if (actualPref == null){
PrefKey key = newAreaSpecificStatusPreference();
}
if (actualArea == null){
CdmPreference savePref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.AvailableDistributionStatus, saveCheckedElements);
- savePref.setAllowOverride(pref.isAllowOverride());
+ savePref.setAllowOverride(override);
pref = savePref;
}else{
PrefKey key = newAreaSpecificStatusPreference();
}
overrideButton = createAllowOverrideButton(parent);
- super.createControl(parent);
+ super.createControl(parent);
+ overrideButton.setSelection(override);
}
@Override