Revision 8635f23f
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailElement.java | ||
---|---|---|
14 | 14 |
import org.eclipse.ui.forms.widgets.ExpandableComposite; |
15 | 15 |
|
16 | 16 |
import eu.etaxonomy.cdm.model.name.IBacterialName; |
17 |
import eu.etaxonomy.cdm.model.name.INonViralName; |
|
18 | 17 |
import eu.etaxonomy.cdm.model.name.NomenclaturalCode; |
19 | 18 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
20 | 19 |
import eu.etaxonomy.taxeditor.l10n.Messages; |
... | ... | |
34 | 33 |
* @author n.hoffmann |
35 | 34 |
* @created May 20, 2010 |
36 | 35 |
*/ |
37 |
public class NonViralNameDetailElement
|
|
36 |
public class NonViralNameDetailElement |
|
38 | 37 |
extends AbstractIdentifiableEntityDetailElement<TaxonName> { |
39 | 38 |
|
40 | 39 |
private NameDetailSection section_name; |
... | ... | |
66 | 65 |
text_nameApprobation = formFactory.createTextWithLabelElement(formElement, "Name Approbation", entity.getNameApprobation(),style); |
67 | 66 |
} |
68 | 67 |
textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style); |
69 |
|
|
68 |
|
|
70 | 69 |
|
71 | 70 |
}else{ |
72 | 71 |
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_CACHE)){ |
... | ... | |
87 | 86 |
textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style); |
88 | 87 |
|
89 | 88 |
} |
90 |
|
|
89 |
|
|
91 | 90 |
|
92 | 91 |
} |
93 | 92 |
|
... | ... | |
96 | 95 |
section_name.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
97 | 96 |
addControl(section_name); |
98 | 97 |
addElement(section_name); |
99 |
if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP)){ |
|
98 |
// if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP)){
|
|
100 | 99 |
section_author = formFactory.createAuthorshipDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED); |
101 | 100 |
section_author.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
102 | 101 |
addControl(section_author); |
103 | 102 |
addElement(section_author); |
104 |
} |
|
103 |
// }
|
|
105 | 104 |
//TODO RL |
106 | 105 |
if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID)){ |
107 | 106 |
section_hybrid = formFactory.createHybridDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE); |
... | ... | |
123 | 122 |
// if(combo_nomenclaturalCode!=null){ |
124 | 123 |
// combo_nomenclaturalCode.setEnabled(false); |
125 | 124 |
// } |
126 |
|
|
125 |
|
|
127 | 126 |
if(toggleable_cache!=null){ |
128 | 127 |
toggleable_cache.setEnabled(getEntity().isProtectedTitleCache() || getEntity().isProtectedFullTitleCache()); |
129 | 128 |
setIrrelevant(toggleable_cache.getState(), |
... | ... | |
191 | 190 |
boolean change = checkForDeletableParts(combo_nomenclaturalCode.getSelection()); |
192 | 191 |
if (change){ |
193 | 192 |
getEntity().setNameType(combo_nomenclaturalCode.getSelection()); |
194 |
|
|
193 |
|
|
195 | 194 |
this.updateContent(); |
196 | 195 |
section_hybrid.setEntity(getEntity()); |
197 | 196 |
section_author.setEntity(getEntity()); |
... | ... | |
219 | 218 |
}else { |
220 | 219 |
return true; |
221 | 220 |
} |
222 |
|
|
221 |
|
|
223 | 222 |
} |
224 | 223 |
if (actualCode.equals(NomenclaturalCode.ICNB)){ |
225 | 224 |
if (getEntity().getNameApprobation() != null || getEntity().getSubGenusAuthorship() != null){ |
... | ... | |
231 | 230 |
}else{ |
232 | 231 |
return true; |
233 | 232 |
} |
234 |
|
|
233 |
|
|
235 | 234 |
} |
236 | 235 |
if (actualCode.equals(NomenclaturalCode.Fungi)){ |
237 | 236 |
if (getEntity().isAnamorphic() ){ |
... | ... | |
252 | 251 |
}else{ |
253 | 252 |
return true; |
254 | 253 |
} |
255 |
|
|
254 |
|
|
256 | 255 |
} |
257 | 256 |
if (actualCode.equals(NomenclaturalCode.ICNAFP)){ |
258 | 257 |
return true; |
Also available in: Unified diff
simple name details: evaluation of author settings should be done only in authorship section