Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameCollisionHelper does not play well with EAdapters pre-emptively resolving name collisions #2821

Open
flatombe opened this issue Feb 27, 2024 · 0 comments

Comments

@flatombe
Copy link
Contributor

flatombe commented Feb 27, 2024

In org.polarsys.capella.core.platform.sirius.ui.commands.CapellaPasteCommand.doExecute(), first the command is performed, which means EAdapters can intervene and possibly update the name of an element being added (to prevent name collisions for instance).
Then the Capella name collision check is performed via org.polarsys.capella.core.platform.sirius.ui.commands.NameCollisionHelper.isCollide(Collection<?>, String), but it searches for collisions by iterating through all the contents of the parent element, meaning that a collision is always found.

Instead, there should only be collisions to handle if the element that just got pasted really has the same name as its origin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant