eclipse-aaspe / package-explorer

AASX Package Explorer
Other
64 stars 19 forks source link

Thumbnail image does not change with selection of a different AAS #35

Closed WelliSolutions closed 6 months ago

WelliSolutions commented 9 months ago

Describe the bug When an AASX file has 2 AAS, Package Explorer always displays the thumbnail of the first AAS.

To Reproduce Steps to reproduce the behavior:

  1. Open the 01_Festo.aasx from the sample AASX files
  2. In Edit mode, add a new AAS, add a globalID
  3. Switch between the Festo AAS and the new AAS
  4. See how the IDs in the graphic change, but the thumbnail picture doesn't

Expected behavior The thumbnail of the selected AAS is displayed. No Thumbnail is displayed if the AAS does not have a thumbnail.

Screenshots With Festo selected: image

With the new AAS selected image

Desktop (please complete the following information):

Smartphone (please complete the following information): None

Additional context Version 2023-11-17

WelliSolutions commented 9 months ago

It seems like Package Explorer shows the first OPC (Open Packaging Conventions) thumbnail image that is described in the _rels/.rels file. It does not consider the Identification/Thumbnail (semantic IDs https://www.hsu-hh.de/aut/aas/identification and https://www.hsu-hh.de/aut/aas/thumbnail).

So this issue is probably a feature request rather than a bug.

WelliSolutions commented 9 months ago

Let me change my mind again while I'm still learning... Each AAS has an AssetInformation. AssetInformation may have a DefaultThumbnail resource. Better use that one.

MichaelHoffmeisterFesto commented 6 months ago

Hello, yes, the OPC convention foresees, that there only one thumbnail. For a thumbnail per AAS, use the AssetInformation/DefaultThumbnail ressource. For efficiency reasons, the AASX Package Explorer only changes the left-hand display, when the user selects an AAS (not for every sub-ordinate element of the tree). With the current branch: MIHO/Post_XMAS2023_Bugfixes I've checked the behaviour and it seems to work as intended: fallback is the OPC thumbnail, the AssetInformation/DefaultThumbnail is dominant (see attached modified AASX).

MichaelHoffmeisterFesto commented 6 months ago

I think it is closed.

LukasBenner commented 5 months ago

Unfortunately, I can't reproduce the described behavior with the current release (v2024-06-10).

  1. Create a new AASX.
  2. Add a new AAS.
  3. DefaultThumbnail: Create an empty resource element.
  4. Upload a file through the supplemental file assistant.
  5. Press Ctrl+S (which will cause a very annoying error—why is it so hard to detect that this is an initial save?).
  6. No thumbnail is displayed (closing and reopening doesn't help).

grafik

LukasBenner commented 5 months ago

@MichaelHoffmeisterFesto As long as this doesn't work in the current release, I wouldn't consider the issue as closed.