Revision fa39cfe4
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java | ||
---|---|---|
173 | 173 |
public static final String SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP = "eu.etaxonomy.taxeditor.name.showNameNameRelationship"; |
174 | 174 |
public static final String SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE = "eu.etaxonomy.taxeditor.name.showNameAppendedPhrase"; |
175 | 175 |
public static final String SHOW_NAME_DETAILS_SECTION_CACHE = "eu.etaxonomy.taxeditor.name.showNameCache"; |
176 |
|
|
176 |
public static final String SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE = "eu.etaxonomy.taxeditor.name.showAuthorCache"; |
|
177 | 177 |
public static final String PROMPT_FOR_OPEN_SPECIMEN_IN_EDITOR = "eu.etaxonomy.taxeditor.specimen.promptForOpenSpecimenInEditor"; |
178 | 178 |
|
179 | 179 |
// TODO RL |
... | ... | |
187 | 187 |
* Key for the saved P2 repositories |
188 | 188 |
*/ |
189 | 189 |
public static final String P2_REPOSITORY_LIST = "eu.etaxonomy.taxeditor.p2.repositories"; |
190 |
public static final String ALLOW_OVERRIDE_NAMEDETAILS = "eu.etaxonomy.taxeditor.details.allow_override"; |
|
191 |
|
|
190 | 192 |
|
191 | 193 |
|
192 | 194 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailElement.java | ||
---|---|---|
67 | 67 |
@Override |
68 | 68 |
protected void createControls(ICdmFormElement formElement, |
69 | 69 |
NonViralName entity, int style) { |
70 |
if (isAdvancedView){ |
|
70 |
if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE)){
|
|
71 | 71 |
toggleable_cache = formFactory.createToggleableTextField(this, |
72 | 72 |
"Authorship Cache", entity.getAuthorshipCache(), |
73 | 73 |
entity.isProtectedAuthorshipCache(), style); |
... | ... | |
78 | 78 |
} |
79 | 79 |
NomenclaturalCode code = entity.getNomenclaturalCode(); |
80 | 80 |
|
81 |
selectionCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
|
|
82 |
getConversationHolder(),
|
|
83 |
formElement, "Author",
|
|
84 |
entity.getCombinationAuthorship(),
|
|
85 |
EntitySelectionElement.ALL, style);
|
|
86 |
addElement(selectionCombinationAuthor);
|
|
87 |
selectionExCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
|
|
88 |
getConversationHolder(),
|
|
89 |
formElement, "Ex Author",
|
|
90 |
entity.getExCombinationAuthorship(),
|
|
91 |
EntitySelectionElement.ALL, style);
|
|
92 |
addElement(selectionExCombinationAuthor);
|
|
93 |
if (code != null){
|
|
94 |
if (code.equals(NomenclaturalCode.ICZN)){
|
|
95 |
text_publicationYear = formFactory.createNumberTextWithLabelElement(formElement, "Publication Year", ((ZoologicalName)entity).getPublicationYear(), style);
|
|
96 |
|
|
97 |
} |
|
98 |
} |
|
99 |
selectionBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
|
|
100 |
formElement, "Basionym Author", entity.getBasionymAuthorship(),
|
|
101 |
EntitySelectionElement.ALL, style);
|
|
102 |
addElement(selectionBasionymAuthor);
|
|
103 |
selectionExBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
|
|
104 |
formElement, "Ex Basionym Author",entity.getExBasionymAuthorship(),
|
|
105 |
EntitySelectionElement.ALL, style);
|
|
106 |
|
|
107 |
addElement(selectionExBasionymAuthor); |
|
108 |
if (code != null){
|
|
109 |
if (code.equals(NomenclaturalCode.ICZN)){
|
|
110 |
|
|
111 |
text_originalPublicationYear = formFactory.createNumberTextWithLabelElement(formElement, "Orig. Publication Year", ((ZoologicalName)entity).getOriginalPublicationYear(), style); |
|
112 |
|
|
113 |
} |
|
114 |
}
|
|
115 |
|
|
81 |
if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP)){
|
|
82 |
selectionCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
|
|
83 |
getConversationHolder(),
|
|
84 |
formElement, "Author",
|
|
85 |
entity.getCombinationAuthorship(),
|
|
86 |
EntitySelectionElement.ALL, style);
|
|
87 |
addElement(selectionCombinationAuthor);
|
|
88 |
selectionExCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
|
|
89 |
getConversationHolder(),
|
|
90 |
formElement, "Ex Author",
|
|
91 |
entity.getExCombinationAuthorship(),
|
|
92 |
EntitySelectionElement.ALL, style);
|
|
93 |
addElement(selectionExCombinationAuthor);
|
|
94 |
if (code != null){
|
|
95 |
if (code.equals(NomenclaturalCode.ICZN)){
|
|
96 |
text_publicationYear = formFactory.createNumberTextWithLabelElement(formElement, "Publication Year", ((ZoologicalName)entity).getPublicationYear(), style); |
|
97 |
|
|
98 |
}
|
|
99 |
}
|
|
100 |
selectionBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
|
|
101 |
formElement, "Basionym Author", entity.getBasionymAuthorship(),
|
|
102 |
EntitySelectionElement.ALL, style);
|
|
103 |
addElement(selectionBasionymAuthor);
|
|
104 |
selectionExBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
|
|
105 |
formElement, "Ex Basionym Author",entity.getExBasionymAuthorship(),
|
|
106 |
EntitySelectionElement.ALL, style); |
|
107 |
|
|
108 |
addElement(selectionExBasionymAuthor);
|
|
109 |
if (code != null){
|
|
110 |
if (code.equals(NomenclaturalCode.ICZN)){ |
|
111 |
|
|
112 |
text_originalPublicationYear = formFactory.createNumberTextWithLabelElement(formElement, "Orig. Publication Year", ((ZoologicalName)entity).getOriginalPublicationYear(), style); |
|
113 |
|
|
114 |
}
|
|
115 |
} |
|
116 | 116 |
|
117 |
} |
|
117 | 118 |
|
118 | 119 |
} |
119 | 120 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameDetailElement.java | ||
---|---|---|
80 | 80 |
|
81 | 81 |
if (isAdvancedView){ |
82 | 82 |
toggleable_cache = formFactory.createToggleableTextField(this, "Name Cache", nonViralName.getNameCache(), nonViralName.isProtectedNameCache(), style); |
83 |
combo_rank = formFactory.createDefinedTermComboElement(TermType.Rank, this, "Rank", nonViralName.getRank(), style); |
|
84 |
createGenusOrUninomialControls(this, nonViralName, style); |
|
85 |
createInfragenerericEpithetControls(this, nonViralName, style); |
|
86 |
createSpecificEpithetControls(this, nonViralName, style); |
|
87 |
createInfraSpecificEpithetControls(this, nonViralName, style); |
|
88 |
createSpecificNameParts(this, nonViralName, style); |
|
89 |
text_appendedPhrase = formFactory.createTextWithLabelElement(formElement, "Appended Phrase", nonViralName.getAppendedPhrase(), style); |
|
83 | 90 |
}else{ |
84 | 91 |
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE)){ |
85 | 92 |
toggleable_cache = formFactory.createToggleableTextField(this, "Name Cache", nonViralName.getNameCache(), nonViralName.isProtectedNameCache(), style); |
86 | 93 |
} |
94 |
|
|
95 |
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK)){ |
|
96 |
combo_rank = formFactory.createDefinedTermComboElement(TermType.Rank, this, "Rank", nonViralName.getRank(), style); |
|
97 |
} |
|
98 |
|
|
99 |
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS)){ |
|
100 |
createGenusOrUninomialControls(this, nonViralName, style); |
|
101 |
createInfragenerericEpithetControls(this, nonViralName, style); |
|
102 |
createSpecificEpithetControls(this, nonViralName, style); |
|
103 |
createInfraSpecificEpithetControls(this, nonViralName, style); |
|
104 |
createSpecificNameParts(this, nonViralName, style); |
|
105 |
} |
|
106 |
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE)){ |
|
107 |
text_appendedPhrase = formFactory.createTextWithLabelElement(formElement, "Appended Phrase", nonViralName.getAppendedPhrase(), style); |
|
108 |
} |
|
87 | 109 |
} |
88 |
combo_rank = formFactory.createDefinedTermComboElement(TermType.Rank, this, "Rank", nonViralName.getRank(), style); |
|
89 |
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS)){ |
|
90 |
createGenusOrUninomialControls(this, nonViralName, style); |
|
91 |
createInfragenerericEpithetControls(this, nonViralName, style); |
|
92 |
createSpecificEpithetControls(this, nonViralName, style); |
|
93 |
createInfraSpecificEpithetControls(this, nonViralName, style); |
|
94 |
createSpecificNameParts(this, nonViralName, style); |
|
95 |
} |
|
96 |
if (isAdvancedView){ |
|
97 |
//createSpecificNameParts(this, nonViralName, style); |
|
98 |
text_appendedPhrase = formFactory.createTextWithLabelElement(formElement, "Appended Phrase", nonViralName.getAppendedPhrase(), style); |
|
99 |
}else{ |
|
100 |
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE)){ |
|
101 |
text_appendedPhrase = formFactory.createTextWithLabelElement(formElement, "Appended Phrase", nonViralName.getAppendedPhrase(), style); |
|
102 |
} |
|
103 |
} |
|
104 | 110 |
} |
105 | 111 |
|
106 | 112 |
/** |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailElement.java | ||
---|---|---|
76 | 76 |
combo_nomenclaturalCode.setSelection(entity.getNomenclaturalCode()); |
77 | 77 |
if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){ |
78 | 78 |
combo_nomenclaturalCode.setVisible(false); |
79 |
}
|
|
79 |
} |
|
80 | 80 |
} |
81 | 81 |
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID)){ |
82 | 82 |
textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style); |
83 |
|
|
83 |
|
|
84 | 84 |
} |
85 |
|
|
86 |
|
|
85 |
|
|
86 |
|
|
87 | 87 |
} |
88 | 88 |
|
89 | 89 |
|
... | ... | |
91 | 91 |
section_name.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
92 | 92 |
addControl(section_name); |
93 | 93 |
addElement(section_name); |
94 |
section_author = formFactory.createAuthorshipDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED); |
|
95 |
section_author.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
|
96 |
addControl(section_author); |
|
97 |
addElement(section_author); |
|
98 |
|
|
94 |
if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP)){ |
|
95 |
section_author = formFactory.createAuthorshipDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED); |
|
96 |
section_author.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
|
97 |
addControl(section_author); |
|
98 |
addElement(section_author); |
|
99 |
} |
|
99 | 100 |
//TODO RL |
100 |
if (isAdvancedView){ |
|
101 |
if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID)){
|
|
101 | 102 |
if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){ |
102 | 103 |
section_hybrid = formFactory.createHybridDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE); |
103 | 104 |
section_hybrid.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
104 | 105 |
addControl(section_hybrid); |
105 | 106 |
addElement(section_hybrid); |
106 | 107 |
} |
107 |
}else{ |
|
108 |
if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){ |
|
109 |
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID)){ |
|
110 |
section_hybrid = formFactory.createHybridDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE); |
|
111 |
section_hybrid.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
|
112 |
addControl(section_hybrid); |
|
113 |
addElement(section_hybrid); |
|
114 |
} |
|
115 |
} |
|
116 | 108 |
} |
117 | 109 |
|
118 | 110 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java | ||
---|---|---|
278 | 278 |
else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.TissueSample){ |
279 | 279 |
//TissueSample should only be created by using it's own class |
280 | 280 |
//in future using only one class with different SpecimenOrObservationTypes is desired |
281 |
// createTissueSampleSection(rootElement);
|
|
281 |
createTissueSampleSection(rootElement); |
|
282 | 282 |
} |
283 | 283 |
else{ |
284 | 284 |
createDerivedUnitBaseElementSection(rootElement); |
Also available in: Unified diff
more changes for configurable name details view