import org.eclipse.ui.forms.widgets.ExpandableComposite;
import eu.etaxonomy.cdm.model.name.IBacterialName;
-import eu.etaxonomy.cdm.model.name.INonViralName;
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
import eu.etaxonomy.cdm.model.name.TaxonName;
import eu.etaxonomy.taxeditor.l10n.Messages;
* @author n.hoffmann
* @created May 20, 2010
*/
-public class NonViralNameDetailElement
+public class NonViralNameDetailElement
extends AbstractIdentifiableEntityDetailElement<TaxonName> {
private NameDetailSection section_name;
text_nameApprobation = formFactory.createTextWithLabelElement(formElement, "Name Approbation", entity.getNameApprobation(),style);
}
textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style);
-
+
}else{
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_CACHE)){
textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style);
}
-
+
}
section_name.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_name);
addElement(section_name);
- if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP)){
+// if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP)){
section_author = formFactory.createAuthorshipDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
section_author.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_author);
addElement(section_author);
- }
+// }
//TODO RL
if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID)){
section_hybrid = formFactory.createHybridDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
// if(combo_nomenclaturalCode!=null){
// combo_nomenclaturalCode.setEnabled(false);
// }
-
+
if(toggleable_cache!=null){
toggleable_cache.setEnabled(getEntity().isProtectedTitleCache() || getEntity().isProtectedFullTitleCache());
setIrrelevant(toggleable_cache.getState(),
boolean change = checkForDeletableParts(combo_nomenclaturalCode.getSelection());
if (change){
getEntity().setNameType(combo_nomenclaturalCode.getSelection());
-
+
this.updateContent();
section_hybrid.setEntity(getEntity());
section_author.setEntity(getEntity());
}else {
return true;
}
-
+
}
if (actualCode.equals(NomenclaturalCode.ICNB)){
if (getEntity().getNameApprobation() != null || getEntity().getSubGenusAuthorship() != null){
}else{
return true;
}
-
+
}
if (actualCode.equals(NomenclaturalCode.Fungi)){
if (getEntity().isAnamorphic() ){
}else{
return true;
}
-
+
}
if (actualCode.equals(NomenclaturalCode.ICNAFP)){
return true;