Revision d7f33c8d
Added by Patrick Plitzner almost 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java | ||
---|---|---|
31 | 31 |
import eu.etaxonomy.cdm.model.name.Rank; |
32 | 32 |
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation; |
33 | 33 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
34 |
import eu.etaxonomy.cdm.model.name.TextualTypeDesignation; |
|
35 | 34 |
import eu.etaxonomy.cdm.model.name.TypeDesignationBase; |
36 | 35 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
37 | 36 |
import eu.etaxonomy.taxeditor.editor.ITaxonEditor; |
... | ... | |
68 | 67 |
|
69 | 68 |
@Override |
70 | 69 |
protected void addAction(ToolBarManager toolBarManager) { |
71 |
if(PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES)){ |
|
72 |
// add textual type designation button |
|
73 |
Action addTextualTypeDesignationAction = new Action("Add", IAction.AS_PUSH_BUTTON){ |
|
74 |
@Override |
|
75 |
public void run() { |
|
76 |
TextualTypeDesignation textualTypeDesignation = TextualTypeDesignation.NewInstance(); |
|
77 |
addElement(textualTypeDesignation); |
|
78 |
if(! getSection().isExpanded()) { |
|
79 |
getSection().setExpanded(true); |
|
80 |
} |
|
81 |
internalUpdateSection(true); |
|
82 |
} |
|
83 |
}; |
|
84 |
addTextualTypeDesignationAction.setImageDescriptor(new ImageDescriptor() { |
|
85 |
|
|
86 |
@Override |
|
87 |
public ImageData getImageData() { |
|
88 |
return ImageResources.getImage(ImageResources.ADD_TEXT).getImageData(); |
|
89 |
} |
|
90 |
}); |
|
91 |
addTextualTypeDesignationAction.setToolTipText("Add textual type designation"); |
|
92 |
toolBarManager.add(addTextualTypeDesignationAction); |
|
93 |
} |
|
70 |
|
|
71 |
// FIXME #8135 temporary disabled textual type designation |
|
72 |
// if(PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES)){ |
|
73 |
// // add textual type designation button |
|
74 |
// Action addTextualTypeDesignationAction = new Action("Add", IAction.AS_PUSH_BUTTON){ |
|
75 |
// @Override |
|
76 |
// public void run() { |
|
77 |
// TextualTypeDesignation textualTypeDesignation = TextualTypeDesignation.NewInstance(); |
|
78 |
// addElement(textualTypeDesignation); |
|
79 |
// if(! getSection().isExpanded()) { |
|
80 |
// getSection().setExpanded(true); |
|
81 |
// } |
|
82 |
// internalUpdateSection(true); |
|
83 |
// } |
|
84 |
// }; |
|
85 |
// addTextualTypeDesignationAction.setImageDescriptor(new ImageDescriptor() { |
|
86 |
// |
|
87 |
// @Override |
|
88 |
// public ImageData getImageData() { |
|
89 |
// return ImageResources.getImage(ImageResources.ADD_TEXT).getImageData(); |
|
90 |
// } |
|
91 |
// }); |
|
92 |
// addTextualTypeDesignationAction.setToolTipText("Add textual type designation"); |
|
93 |
// toolBarManager.add(addTextualTypeDesignationAction); |
|
94 |
// } |
|
94 | 95 |
|
95 | 96 |
// clone button |
96 | 97 |
if(!isSpecimenType() || |
Also available in: Unified diff
ref #8135 temporary disabled textual type designation