public static final String SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP = "eu.etaxonomy.taxeditor.name.showNameNameRelationship";
public static final String SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE = "eu.etaxonomy.taxeditor.name.showNameAppendedPhrase";
public static final String SHOW_NAME_DETAILS_SECTION_CACHE = "eu.etaxonomy.taxeditor.name.showNameCache";
-
+ public static final String SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE = "eu.etaxonomy.taxeditor.name.showAuthorCache";
public static final String PROMPT_FOR_OPEN_SPECIMEN_IN_EDITOR = "eu.etaxonomy.taxeditor.specimen.promptForOpenSpecimenInEditor";
// TODO RL
* Key for the saved P2 repositories
*/
public static final String P2_REPOSITORY_LIST = "eu.etaxonomy.taxeditor.p2.repositories";
+ public static final String ALLOW_OVERRIDE_NAMEDETAILS = "eu.etaxonomy.taxeditor.details.allow_override";
+
@Override
protected void createControls(ICdmFormElement formElement,
NonViralName entity, int style) {
- if (isAdvancedView){
+ if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE)){
toggleable_cache = formFactory.createToggleableTextField(this,
"Authorship Cache", entity.getAuthorshipCache(),
entity.isProtectedAuthorshipCache(), style);
}
NomenclaturalCode code = entity.getNomenclaturalCode();
- selectionCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
- getConversationHolder(),
- formElement, "Author",
- entity.getCombinationAuthorship(),
- EntitySelectionElement.ALL, style);
- addElement(selectionCombinationAuthor);
- selectionExCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
- getConversationHolder(),
- formElement, "Ex Author",
- entity.getExCombinationAuthorship(),
- EntitySelectionElement.ALL, style);
- addElement(selectionExCombinationAuthor);
- if (code != null){
- if (code.equals(NomenclaturalCode.ICZN)){
- text_publicationYear = formFactory.createNumberTextWithLabelElement(formElement, "Publication Year", ((ZoologicalName)entity).getPublicationYear(), style);
-
- }
- }
- selectionBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
- formElement, "Basionym Author", entity.getBasionymAuthorship(),
- EntitySelectionElement.ALL, style);
- addElement(selectionBasionymAuthor);
- selectionExBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
- formElement, "Ex Basionym Author",entity.getExBasionymAuthorship(),
- EntitySelectionElement.ALL, style);
-
- addElement(selectionExBasionymAuthor);
- if (code != null){
- if (code.equals(NomenclaturalCode.ICZN)){
-
- text_originalPublicationYear = formFactory.createNumberTextWithLabelElement(formElement, "Orig. Publication Year", ((ZoologicalName)entity).getOriginalPublicationYear(), style);
-
- }
- }
-
+ if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP)){
+ selectionCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
+ getConversationHolder(),
+ formElement, "Author",
+ entity.getCombinationAuthorship(),
+ EntitySelectionElement.ALL, style);
+ addElement(selectionCombinationAuthor);
+ selectionExCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
+ getConversationHolder(),
+ formElement, "Ex Author",
+ entity.getExCombinationAuthorship(),
+ EntitySelectionElement.ALL, style);
+ addElement(selectionExCombinationAuthor);
+ if (code != null){
+ if (code.equals(NomenclaturalCode.ICZN)){
+ text_publicationYear = formFactory.createNumberTextWithLabelElement(formElement, "Publication Year", ((ZoologicalName)entity).getPublicationYear(), style);
+
+ }
+ }
+ selectionBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
+ formElement, "Basionym Author", entity.getBasionymAuthorship(),
+ EntitySelectionElement.ALL, style);
+ addElement(selectionBasionymAuthor);
+ selectionExBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
+ formElement, "Ex Basionym Author",entity.getExBasionymAuthorship(),
+ EntitySelectionElement.ALL, style);
+
+ addElement(selectionExBasionymAuthor);
+ if (code != null){
+ if (code.equals(NomenclaturalCode.ICZN)){
+
+ text_originalPublicationYear = formFactory.createNumberTextWithLabelElement(formElement, "Orig. Publication Year", ((ZoologicalName)entity).getOriginalPublicationYear(), style);
+
+ }
+ }
+ }
}
if (isAdvancedView){
toggleable_cache = formFactory.createToggleableTextField(this, "Name Cache", nonViralName.getNameCache(), nonViralName.isProtectedNameCache(), style);
+ combo_rank = formFactory.createDefinedTermComboElement(TermType.Rank, this, "Rank", nonViralName.getRank(), style);
+ createGenusOrUninomialControls(this, nonViralName, style);
+ createInfragenerericEpithetControls(this, nonViralName, style);
+ createSpecificEpithetControls(this, nonViralName, style);
+ createInfraSpecificEpithetControls(this, nonViralName, style);
+ createSpecificNameParts(this, nonViralName, style);
+ text_appendedPhrase = formFactory.createTextWithLabelElement(formElement, "Appended Phrase", nonViralName.getAppendedPhrase(), style);
}else{
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE)){
toggleable_cache = formFactory.createToggleableTextField(this, "Name Cache", nonViralName.getNameCache(), nonViralName.isProtectedNameCache(), style);
}
+
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK)){
+ combo_rank = formFactory.createDefinedTermComboElement(TermType.Rank, this, "Rank", nonViralName.getRank(), style);
+ }
+
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS)){
+ createGenusOrUninomialControls(this, nonViralName, style);
+ createInfragenerericEpithetControls(this, nonViralName, style);
+ createSpecificEpithetControls(this, nonViralName, style);
+ createInfraSpecificEpithetControls(this, nonViralName, style);
+ createSpecificNameParts(this, nonViralName, style);
+ }
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE)){
+ text_appendedPhrase = formFactory.createTextWithLabelElement(formElement, "Appended Phrase", nonViralName.getAppendedPhrase(), style);
+ }
}
- combo_rank = formFactory.createDefinedTermComboElement(TermType.Rank, this, "Rank", nonViralName.getRank(), style);
- if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS)){
- createGenusOrUninomialControls(this, nonViralName, style);
- createInfragenerericEpithetControls(this, nonViralName, style);
- createSpecificEpithetControls(this, nonViralName, style);
- createInfraSpecificEpithetControls(this, nonViralName, style);
- createSpecificNameParts(this, nonViralName, style);
- }
- if (isAdvancedView){
- //createSpecificNameParts(this, nonViralName, style);
- text_appendedPhrase = formFactory.createTextWithLabelElement(formElement, "Appended Phrase", nonViralName.getAppendedPhrase(), style);
- }else{
- if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE)){
- text_appendedPhrase = formFactory.createTextWithLabelElement(formElement, "Appended Phrase", nonViralName.getAppendedPhrase(), style);
- }
- }
}
/**
combo_nomenclaturalCode.setSelection(entity.getNomenclaturalCode());
if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
combo_nomenclaturalCode.setVisible(false);
- }
+ }
}
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID)){
textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style);
-
+
}
-
-
+
+
}
section_name.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_name);
addElement(section_name);
- 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);
-
+ 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){
+ if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID)){
if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
section_hybrid = formFactory.createHybridDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
section_hybrid.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_hybrid);
addElement(section_hybrid);
}
- }else{
- if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
- if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID)){
- section_hybrid = formFactory.createHybridDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
- section_hybrid.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
- addControl(section_hybrid);
- addElement(section_hybrid);
- }
- }
}
else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.TissueSample){
//TissueSample should only be created by using it's own class
//in future using only one class with different SpecimenOrObservationTypes is desired
-// createTissueSampleSection(rootElement);
+ createTissueSampleSection(rootElement);
}
else{
createDerivedUnitBaseElementSection(rootElement);