Project

General

Profile

Actions

feature request #4363

closed

Show more informative message for unsupported specimen structures in specimen bulk editor

Added by Andreas Müller over 8 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Priority13
Category:
taxeditor
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal

Description

the current implementation opens an EmptySection which shows the generic error "No details view implemented for this element". This should be replaced by a more detailed message.

E.g. "Specimen has a complex structure which is not supported by this view. Maybe it has >1 field units."

see also #3846


Related issues

Related to EDIT - feature request #7612: CacheStrategy for MediaSpecimensDuplicateAndreas Müller

Actions
Related to EDIT - feature request #5573: Cache Strategy for Media Specimen requiredClosedAndreas Müller

Actions
Actions #1

Updated by Andreas Müller over 8 years ago

I assigned this to Patrick as he created the EmptySection class and might be familiar to the structure

Actions #2

Updated by Andreas Müller over 4 years ago

  • Subject changed from Show more informative message in unsupported specimen to Show more informative message for unsupported specimen structures in specimen bulk editor
  • Description updated (diff)
  • Priority changed from New to Priority13
  • Target version changed from TaxEditor Next Major Release to Release 5.1
  • Private changed from Yes to No

Is this still an open issue?

Actions #3

Updated by Patrick Plitzner over 4 years ago

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

I don't have a test DB where there is a DerivedUnit with multiple FieldUnits.
But I added the possibility to show a more detailed message in the EmptySection (see taxeditor|e5c6119c)

Actions #4

Updated by Andreas Müller over 4 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Patrick Plitzner

So can we use the above suggestion as message? The current message is still not really correct or at least too unspecific saying "Unknown element. Details can nto be shown".

As a test example you can use the FieldUnit "ZZZZ" in test.rem_conf_am

Actions #5

Updated by Patrick Plitzner over 4 years ago

  • Status changed from Feedback to Resolved
Actions #6

Updated by Patrick Plitzner over 4 years ago

  • Assignee changed from Patrick Plitzner to Andreas Müller

Now, a more informative message is shown. The text is generated in the DerivedUnitFacade constructor. It is interesting to note that the constructor itself throws an exception when being invoked with a DerivedUnit with more than one FieldUnit. This leads to other "silent" exceptions in the taxeditor. For example in the media view it is not possible to create an image gallery for this kind of DerivedUnit

!ENTRY eu.taxeditor 4 0 2018-06-25 17:59:24.563
!MESSAGE DerivedUnitFacadeNotSupportedException when trying to instantiate DerivedUnitFacade
!STACK 0
eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException: Specimen must not have more than 1 derivation event
    at eu.etaxonomy.cdm.api.facade.DerivedUnitFacade.<init>(DerivedUnitFacade.java:223)
    at eu.etaxonomy.cdm.api.facade.DerivedUnitFacade.NewInstance(DerivedUnitFacade.java:160)
    at eu.etaxonomy.taxeditor.editor.view.media.MediaContentProvider.getChildren(MediaContentProvider.java:83)
    at eu.etaxonomy.taxeditor.editor.view.media.MediaContentProvider.getElements(MediaContentProvider.java:126)
    at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1001)
    at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:701)
    at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1349)
    at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:341)
    at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:907)
    at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:621)
    at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$0(AbstractTreeViewer.java:817)
    at org.eclipse.jface.viewers.AbstractTreeViewer$$Lambda$35/2031373582.run(Unknown Source)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:795)
    at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:596)
    at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel(AbstractTreeViewer.java:1760)
    at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1539)
    at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:772)
    at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$1(AbstractTreeViewer.java:1523)
    at org.eclipse.jface.viewers.AbstractTreeViewer$$Lambda$34/1186076210.run(Unknown Source)
    at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1458)
    at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:354)
    at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1419)
    at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1517)
    at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:286)
    at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1696)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4.showViewer(AbstractCdmEditorPartE4.java:225)
    at eu.etaxonomy.taxeditor.editor.view.media.e4.MediaViewPartE4.selectionChanged_internal(MediaViewPartE4.java:107)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4$DelaySelection.run(AbstractCdmEditorPartE4.java:85)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4536)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4154)
    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:483)
    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)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException: Specimen must not have more than 1 derivation event
    at eu.etaxonomy.cdm.api.facade.DerivedUnitFacade.<init>(DerivedUnitFacade.java:223)
    at eu.etaxonomy.cdm.api.facade.DerivedUnitFacade.NewInstance(DerivedUnitFacade.java:166)
    at eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeCacheStrategy.getTitleCache(DerivedUnitFacadeCacheStrategy.java:58)
    at eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeCacheStrategy.getTitleCache(DerivedUnitFacadeCacheStrategy.java:45)
    at eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeCacheStrategy.getTitleCache(DerivedUnitFacadeCacheStrategy.java:28)
    at eu.etaxonomy.cdm.model.common.IdentifiableEntity.generateTitle(IdentifiableEntity.java:607)
    at eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection.setEntity(HeadlineSection.java:42)
    at eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection.setEntity(HeadlineSection.java:1)
    at eu.etaxonomy.taxeditor.view.detail.CdmSectionPart.setFormInput(CdmSectionPart.java:155)
    at org.eclipse.ui.forms.ManagedForm.setInput(ManagedForm.java:210)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4.refresh(AbstractCdmDataViewerE4.java:161)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4.setInput(AbstractCdmDataViewerE4.java:143)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4.showViewer(AbstractCdmEditorPartE4.java:225)
    at eu.etaxonomy.taxeditor.view.e4.supplementaldata.SupplementalDataPartE4.selectionChanged_internal(SupplementalDataPartE4.java:121)
    at eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4$DelaySelection.run(AbstractCdmEditorPartE4.java:85)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4536)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4154)
    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:483)
    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)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
Actions #7

Updated by Andreas Müller over 4 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Patrick Plitzner

Patrick Plitzner wrote:

Now, a more informative message is shown. The text is generated in the DerivedUnitFacade constructor. It is interesting to note that the constructor itself throws an exception when being invoked with a DerivedUnit with more than one FieldUnit. This leads to other "silent" exceptions in the taxeditor. For example in the media view it is not possible to create an image gallery for this kind of DerivedUnit

!ENTRY eu.taxeditor 4 0 2018-06-25 17:59:24.563
!MESSAGE DerivedUnitFacadeNotSupportedException when trying to instantiate DerivedUnitFacade
!STACK 0
eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException: Specimen must not have more than 1 derivation event
  at eu.etaxonomy.cdm.api.facade.DerivedUnitFacade.<init>(DerivedUnitFacade.java:223)
  at eu.etaxonomy.cdm.api.facade.DerivedUnitFacade.NewInstance(DerivedUnitFacade.java:160)
  at eu.etaxonomy.taxeditor.editor.view.media.MediaContentProvider.getChildren(MediaContentProvider.java:83)
  at eu.etaxonomy.taxeditor.editor.view.media.MediaContentProvider.getElements(MediaContentProvider.java:126)
  at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1001)
  at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:701)

It definitely does not make much sense to use DerivedUnitFacade here. This should be changed.

All the rest works as expected now.

Actions #9

Updated by Andreas Müller about 3 years ago

  • Assignee changed from Patrick Plitzner to Katja Luther
Actions #10

Updated by Andreas Müller about 2 years ago

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

Updated by Andreas Müller almost 2 years ago

Actions #12

Updated by Andreas Müller almost 2 years ago

Actions #13

Updated by Andreas Müller almost 2 years ago

See also comment in DetailsViewerE4.showParts where a DerivedUnitFacade is created only to get the error message.

Actions #14

Updated by Andreas Müller almost 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 50 to 100

The exception handling seems to be correct now and this ticket can be closed.

Actions

Also available in: Atom PDF