Project

General

Profile

bug #8910

Correct handling of preference for determinations

Added by Andreas Müller 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
New
Assignee:
Category:
taxeditor
Target version:
Start date:
03/27/2020
Due date:
% Done:

50%

Severity:
normal
Found in Version:
Tags:

Related issues

Related to Edit - feature request #8906: Refactor DNA Sample details view Closed 03/26/2020

Associated revisions

Revision 10c5f268 (diff)
Added by Katja Luther 8 months ago

correct handling of pref determinations only for field units

Revision cc10a813 (diff)
Added by Katja Luther 8 months ago

fix #8910: fix NPE in empty Combo box

History

#1 Updated by Andreas Müller 8 months ago

  • Status changed from New to Resolved
  • Assignee changed from Katja Luther to Andreas Müller
  • % Done changed from 0 to 50

#2 Updated by Andreas Müller 8 months ago

AM:

Wie soll denn jetzt die genaue Semantik sein? Ich würde ja vom Namen her denken, dass die Determinations für FieldUnits IMMER angezeigt werden, unabhängig von der Preference. Für alle anderen werden sie nur angezeigt, wenn die Preference false ist. Ist das so implementiert?

#3 Updated by Katja Luther 8 months ago

Andreas Müller wrote:

AM:

Wie soll denn jetzt die genaue Semantik sein? Ich würde ja vom Namen her denken, dass die Determinations für FieldUnits IMMER angezeigt werden, unabhängig von der Preference. Für alle anderen werden sie nur angezeigt, wenn die Preference false ist. Ist das so implementiert?

ja, jetzt ist das so implementiert.

#4 Updated by Andreas Müller 8 months ago

#5 Updated by Andreas Müller 8 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

I get an exception when choosing an ordinary specimen (derived unit) in specimen tree editor

last remote method : http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/common.service
last remote request client time : 2020-04-07T23:41:08.034
last remote request response header time : Tue, 07 Apr 2020 23:41:08 GMT
client error time : 2020-04-07T23:41:08.346
login : admin
editor version : 5.14.0.202004071348
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.12.0.0.20191202
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IndexOutOfBoundsException: Index: 0, Size: 0)
    at org.eclipse.swt.SWT.error(SWT.java:4533)
    at org.eclipse.swt.SWT.error(SWT.java:4448)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:653)
    at java.util.ArrayList.get(ArrayList.java:429)
    at eu.etaxonomy.taxeditor.store.TermManager.getFilteredTerms(TermManager.java:195)
    at eu.etaxonomy.taxeditor.store.TermManager.getPreferredTerms(TermManager.java:65)
    at eu.etaxonomy.taxeditor.ui.combo.term.TermComboElement.<init>(TermComboElement.java:122)
    at eu.etaxonomy.taxeditor.ui.combo.term.TermComboElement.<init>(TermComboElement.java:76)
    at eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.createDefinedTermComboElement(CdmFormFactory.java:1002)
    at eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.createDefinedTermComboElement(CdmFormFactory.java:938)
    at eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailElement.createControls(DerivedUnitBaseDetailElement.java:93)
    at eu.etaxonomy.taxeditor.ui.section.occurrence.AbstractSpecimenOrObservationDetailElement.createControls(AbstractSpecimenOrObservationDetailElement.java:1)
    at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement.updateContent(AbstractCdmDetailElement.java:107)
    at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement.setEntity(AbstractCdmDetailElement.java:94)
    at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection.setEntity(AbstractCdmDetailSection.java:145)
    at eu.etaxonomy.taxeditor.view.detail.CdmSectionPart.setFormInput(CdmSectionPart.java:167)
    at org.eclipse.ui.forms.ManagedForm.setInput(ManagedForm.java:210)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4.refresh(AbstractCdmDataViewerE4.java:162)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4.setInput(AbstractCdmDataViewerE4.java:143)
    at eu.etaxonomy.taxeditor.view.e4.details.DetailsViewerE4.setInput(DetailsViewerE4.java:202)
    at eu.etaxonomy.taxeditor.view.e4.details.DetailsViewerE4.setInput(DetailsViewerE4.java:173)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4.showViewer(AbstractCdmEditorPartE4.java:284)
    at eu.etaxonomy.taxeditor.view.e4.details.DetailsPartE4.selectionChanged_internal(DetailsPartE4.java:107)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4$DelaySelection.run(AbstractCdmEditorPartE4.java:94)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
    ... 23 more

Don't know if this is related to this ticket or to changes from #8906.

#6 Updated by Katja Luther 8 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

the problems are solved, they where caused by an empty combo box

#7 Updated by Andreas Müller 8 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

Katja Luther wrote:

the problems are solved, they where caused by an empty combo box

Yes the above problem is solved.

#8 Updated by Andreas Müller 8 months ago

This works now but only for the "new" determinations in DNA Details View it does not yet work.

#9 Updated by Katja Luther 8 months ago

  • Status changed from Feedback to Closed

Andreas Müller wrote:

This works now but only for the "new" determinations in DNA Details View it does not yet work.

this is fixed, see #8906, I close this ticket because this issue will be reviewed with #8906.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)