public static final String SHOW_ADVANCED_MEDIA_SECTION = "eu.etaxonomy.taxeditor.media.showAdvancedMedia";
public static final String SHOW_SIMPLE_NAME_DETAILS_SECTION = "eu.etaxonomy.taxeditor.name.showSimpleName";
+ public static final String SHOW_SIMPLE_NAME_DETAILS_TAXON = "eu.etaxonomy.taxeditor.name.showNameTaxon";
public static final String SHOW_NAME_DETAILS_SECTION_LSID = "eu.etaxonomy.taxeditor.name.showNameLsid";
public static final String SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE = "eu.etaxonomy.taxeditor.name.showNameNomenclaturalCode";
public static final String SHOW_NAME_DETAILS_SECTION_RANK = "eu.etaxonomy.taxeditor.name.showNameRank";
+ public static final String SHOW_NAME_DETAILS_SECTION_NAMECACHE = "eu.etaxonomy.taxeditor.name.showNameNameCache";
public static final String SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS = "eu.etaxonomy.taxeditor.name.showNameAtomisedEpithets";
public static final String SHOW_NAME_DETAILS_SECTION_AUTHORSHIP = "eu.etaxonomy.taxeditor.name.showNameAuthorship";
public static final String SHOW_NAME_DETAILS_SECTION_HYBRID = "eu.etaxonomy.taxeditor.name.showNameHybrid";
public static final String SHOW_NAME_DETAILS_SECTION_PROTOLOGUE = "eu.etaxonomy.taxeditor.name.showNameProtologue";
public static final String SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION = "eu.etaxonomy.taxeditor.name.showNameTypeDesignation";
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 PROMPT_FOR_OPEN_SPECIMEN_IN_EDITOR = "eu.etaxonomy.taxeditor.specimen.promptForOpenSpecimenInEditor";
// TODO RL
*/
public static final String P2_REPOSITORY_LIST = "eu.etaxonomy.taxeditor.p2.repositories";
+
+
+
+
+
}
getPreferenceStore().setDefault(OPENURL_IMAGE_MAX_HEIGHT, "1000");
getPreferenceStore().setDefault(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE, false);
getPreferenceStore().setDefault(CHECKLIST_ID_IN_VOCABULARY, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_AUTHORSHIP, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_HYBRID, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_LSID, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_NAMECACHE, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_PROTOLOGUE, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_RANK, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION, true);
}
/**
addField(new BooleanFieldEditor(IPreferenceKeys.SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS,
"Open search results in separate windows",
getFieldEditorParent()));
- addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION,
- "Show only a simple name details view",
- getFieldEditorParent()));
+// addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION,
+// "Show only a simple name details view",
+// getFieldEditorParent()));
Composite composite = new Composite(getFieldEditorParent(), SWT.NULL);
composite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1));
composite.setLayout(new RowLayout(1));
- final Label label = new Label(composite, SWT.NONE);
- label.setText("Choose the prefered match mode for searches.");
-
- final Combo combo_MatchMode = new Combo(composite, SWT.NONE);
-
- MatchMode[] matchModes = MatchMode.values();
- int currentSelectionIndex = 0;
- for(int i = 0; i < matchModes.length; i++){
- MatchMode mode = matchModes[i];
- combo_MatchMode.add(mode.name(),i);
- //TODO:the correct preselection is needed here!!
- if (mode.equals(PreferencesUtil.getSearchConfigurator().getMatchMode())){
- currentSelectionIndex = i;
- }
- }
-
- combo_MatchMode.select(currentSelectionIndex);
-
- combo_MatchMode.addSelectionListener(new SelectionAdapter() {
- /* (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- int selectionIndex = combo_MatchMode.getSelectionIndex();
- PreferencesUtil.getSearchConfigurator().setMatchMode(MatchMode.valueOf(combo_MatchMode.getItem(selectionIndex)));
- }
- });
+// final Label label = new Label(composite, SWT.NONE);
+// label.setText("Choose the prefered match mode for searches.");
+//
+// final Combo combo_MatchMode = new Combo(composite, SWT.NONE);
+//
+// MatchMode[] matchModes = MatchMode.values();
+// int currentSelectionIndex = 0;
+// for(int i = 0; i < matchModes.length; i++){
+// MatchMode mode = matchModes[i];
+// combo_MatchMode.add(mode.name(),i);
+// //TODO:the correct preselection is needed here!!
+// if (mode.equals(PreferencesUtil.getSearchConfigurator().getMatchMode())){
+// currentSelectionIndex = i;
+// }
+// }
+//
+// combo_MatchMode.select(currentSelectionIndex);
+//
+// combo_MatchMode.addSelectionListener(new SelectionAdapter() {
+// /* (non-Javadoc)
+// * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+// */
+// @Override
+// public void widgetSelected(SelectionEvent e) {
+// int selectionIndex = combo_MatchMode.getSelectionIndex();
+// PreferencesUtil.getSearchConfigurator().setMatchMode(MatchMode.valueOf(combo_MatchMode.getItem(selectionIndex)));
+// }
+// });
protected void createControls(ICdmFormElement formElement, NonViralName nonViralName, int style) {
if (isAdvancedView){
- toggleable_cache = formFactory.createToggleableTextField(this, "Name Cache", nonViralName.getNameCache(), nonViralName.isProtectedNameCache(), style);
+ toggleable_cache = formFactory.createToggleableTextField(this, "Name Cache", nonViralName.getNameCache(), nonViralName.isProtectedNameCache(), style);
+ }else{
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE)){
+ 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);
+ 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);
+ }
}
}
toggleable_cache.setVisible(false);
combo_nomenclaturalCode.setVisible(false);
}
+ }else{
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_CACHE)){
+ toggleable_cache = formFactory.createToggleableTextField(formElement, "Cache", entity.getTitleCache(), entity.isProtectedTitleCache() || entity.isProtectedFullTitleCache(), style);
+ if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
+ toggleable_cache.setVisible(false);
+ }
+ }
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE)){
+ combo_nomenclaturalCode = formFactory.createEnumComboElement(NomenclaturalCode.class, formElement, 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);
+
+ }
+
+
}
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);
+ }
+ }
+ }
}
ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
ExpandableComposite.EXPANDED | ExpandableComposite.EXPANDED);
if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
- TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- addPart(taxonBaseDetailSection);
+ TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(taxonBaseDetailSection);
+ }else{
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON)){
+ TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ addPart(taxonBaseDetailSection);
+ }
}
NonViralNameDetailSection nonViralNameSection = formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE)){
NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
+ addPart(referenceDetailSection);
+ }
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS)){
NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(nomenclaturalStatusSection);
- addPart(referenceDetailSection);
+
}
//TODO RL
- if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL) && !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
- ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- addPart(protologSection);
- addPart(typeDesignationSection);
- addPart(nameRelationshipSection);
+ if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL) ){
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE)){
+ ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(protologSection);
+ }
+
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION)){
+ TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(typeDesignationSection);
+ }
+
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP)){
+ NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(nameRelationshipSection);
+ }
}
addPart(parsingMessagesSection);