boolean isSimpleDetailsViewActivated;
boolean isUseLocalSettings;
Composite child ;
+ Composite localSettings ;
@Override
public void init(IWorkbench workbench) {
}
});
+ child = new Composite(composite, SWT.NONE);
+ child.setLayout(new GridLayout());
+ child.setVisible(isUseLocalSettings);
+
isSimpleDetailsViewActivated = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION);
- final Button activateCheckButton = new Button(composite, SWT.CHECK);
+
+
+
+ final Button activateCheckButton = new Button(child, SWT.CHECK);
activateCheckButton.setText("Show only a simple name details view");
activateCheckButton.setSelection(isSimpleDetailsViewActivated);
activateCheckButton.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent e) {
isSimpleDetailsViewActivated = activateCheckButton.getSelection();
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION, isSimpleDetailsViewActivated);
- if(isSimpleDetailsViewActivated){
- child.setVisible(true);
- child.setEnabled(true);
+ if(isSimpleDetailsViewActivated && isUseLocalSettings){
+ localSettings.setVisible(true);
+ localSettings.setEnabled(true);
}else{
- child.setVisible(false);
- child.setEnabled(false);
+ localSettings.setVisible(false);
+ localSettings.setEnabled(false);
}
}
});
+ localSettings = new Composite(child, SWT.NONE);
+ localSettings.setLayout(new GridLayout());
+ localSettings.setVisible(isSimpleDetailsViewActivated);
- child = new Composite(composite, SWT.H_SCROLL);
- child.setLayout(new GridLayout());
- child.setVisible(isSimpleDetailsViewActivated);
- final Button showTaxon = new Button(child, SWT.CHECK);
+ final Button showTaxon = new Button(localSettings, SWT.CHECK);
boolean isShowTaxon = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON);
showTaxon.setText("Show taxon of the name");
showTaxon.setSelection(isShowTaxon);
}
});
- final Button showLsid = new Button(child, SWT.CHECK);
+ final Button showLsid = new Button(localSettings, SWT.CHECK);
boolean isShowLSID = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID);
showLsid.setText("Show Lsid of the name");
showLsid.setSelection(isShowLSID);
}
});
- final Button showNomenclaturalCode = new Button(child, SWT.CHECK);
+ final Button showNomenclaturalCode = new Button(localSettings, SWT.CHECK);
boolean isShowNomenclaturalCode = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE);
showNomenclaturalCode.setText("Show the nomenclatural code");
showNomenclaturalCode.setSelection(isShowNomenclaturalCode);
}
});
- final Button showNameCache = new Button(child, SWT.CHECK);
+ final Button showNameCache = new Button(localSettings, SWT.CHECK);
boolean isShowNameCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE);
showNameCache.setText("Show nameCache of the name (only the scientific name without the author and year)");
showNameCache.setSelection(isShowNomenclaturalCode);
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE, isShowNameCache);
}
});
- final Button showAppendedPhrase = new Button(child, SWT.CHECK);
+ final Button showAppendedPhrase = new Button(localSettings, SWT.CHECK);
boolean isShowAppendedPhrase = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE);
showAppendedPhrase.setText("Show appended phrase");
showAppendedPhrase.setSelection(isShowAppendedPhrase);
}
});
- final Button showRank = new Button(child, SWT.CHECK);
+ final Button showRank = new Button(localSettings, SWT.CHECK);
boolean isShowRank = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK);
showRank.setText("Show rank of the name");
showRank.setSelection(isShowRank);
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK, isShowRank);
}
});
- final Button showEpithets = new Button(child, SWT.CHECK);
+ final Button showEpithets = new Button(localSettings, SWT.CHECK);
boolean isShowEpithets = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS);
showEpithets.setText("Show atomised epithets");
showEpithets.setSelection(isShowEpithets);
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS, isShowEpithets);
}
});
- final Button showAuthorship = new Button(child, SWT.CHECK);
+ final Button showAuthorship = new Button(localSettings, SWT.CHECK);
boolean isShowAuthorship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP);
showAuthorship.setText("Show authorship section");
showAuthorship.setSelection(isShowAuthorship);
}
});
- final Button showNomenclaturalRef = new Button(child, SWT.CHECK);
+ final Button showNomenclaturalRef = new Button(localSettings, SWT.CHECK);
boolean isShowNomenclaturalRef = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE);
showNomenclaturalRef.setText("Show nomenclatural reference section");
showNomenclaturalRef.setSelection(isShowNomenclaturalRef);
}
});
- final Button showNomenclaturalStatus = new Button(child, SWT.CHECK);
+ final Button showNomenclaturalStatus = new Button(localSettings, SWT.CHECK);
boolean isShowNomenclaturalStatus = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS);
showNomenclaturalStatus.setText("Show nomenclatural status section");
showNomenclaturalStatus.setSelection(isShowNomenclaturalStatus);
}
});
- final Button showProtologue = new Button(child, SWT.CHECK);
+ final Button showProtologue = new Button(localSettings, SWT.CHECK);
boolean isShowProtologue = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE);
showProtologue.setText("Show protologue section");
showProtologue.setSelection(isShowProtologue);
}
});
- final Button showTypeDesignation = new Button(child, SWT.CHECK);
+ final Button showTypeDesignation = new Button(localSettings, SWT.CHECK);
boolean isShowTypeDesignation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION);
showTypeDesignation.setText("Show name type designation section");
showTypeDesignation.setSelection(isShowTypeDesignation);
});
- final Button showNameRelationship = new Button(child, SWT.CHECK);
+ final Button showNameRelationship = new Button(localSettings, SWT.CHECK);
boolean isShowNameRelationship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP);
showNameRelationship.setText("Show name relationship section");
showNameRelationship.setSelection(isShowNameRelationship);
}
});
- final Button showHybrid = new Button(child, SWT.CHECK);
+ final Button showHybrid = new Button(localSettings, SWT.CHECK);
boolean isShowHybrid = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID);
showHybrid.setText("Show hybrid section");
showHybrid.setSelection(isShowHybrid);
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID, isShowHybrid);
}
});
- final Button showNameApprobiation = new Button(child, SWT.CHECK);
+ final Button showNameApprobiation = new Button(localSettings, SWT.CHECK);
boolean isShowNameApprobiation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_APPROBATION);
showNameApprobiation.setText("Show name approbiation (for bacterial names)");
showNameApprobiation.setSelection(isShowNameApprobiation);
if(isSimpleDetailsViewActivated){
- child.setEnabled(true);
+ localSettings.setEnabled(true);
}else{
- child.setEnabled(false);
+ localSettings.setEnabled(false);
}
}else{
Label label = new Label(composite, SWT.NONE);