import eu.etaxonomy.taxeditor.editor.name.e4.dnd.NameEditorDragListenerE4;
import eu.etaxonomy.taxeditor.editor.name.e4.dnd.NameEditorDragSourceEffect;
import eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInNewGroupOperation;
+import eu.etaxonomy.taxeditor.event.EventUtility;
+import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.IElementHasDetails;
import eu.etaxonomy.taxeditor.model.NameHelper;
private LineBreakListener lineBreakListener;
private int cursorPosition;
+
+ private long lastEventTime;
protected Composite control;
nameCompositeModifyListener = (ModifyEvent e)->{
// mark the composite dirty
setDirty(true);
-
+ lastEventTime = System.currentTimeMillis();
// parse the text
String text = nameViewer.getTextWidget().getText();
TaxonName name = (TaxonName)parseHandler.parse(text);
getTaxonBase().setName(name);
getTaxonBase().setTitleCache((getTaxonBase().generateTitle()));
-// EventUtility.postAsyncEvent(WorkbenchEventConstants.REFRESH_DETAILS, true);
+
// show errors resulting from parsing
calculateAnnotations();
// store the position of the cursor
storeCursor();
// notify selection listener
- setDelayedSelection();
+ setDelayedSelection();
+ //EventUtility.postAsyncEvent(WorkbenchEventConstants.REFRESH_DETAILS, true);
+
};
nameCompositeFocusListener = new FocusAdapter() {
public void focusLost(FocusEvent e) {
super.focusLost(e);
persistName();
+ EventUtility.postAsyncEvent(WorkbenchEventConstants.REFRESH_DETAILS, true);
}
};
delay.requestStop();
delay = new Delay(display);
delay.start();
-
}
public void setBackground(Color color) {
}
}
+ @Override
+ public void fillFields() {
+ textOriginalLabel.setText(getEntity().getOriginalLabelInfo());
+ }
+
}
public void setEntityWithoutUpdate(T entity){
this.entity = entity;
- // the id is always 0 if the entity was not yet saved, so it is new in this case
- if(getEntity() == null || (getEntity() instanceof CdmBase && StoreUtil.getCdmEntity(getEntity()).getId() == 0)) {
- // new entity, not yet saved
- requiredCrud = EnumSet.of(CRUD.CREATE);
- } else {
- requiredCrud = EnumSet.of(CRUD.UPDATE);
- }
+ fillFields();
}
+
+ public abstract void fillFields();
@Override
public T getEntity() {
setSectionTitle();
layout();
}
+
+ public void setEntityWithoutUpdate(ENTITY entity) {
+
+ if (detailElement != null) {
+ detailElement.fillFields();
+
+ }
+ super.setEntity(entity);
+ setSectionTitle();
+
+ }
protected void setSectionTitle() {
String title = "";
protected void registerCacheRelevance(ICacheRelevantFormElement element) {
registerCacheRelevance(element, toggleable_cache);
}
+
+ @Override
+ public void fillFields() {
+ if (!getEntity().getTitleCache().equals(toggleable_cache.getText())) {
+ toggleable_cache.setText(getEntity().getTitleCache());
+ toggleable_cache.setSelected(getEntity().isProtectedTitleCache());
+ }
+ }
}
\ No newline at end of file
public void setEntity(Object entity) {
// nothing
}
+
+ @Override
+ public void fillFields() {
+ // do nothing
+ }
}
* @param taxon a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
*/
public abstract void setTaxonBase(TaxonBase<?> taxon);
+
+ public abstract void setTaxonBaseWithoutUpdate(TaxonBase<?> taxon);
public abstract TaxonBase<?> getTaxonBase();
}
getEntity().setIsPartOf(selection_partOfInstitution.getSelection());
}
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity() != null) {
+ text_name.setText(getEntity().getName());
+ text_code.setText(getEntity().getCode());
+ selection_partOfInstitution.setEntity(getEntity().getIsPartOf());
+ }
+
+ }
}
\ No newline at end of file
updateCacheRelevance();
updateToggleableCacheField();
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity() != null) {
+ text_nomenclaturalTitle.setText(getEntity().getNomenclaturalTitle());
+ toggleable_cache.setText(getEntity().getTitleCache());
+ toggleable_cache.setCacheEnabled(getEntity().isProtectedTitleCache());
+ text_collectorTitle.setText(getEntity().getCollectorTitle());
+ text_firstname.setText(getEntity().getGivenName());
+ text_lastname.setText(getEntity().getFamilyName());
+ text_prefix.setText(getEntity().getPrefix());
+ text_suffix.setText(getEntity().getSuffix());
+ text_initials.setText(getEntity().getInitials());
+ time_lifespan.setTimePeriod(getEntity().getLifespan()!= null? getEntity().getLifespan(): null);
+ text_orcid.setText(getEntity().getOrcid() != null? getEntity().getOrcid().toString(): null);
+ text_lsid.setText(getEntity().getLsid()!= null? getEntity().getLsid().toString(): null);
+ }
+
+ }
}
\ No newline at end of file
public void setNomenclaturalTeam(boolean isNomenclaturalTeam) {
this.isNomenclaturalTeam = isNomenclaturalTeam;
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity()!= null) {
+ toggleable_nomenclaturalTitleCache.setText(getEntity().getNomenclaturalTitleCache());
+ toggleable_collectorTitleCache.setText(getEntity().getCollectorTitleCache());
+ hasAdditionalMembers.setEnabled(getEntity().isHasMoreMembers());
+
+ section_teamMembers.setEntity(getEntity());
+
+ }
+
+ }
}
\ No newline at end of file
getEntity().setTimeperiod(element_date.getTimePeriod());
}
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity()!= null) {
+ text_treeLabel.setText(getEntity().getName().getText());
+ selection_reference.setEntity(getEntity().getReference());
+ text_microReference.setText(getEntity().getMicroReference());
+ element_date.setEntity(getEntity().getTimeperiod()!= null? getEntity().getTimeperiod(): null);;
+ section_collectingAreas.setEntity(getEntity());
+ }
+
+ }
}
\ No newline at end of file
}
}
if (checkbox_publish != null){
- checkbox_publish.setSelected(getTaxon().isPublish());
+ checkbox_publish.setSelection(getTaxon().isPublish());
}
}else{
if (isCreateNew()){
// TODO Auto-generated method stub
return null;
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity()!= null) {
+ if (selection_parentTaxonNode!= null) {
+ selection_parentTaxonNode.setEntity(getEntity().getParent());
+ }
+ if (selection_reuseExistingTaxon != null) {
+ selection_reuseExistingTaxon.setEntity(getEntity().getTaxon());
+ }
+ if (selection_reuseExistingName!= null) {
+ selection_reuseExistingName.setEntity(getEntity().getTaxon() != null?getEntity().getTaxon().getName(): null);
+ }
+ if (selection_SecRef != null) {
+ selection_SecRef.setEntity(getEntity().getTaxon() != null?getEntity().getTaxon().getSec(): null);
+ }else {
+ textTaxonSec.setText(getEntity().getTaxon() != null?getEntity().getTaxon().getSec().getTitle():null);
+ }
+ microReference.setText(getEntity().getTaxon() != null? getEntity().getTaxon().getSecMicroReference(): null);
+ textNewTaxonName.setText(getEntity().getTaxon() != null? getEntity().getTaxon().getName().getTitleCache():null);
+ selectionNodeAgentRelation.setEntity(getEntity());
+ combo_status.setSelection(getEntity().getStatus());
+ this.set_publish(taxon.isPublish());
+ multiLanguageTextPlacementNotes.setMultilanguageText(getEntity().getStatusNote());
+ }
+
+ }
}
}
}
+ @Override
+ public void fillFields() {
+ selection_reference.setEntity(getEntity().getCitation());
+ text_referenceDetail.setText(getEntity().getCitationMicroReference());
+
+ }
+
}
}
setEnabled(enabled, except);
}
+
+ @Override
+ public void fillFields() {
+ // TODO actually not used
+
+ }
}
}
}
+
+ @Override
+ public void fillFields() {
+ if(getEntity().hasStructuredData()){
+ FetchNaturalLanguageDescriptionJob job = new FetchNaturalLanguageDescriptionJob("Retrieving Natural Language Description", getEntity());
+ job.schedule();
+ }else{
+ label.setText("Taxon Description does not contain structured data.");
+ }
+
+ }
}
}
}
+
+ @Override
+ public void fillFields() {
+ timePeriod.setEntity(getEntity().getTimeperiod());
+ if (section_modifiers != null) {
+ section_modifiers.setEntity(getEntity());
+ }
+ if (text_modifyingText!= null) {
+ if(getEntity().getModifyingText().get(CdmStore.getDefaultLanguage()) != null) {
+ text_modifyingText.setText(getEntity().getModifyingText().get(CdmStore.getDefaultLanguage()).getText());
+ }
+ }
+ }
+
+
+
}
\ No newline at end of file
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.section.description.ModifierSection;
import eu.etaxonomy.taxeditor.ui.section.description.StateDataSection;
/**
getEntity().setOrderRelevant(checkbox_orderRelevant.getSelection());
}
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity()!= null) {
+ super.fillFields();
+ checkbox_orderRelevant.setEnabled(getEntity().getOrderRelevant());
+ section_stateData.setEntity(getEntity());
+ }
+ }
}
}
}
+ @Override
+ public void fillFields() {
+ if (getEntity()!= null) {
+ super.fillFields();
+ combo_language.setSelection(getEntity().getLanguage());
+ selection_namedArea.setEntity(getEntity().getArea());
+ commonName.setText(getEntity().getName());
+ }
+
+
+ }
+
}
public void setName(String nameCache){
taxonOfDistribtion.setText(nameCache);
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity() != null) {
+ super.fillFields();
+ selection_namedArea.setEntity(getEntity().getArea());
+ combo_presenceAbsence.setSelection(getEntity().getStatus());
+ String nameCache = null;
+ nameCache = ((IDistributionEditorPart)AbstractUtility.getActivePart()).getEditor().getActualNameCache();
+ taxonOfDistribtion.setText(nameCache);
+ }
+ }
}
\ No newline at end of file
getEntity().putDescription(CdmStore.getDefaultLanguage(), text_description.getText());
}
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity()!= null) {
+ super.fillFields();
+ if (getEntity().getDescription() != null && getEntity().getDescription().get(CdmStore.getDefaultLanguage()) != null) {
+ text_description.setText(getEntity().getDescription().get(
+ CdmStore.getDefaultLanguage()).getText());
+ }
+ selection_derivedUnit.setEntity(getEntity().getAssociatedSpecimenOrObservation());
+ }
+
+ }
}
\ No newline at end of file
// FIXME
}
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity() != null) {
+ super.fillFields();
+
+ comboMeasurementUnit.setSelection(getEntity().getUnit());
+ section_statisticalMeasurementValues.setEntity(getEntity());
+
+ }
+
+ }
}
getEntity().putDescription(CdmStore.getDefaultLanguage(), interactionDescription.getText());
}
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity()!= null) {
+ super.fillFields();
+ taxonSelection.setEntity(getEntity().getTaxon2());
+ interactionDescription.setText(getEntity().getDescription(CdmStore.getDefaultLanguage()));
+
+ }
+
+ }
}
}
+ @Override
+ public void fillFields() {
+ if (getEntity() != null) {
+ super.fillFields();
+ timePeriod.setTimePeriod(getEntity().getPeriod());
+ }
+
+ }
+
}
}
super.propertyChange(event);
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity()!= null) {
+ super.fillFields();
+ multilanguageTextElement.setMultilanguageText(getEntity().getMultilanguageText());
+ }
+
+ }
}
}
}
+ @Override
+ public void fillFields() {
+ if (getEntity()!= null) {
+ element_Representation.setTerm(getEntity(), isEnabled());
+ comboStructuralModifier.setSelection(getEntity().getStructureModifier());
+ supportsQuantitativeData.setSelection(getEntity().isSupportsQuantitativeData());
+ supportsCategoricalData.setSelection(getEntity().isSupportsCategoricalData());;
+ availableForTaxon.setSelection(getEntity().isAvailableForTaxon());
+ availableForTaxonName.setSelection(getEntity().isAvailableForTaxonName());
+ availableForSpecimenOrObservation.setSelection(getEntity().isAvailableForOccurrence());
+ sectionStateVocabularies.setEntity(getEntity());
+ sectionMeasurementUnits.setEntity(getEntity());
+ sectionStatisticalMeasures.setEntity(getEntity());
+ sectionModifierVocabularies.setEntity(getEntity());
+
+ text_structure.setText(CharacterNodeDetailElement.getStructureText(getEntity()));
+ text_property.setText(CharacterNodeDtoDetailElement.getPropertyText(getEntity()));
+ ratioTo.setText(CharacterNodeDetailElement.getRatioToText(getEntity()));
+ }
+
+ }
+
}
}
+ @Override
+ public void fillFields() {
+ if (getEntity() != null) {
+ element_Representation.setTermDto(getEntity(), true);
+ comboStructuralModifier.setSelectionDto(getEntity().getStructureModifier());
+ supportsQuantitativeData.setSelection(getEntity().isSupportsQuantitativeData());
+ supportsCategoricalData.setSelection(getEntity().isSupportsCategoricalData());
+ availableForTaxon.setSelection(getEntity().isAvailableForTaxon());
+ availableForTaxonName.setSelection(getEntity().isAvailableForTaxonName());
+ availableForSpecimenOrObservation.setSelection(getEntity().isAvailableForOccurrence());
+ sectionStateVocabularies.setEntity(getEntity());
+ sectionMeasurementUnits.setEntity(getEntity());
+ sectionStatisticalMeasures.setEntity(getEntity());
+ sectionModifierVocabularies.setEntity(getEntity());
+ text_structure.setText(getEntity().getStructure().getPath());
+ text_property.setText(getEntity().getProperty().getPath());
+ ratioTo.setText(getEntity().getRatioTo() != null? getEntity().getRatioTo().getPath():null);
+ }
+
+ }
+
}
private CharacterDetailSection characterDetails;
private ICdmFormElement parentFormElement;
-//
-// protected RepresentationElement element_Representation;
-//
-// private TermComboElement<DefinedTerm> comboStructuralModifier;
-//
-// private CheckboxElement supportsQuantitativeData;
-//
-// private CheckboxElement supportsCategoricalData;
-//
-// private StateVocabularyCollectionSection sectionStateVocabularies;
-//
-// private MeasurementUnitCollectionSection sectionMeasurementUnits;
-//
-// private StatisticalMeasureCollectionSection sectionStatisticalMeasures;
-//
-// private RecommendedModifierVocabulariesCollectionSection sectionModifierVocabularies;
-
private InapplicableIfEntityCollectionSectionForNode sectionInapplicableIf;
private OnlyApplicableIfEntityCollectionSectionForNode sectionOnlyApplicableIf;
addElement(characterDetails);
addControl(characterDetails);
characterDetails.setEntity(entity.getTerm());
-// element_Representation = formFactory.createTranslatableRepresentationElement(formElement, entity.getTerm().getPreferredRepresentation(CdmStore.getDefaultLanguage()),entity.getTerm(), 100, style, true);
-//
-// createText(formElement, "Structure", getStructureText(entity.getTerm()));
-// createText(formElement, "Property", getPropertyText(entity.getTerm()));
-//
-// comboStructuralModifier = formFactory.createDefinedTermComboElement(TermType.StructureModifier, formElement, "Structural Modifier", entity.getTerm().getStructureModifier(), style);
-//
-// supportsQuantitativeData = formFactory.createCheckbox(formElement, "Supports Quantitative Data", entity.getTerm().isSupportsQuantitativeData(), style);
-// supportsCategoricalData = formFactory.createCheckbox(formElement, "Supports Categorical Data", entity.getTerm().isSupportsCategoricalData(), style);
-//
-// if (supportsCategoricalData.getSelection()) {
-// sectionStateVocabularies = formFactory.createStateVocabulariesSection(
-// parentFormElement, StoreUtil.getSectionStyle(StateVocabularyCollectionSection.class, entity.getClass().getCanonicalName(), true));
-// sectionStateVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-// sectionStateVocabularies.setEntity(entity.getTerm());
-// }
-// if (supportsQuantitativeData.getSelection()) {
-// sectionMeasurementUnits = formFactory.createMeasurementUnitCollectionSection(
-// parentFormElement, StoreUtil.getSectionStyle(MeasurementUnitCollectionSection.class, entity.getClass().getCanonicalName(), true));
-// sectionMeasurementUnits.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-// sectionMeasurementUnits.setEntity(entity.getTerm());
-//
-// sectionStatisticalMeasures = formFactory.createStatisticalMeasureCollectionSection(
-// parentFormElement, StoreUtil.getSectionStyle(StatisticalMeasureCollectionSection.class, entity.getClass().getCanonicalName(), true));
-// sectionStatisticalMeasures.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-// sectionStatisticalMeasures.setEntity(entity.getTerm());
-// }
-// if (supportsCategoricalData.getSelection() || supportsQuantitativeData.getSelection()) {
-// sectionModifierVocabularies = formFactory.createRecommendedModifierVocabulariesCollectionSection(
-// parentFormElement, StoreUtil.getSectionStyle(RecommendedModifierVocabulariesCollectionSection.class, entity.getClass().getCanonicalName(), true));
-// sectionModifierVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-// sectionModifierVocabularies.setEntity(entity.getTerm());
-// }
-
// applicability
sectionInapplicableIf = formFactory.createInapplicableIfEntityCollectionSectionForNode(
formElement, StoreUtil.getSectionStyle(InapplicableIfEntityCollectionSection.class, entity.getTerm().getClass().getCanonicalName()));
@Override
public void handleEvent(Object eventSource) {
-// if(eventSource == characterDetails){
-// getEntity().getTerm().setStructureModifier(comboStructuralModifier.getSelection());
-// }
-// if(eventSource == supportsQuantitativeData || eventSource == supportsCategoricalData){
-// //if any type is selected disable supportsTextData
-// getEntity().getTerm().setSupportsTextData(false);
-// }
-// if(eventSource == supportsQuantitativeData){
-// getEntity().getTerm().setSupportsQuantitativeData(supportsQuantitativeData.getSelection());
-// if(supportsQuantitativeData.getSelection()){
-// activateQuantitativeWidgets();
-// }
-// else{
-// removeQuantitativeWidgets();
-// }
-// StoreUtil.reflowParentScrolledForm(getLayoutComposite(), true);
-// }
-// else if(eventSource == supportsCategoricalData){
-// getEntity().getTerm().setSupportsCategoricalData(supportsCategoricalData.getSelection());
-// if (supportsCategoricalData.getSelection()) {
-// activateCategoricalWidgets();
-// }
-// else{
-// removeCategoricalWidgets();
-// }
-// StoreUtil.reflowParentScrolledForm(getLayoutComposite(), true);
-// }
-// else if (eventSource == element_Representation) {
-// Representation selectedRepresentation = element_Representation.getSelectedRepresentation();
-// if(selectedRepresentation!=null){
-// Language representationLanguage = selectedRepresentation.getLanguage();
-// if(representationLanguage==null){
-// representationLanguage = Language.getDefaultLanguage();
-// }
-// getEntity().getTerm().setLabel(selectedRepresentation.getLabel(), representationLanguage);
-// getEntity().getTerm().getRepresentation(representationLanguage).setAbbreviatedLabel(selectedRepresentation.getAbbreviatedLabel());
-// getEntity().getTerm().getRepresentation(representationLanguage).setText(selectedRepresentation.getDescription());
-// }
-// getEntity().getTerm().setTitleCache(null);
-// }
+
}
-// private void activateQuantitativeWidgets(){
-// //disable categorical widgets
-// supportsCategoricalData.setSelection(false);
-// getEntity().getTerm().setSupportsCategoricalData(false);
-// removeCategoricalWidgets();
-//
-// //measurement units
-// sectionMeasurementUnits = formFactory.createMeasurementUnitCollectionSection(getConversationHolder(),
-// parentFormElement, StoreUtil.getSectionStyle(MeasurementUnitCollectionSection.class, getEntity().getClass().getCanonicalName(), true));
-// sectionMeasurementUnits.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-// sectionMeasurementUnits.setEntity(getEntity().getTerm());
-//
-// //statistical measures
-// sectionStatisticalMeasures = formFactory.createStatisticalMeasureCollectionSection(
-// parentFormElement, StoreUtil.getSectionStyle(StatisticalMeasureCollectionSection.class, getEntity().getClass().getCanonicalName(), true));
-// sectionStatisticalMeasures.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-// sectionStatisticalMeasures.setEntity(getEntity().getTerm());
-//
-// //modifiers
-// sectionModifierVocabularies = formFactory.createRecommendedModifierVocabulariesCollectionSection(
-// parentFormElement, StoreUtil.getSectionStyle(RecommendedModifierVocabulariesCollectionSection.class, getEntity().getClass().getCanonicalName(), true));
-// sectionModifierVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-// sectionModifierVocabularies.setEntity(getEntity().getTerm());
-// }
-//
-// private void removeQuantitativeWidgets(){
-// if(sectionMeasurementUnits!=null){
-// removeElementsAndControls(sectionMeasurementUnits);
-// removeElementsAndControls(sectionStatisticalMeasures);
-// removeElementsAndControls(sectionModifierVocabularies);
-// }
-// }
-//
-// private void activateCategoricalWidgets(){
-// //disable quantitative widgeets
-// supportsQuantitativeData.setSelection(false);
-// getEntity().getTerm().setSupportsQuantitativeData(false);
-// removeQuantitativeWidgets();
-//
-// //states
-// sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(),
-// parentFormElement, StoreUtil.getSectionStyle(StateVocabularyCollectionSection.class, getEntity().getClass().getCanonicalName(), true));
-// sectionStateVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-// sectionStateVocabularies.setEntity(getEntity().getTerm());
-//
-// //modifiers
-// sectionModifierVocabularies = formFactory.createRecommendedModifierVocabulariesCollectionSection(
-// parentFormElement, StoreUtil.getSectionStyle(RecommendedModifierVocabulariesCollectionSection.class, getEntity().getClass().getCanonicalName(), true));
-// sectionModifierVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-// sectionModifierVocabularies.setEntity(getEntity().getTerm());
-// }
-//
-// private void removeCategoricalWidgets(){
-// if(sectionStateVocabularies!=null){
-// removeElementsAndControls(sectionStateVocabularies);
-// removeElementsAndControls(sectionModifierVocabularies);
-// }
-// }
+ @Override
+ public void fillFields() {
+ characterDetails.setEntity(getEntity().getTerm());
+ sectionInapplicableIf.setEntity(getEntity());
+ sectionOnlyApplicableIf.setEntity(getEntity());
+
+ }
}
\ No newline at end of file
// }
}
+ @Override
+ public void fillFields() {
+ characterDetails.setEntity((CharacterDto)getEntity().getTerm());
+ sectionInapplicableIf.setEntity(getEntity());
+ sectionOnlyApplicableIf.setEntity(getEntity());
+
+ }
+
// private void activateQuantitativeWidgets(){
// //disable categorical widgets
// supportsCategoricalData.setSelection(false);
return false;
}
+ @Override
+ public void fillFields() {
+ String serviceUriString = PreferencesUtil.getStringValue(PreferencePredicate.EditMapServiceAccessPoint.getKey());
+ String message = null;
+ try {
+ URI serviceUri = new URI(serviceUriString);
+ if(UriUtils.isServiceAvailable(serviceUri, 500)){
+// image = formFactory.createBrowserElement(formElement, null, style);
+ // FIXME : This is a temporary workaround which ic
+ // waiting for #5357 to be fixed
+ if(!isUnsavedDistribution(getEntity())) {
+ String mapUriString = getMapUriString(getEntity());
+ image.setImageUriString(mapUriString);
+ message = mapUriString;
+ }
+ getParentElement().getLayoutComposite().layout();
+
+ return;
+ } else {
+ message = String.format("The service is not available: %s", serviceUriString);
+ }
+ } catch (URISyntaxException e) {
+ message = String.format("The URI has problems: %s", serviceUriString);
+ }
+
+ }
+
}
EventUtility.postEvent(WorkbenchEventConstants.ADD_SAVE_CANDIDATE, getEntity().getUuid());
}
+ @Override
+ public void fillFields() {
+ sectionInapplicableIf.setEntity(getEntity());
+ sectionOnlyApplicableIf.setEntity(getEntity());
+
+ }
+
}
}
EventUtility.postEvent(WorkbenchEventConstants.ADD_SAVE_CANDIDATE, getEntity());
}
+
+ @Override
+ public void fillFields() {
+
+ allowDuplicates.setSelection(getEntity().isAllowDuplicate());
+ orderRelevant.setSelection(getEntity().isOrderRelevant());
+ isFlat.setSelection(getEntity().isFlat());
+ element_Representation.setTermDto(getEntity(), enabled);
+
+ }
}
\ No newline at end of file
}
}
+
+ @Override
+ public void fillFields() {
+ allowDuplicates.setSelection(getEntity().isAllowDuplicates());
+ orderRelevant.setSelection(getEntity().isOrderRelevant());
+ isFlat.setSelection(getEntity().isFlat());
+
+ }
+
}
}
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
+
}
}
}
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
+
}
}
firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
getEntity().setOtherNode(selection_otherNode.getEntity());
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
return uriBuffer;
}
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
+
}
}
}
}
+
+ @Override
+ public void fillFields() {
+ /*
+ toggleable_cache.setText(getEntity().getAuthorshipCache());
+ toggleable_cache.setSelected(getEntity().isProtectedAuthorshipCache());
+ selectionExBasionymAuthor.setEntity(getEntity().getExBasionymAuthorship());
+ selectionBasionymAuthor.setEntity(getEntity().getBasionymAuthorship());
+ selectionExCombinationAuthor.setEntity(getEntity().getExCombinationAuthorship());
+ selectionCombinationAuthor.setEntity(getEntity().getCombinationAuthorship());
+ if (text_originalPublicationYear != null) {
+
+ }
+ if (text_publicationYear != null) {
+ text_publicationYear.setNumber(((IZoologicalName)getEntity()).getPublicationYear());
+ text_originalPublicationYear.setNumber(((IZoologicalName)getEntity()).getOriginalPublicationYear());
+ }
+
+ */
+
+
+ }
}
\ No newline at end of file
INonViralName name = HibernateProxyHelper.deproxy(entity.getName());
setEntity(name);
}
+ @Override
+ public void setTaxonBaseWithoutUpdate(TaxonBase entity) {
+ this.taxonBase = entity;
+ INonViralName name = HibernateProxyHelper.deproxy(entity.getName());
+ setEntityWithoutUpdate(name);
+ }
@Override
public String getHeading() {
}
}
}
+
+ @Override
+ public void fillFields() {
+ checkboxMonomHybrid.setSelection(getEntity().isMonomHybrid());
+ checkboxBinomHybrid.setSelection(getEntity().isBinomHybrid());
+ checkboxTrinomHybrid.setSelection(getEntity().isTrinomHybrid());
+ checkboxHybridFormula.setSelection(getEntity().isHybridFormula());
+
+ }
}
\ No newline at end of file
TaxonName name = HibernateProxyHelper.deproxy(taxon.getName());
setEntity(name);
}
+ @Override
+ public void setTaxonBaseWithoutUpdate(TaxonBase taxon) {
+ taxonBase = taxon;
+ TaxonName name = HibernateProxyHelper.deproxy(taxon.getName());
+ setEntityWithoutUpdate(name);
+ }
@Override
public TaxonBase getTaxonBase() {
updateCacheRelevance();
updateToggleableCacheField();
}
+
+ @Override
+ public void fillFields() {
+ super.fillFields();
+ if (combo_rank != null && (combo_rank.getSelection() == null || !combo_rank.getSelection().equals(getEntity().getRank())) ) {
+ combo_rank.setSelection(getEntity().getRank());
+ }
+ if(text_appendedPhrase != null && (text_appendedPhrase.getText() == null || !text_appendedPhrase.getText().equals(getEntity().getAppendedPhrase()))) {
+ text_appendedPhrase.setText(getEntity().getAppendedPhrase());
+ }
+ if (text_uninomial != null && (text_uninomial.getText() == null || !text_uninomial.getText().equals(getEntity().getGenusOrUninomial()))) {
+ text_uninomial.setText(getEntity().getGenusOrUninomial());
+ }
+ if (text_infragenericEpithet != null && (text_infragenericEpithet.getText() == null || !text_infragenericEpithet.getText().equals(getEntity().getInfraGenericEpithet()))) {
+ text_infragenericEpithet.setText(getEntity().getInfraGenericEpithet());
+ }
+ if (text_specificEpithet != null && (text_specificEpithet.getText() == null || !text_specificEpithet.getText().equals(getEntity().getSpecificEpithet()))) {
+ text_specificEpithet.setText(getEntity().getSpecificEpithet());
+ }
+ if (text_infraspecificEpithet != null && getEntity().getInfraSpecificEpithet() != null && !text_infraspecificEpithet.getText().equals(getEntity().getInfraSpecificEpithet())) {
+ text_infraspecificEpithet.setText(getEntity().getInfraSpecificEpithet());
+ }
+ if (checkbox_anamorphic != null && (checkbox_anamorphic.getSelection() != ((IFungusName)getEntity()).isAnamorphic())) {
+ checkbox_anamorphic.setSelection(((IFungusName)getEntity()).isAnamorphic());
+ }
+ if (text_cultivarName != null && ((ICultivarPlantName)getEntity()).getCultivarEpithet() != null && !text_cultivarName.getText().equals(((ICultivarPlantName)getEntity()).getCultivarEpithet())) {
+ text_cultivarName.setText(((ICultivarPlantName)getEntity()).getCultivarEpithet());
+ }
+ if (text_cultivarGroup != null && ((ICultivarPlantName)getEntity()).getCultivarGroupEpithet() != null && !text_cultivarGroup.getText().equals(((ICultivarPlantName)getEntity()).getCultivarGroupEpithet())) {
+ text_cultivarGroup.setText(((ICultivarPlantName)getEntity()).getCultivarGroupEpithet());
+ }
+ if (text_subGenusAuthorship != null && ((IBacterialName)getEntity()).getSubGenusAuthorship() != null && !text_subGenusAuthorship.getText().equals(((IBacterialName)getEntity()).getSubGenusAuthorship())) {
+ text_subGenusAuthorship.setText(((IBacterialName)getEntity()).getSubGenusAuthorship());
+ }
+ if (text_breed!= null && ((IZoologicalName)getEntity()).getBreed() != null && !text_breed.getText().equals(((IZoologicalName)getEntity()).getBreed())) {
+ text_breed.setText(((IZoologicalName)getEntity()).getBreed());
+ }
+ ((NameDetailSection)this.getParentElement()).setSectionTitle();
+
+
+ }
}
\ No newline at end of file
public void updateContent(){
((NameDetailElement)this.detailElement).updateContent();
}
+
+ @Override
+ public void setTaxonBaseWithoutUpdate(TaxonBase<?> taxon) {
+ this.taxonBase = taxon;
+ INonViralName name = HibernateProxyHelper.deproxy(taxon.getName());
+ setEntityWithoutUpdate(name);
+
+ }
+
+
}
TaxonName name = HibernateProxyHelper.deproxy(entity.getName());
setEntity(name);
}
-
+ @Override
+ public void setTaxonBaseWithoutUpdate(TaxonBase entity) {
+ this.taxonBase = entity;
+ TaxonName name = HibernateProxyHelper.deproxy(entity.getName());
+ setEntity(name);
+ }
+
@Override
public TaxonBase getTaxonBase() {
return taxonBase;
TaxonName nonViralName = HibernateProxyHelper.deproxy(entity.getName());
setEntity(nonViralName);
}
+
+ @Override
+ public void setTaxonBaseWithoutUpdate(TaxonBase entity) {
+ this.taxonBase = entity;
+ TaxonName nonViralName = HibernateProxyHelper.deproxy(entity.getName());
+ this.setEntity(nonViralName);
+ }
@Override
public TaxonBase getTaxonBase() {
updateCacheRelevance();
updateToggleableCacheField();
}
+
+ @Override
+ public void fillFields() {
+ super.fillFields();
+
+ section_name.getDetailElement().fillFields();;
+ section_author.getDetailElement().fillFields();
+ combo_nomenclaturalCode.setSelection(getEntity().getNameType());
+ section_hybrid.getDetailElement().fillFields();
+ textLsid.setText(getEntity().getLsid()!= null? getEntity().getLsid().toString():null);
+ if (text_nameApprobation != null) {
+ text_nameApprobation.setText(getEntity().getNameApprobation());
+ }
+
+ }
}
\ No newline at end of file
AbstractCdmDetailSection<TaxonName> parentElement, int style) {
return formFactory.createNonViralNameDetailElement(parentElement);
}
+
+ @Override
+ public void setTaxonBaseWithoutUpdate(TaxonBase<?> taxon) {
+ taxonBase = taxon;
+ TaxonName name = HibernateProxyHelper.deproxy(taxon.getName());
+ setEntityWithoutUpdate(name);
+
+ }
}
TaxonName name = HibernateProxyHelper.deproxy(entity.getName());
setEntity(name);
}
+
+ @Override
+ public void setTaxonBaseWithoutUpdate(TaxonBase entity) {
+ this.setTaxonBase(entity);
+ }
private boolean isSpecimenType(){
Rank rank = getEntity() == null ? null : getEntity().getRank();
text_titleCache.setText(getEntity().getTitleCache());
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO actually this is only used for taxa/names
+
+ }
}
\ No newline at end of file
}
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
section_status.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_status.setEntity(entity);
- checkIsPublish = formFactory.createCheckbox(formElement, "Publish", entity.innerDerivedUnit().isPublish(), style);
+ checkIsPublish = formFactory.createCheckbox(formElement, "Publish", entity.baseUnit().isPublish(), style);
}
this.showSpecimenType = showSpecimenType;
}
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
+
}
section_determinationHistory.refresh();
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
}
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
+
}
\ No newline at end of file
text_gatheringEventDescription.getText());
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
new CdmViewerChooser(event.getViewer().getControl().getShell()).chooseViewer(firstElement);
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
}
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
toggleableText_titleCache.setText(getEntity().getTitleCache());
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
}
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
@Override
public void handleEvent(Object eventSource) {
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
getEntity().updateCache();
textDesignation.setText(getEntity().getLabelCache());
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
getEntity().setReversePrimer(selectionPrimerReverse.getSelection());
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
dnaQuality.setQualityCheckDate(dateTime);
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
getEntity().setCollection(selection_collection.getSelection());
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
}
return preservationMethod;
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
getEntity().setPublishedIn(selectionReference.getSelection());
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
sectionSampleDesignationHistory.refresh();
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
}
}
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
+
}
}
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
}
return preservationMethod;
}
+
+ @Override
+ public void fillFields() {
+
+ //TODO: implement
+// comboKindOfTissue;
+// selectionInstitution;
+// selectionStaff;
+// datePreparation;
+// comboPreservationMedium;
+// selectionCollection;
+// textAccessionNumber;
+// textBarcode;
+// checkIsPublish;
+
+ }
}
\ No newline at end of file
return mediaDetailElement.isAdvancedMediaView();
}
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
+
}
((NamedSourceBase)getEntity()).setNameUsedInSource(select_nameUsedInSource.getEntity());
}
}
+
+ @Override
+ public void fillFields() {
+ if (this.getEntity() != null) {
+ text_idInSource.setText(this.getEntity().getIdInSource());
+ text_idNamespace.setText(this.getEntity().getIdNamespace());;
+ text_originalInfo.setText(this.getEntity().getOriginalInfo());
+ select_nameUsedInSource.setEntity(((NamedSourceBase)getEntity()).getNameUsedInSource());;
+ }
+
+ }
}
\ No newline at end of file
@Override
public void handleEvent(Object eventSource) {
+ if (eventSource.equals(sourceElement)) {
+ getEntity().setNomenclaturalSource((NomenclaturalSource) sourceElement.getEntity());
+ }
+ }
+ @Override
+ public void fillFields() {
+ sourceElement.setEntity(getEntity().getNomenclaturalSource());
+
}
TaxonName name = HibernateProxyHelper.deproxy(entity.getName());
setEntity(name);
}
+ @Override
+ public void setTaxonBaseWithoutUpdate(TaxonBase entity) {
+ this.taxonBase = entity;
+ TaxonName name = HibernateProxyHelper.deproxy(entity.getName());
+ setEntityWithoutUpdate(name);
+ }
@Override
protected void setSectionTitle() {
updateContent();
this.getParentElement().refresh();
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity() != null) {
+ selection_Ref.setEntity(getEntity().getCitation()!= null? getEntity().getCitation(): null);
+ microReference.setText(getEntity().getCitationMicroReference());
+ if (accessed != null) {
+ accessed.setEntity(getEntity().getAccessed()!= null? getEntity().getAccessed(): null);
+ }
+ if (advancedSection != null) {
+ advancedSection.setEntity(getEntity());
+ }
+
+ externalLinks.setEntity(getEntity());
+
+ }
+
+ }
updateCacheRelevance();
}
+
+ @Override
+ public void fillFields() {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
setEntity(reference);
}
+ @Override
+ public void setTaxonBaseWithoutUpdate(TaxonBase<?> entity) {
+ this.taxonBase = entity;
+ TaxonName name = entity.getName();
+ Reference reference = HibernateProxyHelper.deproxy(name.getNomenclaturalReference());
+
+ setEntityWithoutUpdate(reference);
+ }
@Override
public String getHeading() {
}
+ @Override
+ public void fillFields() {
+ sourceElement.fillFields();
+
+ }
+
}
public class SecundumSourceElement extends OriginalSourceElement<SecundumSource> {
protected EntitySelectionElement<TaxonName> select_nameUsedInSource;
-
+
public SecundumSourceElement(CdmFormFactory formFactory, ICdmFormElement formElement, CdmBase cdmEntity,
String label) {
super(formFactory, formElement, cdmEntity, label);
@Override
protected void createControls(ICdmFormElement formElement, SecundumSource entity, int style) {
- setEntityWithoutUpdate(HibernateProxyHelper.deproxy(entity));
+ HibernateProxyHelper.deproxy(entity);
this.selection_Ref = formFactory.createSelectionElement(Reference.class, formElement, "Secundum", getEntity()!= null? getEntity().getCitation(): null, EntitySelectionElement.ALL, style);
if (entity.getCitation() != null) {
super.handleEvent(eventSource);
}
}
+
+ @Override
+ public void fillFields() {
+ if (getEntity() != null) {
+ super.fillFields();
+ if (select_nameUsedInSource != null) {
+ select_nameUsedInSource.setEntity(getEntity().getNameUsedInSource());
+ }
+ }
+
+ }
}
\ No newline at end of file
displayParsingProblems();
}
}
+ @Override
+ public void setTaxonBaseWithoutUpdate(TaxonBase entity) {
+ //
+ this.taxonBase = entity;
+ this.setEntityWithoutUpdate(entity.getName());
+ }
private void destroyParsingProblemComposites() {
setText(HEADING_SUCCESS);
updateContent();
}
+
+ @Override
+ public void fillFields() {
+ super.fillFields();
+ if (!(checkbox_doubtful.getSelection() == getEntity().isDoubtful())) {
+ checkbox_doubtful.setSelection(getEntity().isDoubtful());
+ }
+ if (!(checkbox_useNameCache.getSelection() == getEntity().isUseNameCache())) {
+ checkbox_useNameCache.setSelection(getEntity().isUseNameCache());
+ }
+ if (!secElement.getEntity().equals(getEntity().getSecSource())) {
+ secElement.fillFields();
+ }
+ if (getEntity().getAppendedPhrase()!= null && !getEntity().getAppendedPhrase().equals(text_appendedPhrase.getText())) {
+ text_appendedPhrase.setText(getEntity().getAppendedPhrase());
+ }
+ if (!(checkbox_published.getSelection() == getEntity().isPublish())) {
+ checkbox_published.setSelection(getEntity().isPublish());
+ }
+ if (combo_relationshipType != null && !((Synonym) getEntity()).getType().equals(combo_relationshipType.getSelection())) {
+ combo_relationshipType.setSelection(((Synonym) getEntity()).getType());
+ }
+ }
}
\ No newline at end of file
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection;
/**
* @author n.hoffmann
* @created Nov 4, 2009
*/
-public class TaxonBaseDetailSection extends AbstractCdmDetailSection<TaxonBase<?>> {
+public class TaxonBaseDetailSection extends AbstractCdmDetailSection<TaxonBase<?>> implements ITaxonBaseDetailSection{
public TaxonBaseDetailSection(CdmFormFactory cdmFormFactory, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
super(cdmFormFactory, parentElement, selectionProvider, style);
protected AbstractCdmDetailElement<TaxonBase<?>> createCdmDetailElement(AbstractCdmDetailSection<TaxonBase<?>> parentElement, int style) {
return formFactory.createTaxonBaseDetailElement(parentElement, style);
}
+
+ @Override
+ public void setTaxonBase(TaxonBase<?> taxon) {
+ this.setEntity(taxon);
+
+ }
+
+ @Override
+ public void setTaxonBaseWithoutUpdate(TaxonBase<?> taxon) {
+ setEntityWithoutUpdate(taxon);
+
+ }
+
+ @Override
+ public TaxonBase<?> getTaxonBase() {
+
+ return getEntity();
+ }
}
}
}
}
+
+ @Override
+ public void fillFields() {
+ super.fillFields();
+ checkbox_doubtful.setSelection(getEntity().isDoubtful());
+ }
}
\ No newline at end of file
// TODO Auto-generated method stub
return null;
}
+
+ @Override
+ public void fillFields() {
+ taxon = getEntity().getFromTaxon();
+ if (combo_misappliedRelationshipType!= null) {
+ combo_misappliedRelationshipType.setSelection(getEntity().getType());
+ }
+
+ super.singleSourceSection.fillFields();
+ selection_relatedTaxon.setEntity(getEntity().getToTaxon());;
+ checkBoxDoubtful.setSelection(getEntity().isDoubtful());
+
+ sensuReference.setEntity(taxon.getSec());;
+ text_sensu_microreference.setText(taxon.getSecMicroReference());
+ text_appendedPhrase.setText(taxon.getAppendedPhrase());
+
+ checkbox_published.setSelection(taxon.isPublish());;
+ //taxonElement.fillFields();???
+
+ }
}
\ No newline at end of file
TaxonName name = HibernateProxyHelper.deproxy(taxon.getName());
setName(name);
}
+
+ @Override
+ public void setTaxonBaseWithoutUpdate(TaxonBase taxon) {
+ this.setTaxonBase(taxon);
+ }
@Override
public TaxonBase getTaxonBase() {
checkbox_credentialsNonExpired.getSelection());
}
}
+
+ @Override
+ public void fillFields() {
+ // TODO implement
+ //text_username;
+ //text_emailAdress;
+ //selection_person;
+ //checkbox_credentialsNonExpired;
+ //checkbox_enabled;
+ //checkbox_accountNonLocked;
+ //checkbox_accountNonExpired;
+
+ }
}
\ No newline at end of file
public void widgetDefaultSelected(SelectionEvent e) {\r
// TODO Auto-generated method stub\r
}\r
+
+\r
+ @Override\r
+ public void fillFields() {\r
+ // TODO \r
+ //combo_UseCategory;\r
+ //combo_UseSubCategory;\r
+ //combo_PlantPart;\r
+ //combo_Country;\r
+ //combo_HumanGroup;\r
+ //combo_EthnicGroup;\r
+ }\r
+\r
}
return true;
}
+
+ public boolean setFormInputWithoutUpdate(Object input) {
+ if (formSection.isDisposed()){
+ return false;
+ }
+
+ this.rootInput = input;
+ //FIXME (CM): Need to fix this part of the design.
+ //The design seems to be locked to the idea that only one
+ // entity (either from the navigator or the editor) drives
+ // the detail view. In the case of multiple inputs the only workaround
+ // is checking the type and extracting relevant objects.
+ if (input instanceof IElementHasDetails) {
+ input = ((IElementHasDetails) input).getData();
+ }
+
+ if ((input instanceof TaxonBase)
+ && (formSection instanceof ITaxonBaseDetailSection )) {
+
+ //if (!((TaxonBase<?>) input).getTitleCache().equals(((ITaxonBaseDetailSection) formSection).getTaxonBase().getTitleCache())) {
+ ((ITaxonBaseDetailSection) formSection)
+ .setTaxonBaseWithoutUpdate((TaxonBase<?>) input);
+
+ //}
+
+ return true;
+ }
+ //actually only for Taxon Details...
+ return this.setFormInput( input);
+ }
@Override
public void propertyChange(PropertyChangeEvent event) {
// managedForm.reflow(true);
}
+
+
+ public void refresh_withoutnew_build() {
+ if(input!=null){
+ IFormPart[] parts = managedForm.getParts();
+ for (IFormPart part: parts) {
+ if(part instanceof CdmSectionPart) {
+ ((CdmSectionPart<?>)part).setFormInputWithoutUpdate(input);
+ }
+ }
+ }
+
+ }
public void layout(){
body.layout();
if (part instanceof IBulkEditor){
((IBulkEditor)part).setSelection(createSelection(object));
}
-// if (part instanceof ITaxonEditor){
-// ((ITaxonEditor)part).setDetailsChanged();
-// }
+
}
}
}
public void refreshSelection(){
- selectionChanged_internal(new StructuredSelection(this.viewer.getInput()), selectionProvidingPart, thisPart);
+ this.viewer.refresh_withoutnew_build();
}
@Override
@Optional
private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_DETAILS)boolean refresh){
if(refresh){
- refresh();
+ //refresh_withoutnew_build(); this would use the update without creation of all fields
+ refresh();
}
}