Skip to content

[1487] Fix NPE thrown by getTreePath on non-view explorers#1490

Merged
AxelRICHARD merged 1 commit intomainfrom
gda/fix/treePathOnNonViewExplorers
Aug 14, 2025
Merged

[1487] Fix NPE thrown by getTreePath on non-view explorers#1490
AxelRICHARD merged 1 commit intomainfrom
gda/fix/treePathOnNonViewExplorers

Conversation

@gdaniel
Copy link
Contributor

@gdaniel gdaniel commented Aug 13, 2025

Bug: #1487

Fixes #1487

PLEASE READ ALL ITEMS AND CHECK ONLY RELEVANT CHECKBOXES BELOW

Project management

  • Has the pull request been added to the relevant milestone?
  • Have the priority: and pr: labels been added to the pull request? (In case of doubt, start with the labels priority: low and pr: to review later)
  • Have the relevant issues been added to the pull request?
  • Have the relevant labels been added to the issues? (area:, type:)
  • Have the relevant issues been added to the same project milestone as the pull request?

Changelog and release notes

  • Has the CHANGELOG.adoc + doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc been updated to reference the relevant issues?
  • Have the relevant API breaks been described in the CHANGELOG.adoc + doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?
  • In case of a change with a visual impact, are there any screenshots in the doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?
  • In case of a key change, has the change been added to Key highlights section in doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?
  • Are the new / upgraded dependencies mentioned in the relevant section of the CHANGELOG.adoc + doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?

Documentation

  • Have you included an update of the documentation in your pull request? Please ask yourself if an update (installation manual, user manual, developer manual...) is needed and add one accordingly.

Tests

  • Is the code properly tested? Any pull request (fix, enhancement or new feature) should come with a test (or several). It could be unit tests, integration tests or cypress tests depending on the context. Only doc and releng pull request do not need for tests.

@gdaniel gdaniel added this to the 2025.10.0 milestone Aug 13, 2025
Base automatically changed from cooldown to main August 13, 2025 13:23
@gdaniel gdaniel force-pushed the gda/fix/treePathOnNonViewExplorers branch from bda7c65 to 44c412b Compare August 13, 2025 13:31
CHANGELOG.adoc Outdated
=== Bug fixes

- https://github.com/eclipse-syson/syson/issues/1454[#1454] [import] Fix an issue where importing textual models with `MetadataAccessExpression` failed.
- https://github.com/eclipse-syson/syson/issues/1487[#1487] [explorer] Fix NPE thrown by `getTreePath` on non-view explorers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-view explorers => may be something like
Explorers defined with Sirius Tree APIs instead of Sirius View DSL APIs
What do you think about ? If you are ok with that, please fix it everywhere in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, it is clearer than "non-view explorers". I have changed it (including in the description of the commit).

return Objects.equals(sysonExplorerId, sourceId);
var sourceIdParameter = parameters.get("sourceId");
if (sourceIdParameter != null && !sourceIdParameter.isEmpty()) {
var sourceId = parameters.get("sourceId").get(0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parameters.get("sourceId") => sourceIdParameter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@gdaniel gdaniel force-pushed the gda/fix/treePathOnNonViewExplorers branch from 44c412b to 8907242 Compare August 13, 2025 15:26
Bug: #1487
Signed-off-by: Gwendal Daniel <gwendal.daniel@obeosoft.com>
@gdaniel gdaniel force-pushed the gda/fix/treePathOnNonViewExplorers branch from 8907242 to 2a53a97 Compare August 13, 2025 15:28
@AxelRICHARD AxelRICHARD merged commit 02760c7 into main Aug 14, 2025
4 checks passed
@AxelRICHARD AxelRICHARD deleted the gda/fix/treePathOnNonViewExplorers branch August 14, 2025 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NPE in SysONExplorerTreePathProvider for explorers that aren't defined with the view DSL

2 participants