Please check if the PR fulfills these requirements
[x] The commit message follows our guidelines
[x] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
In #2955 listeners were implemented to automatically delete area boundaries when the undelying equipment is removed from the network (e.g. DanglingLine removal). This was done using "cleanup" listeners. However when performing network merge or detach, the listeners are lost / not transfered to the new root network of the Areas.
What is the new behavior (if this is a feature change)?
The "cleanup" listeners are properly moved to the new root Network when merging and detaching.
Does this PR introduce a breaking change or deprecate an API?
[x] No
Other information:
This is very similar to #3076, although here it is not about iIDM extensions.
I originally wanted to add notification mechanism for merging and detaching, but obviously this wouldn't work because manipulating listeners within listeners isn't the right approach (ConcurrentModificationException).
I made few specific code dedicated to Area only. When iIDM will be improved to deal with equipment removal & cleanup in a generic way, this would be revisited.
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
In #2955 listeners were implemented to automatically delete area boundaries when the undelying equipment is removed from the network (e.g. DanglingLine removal). This was done using "cleanup" listeners. However when performing network merge or detach, the listeners are lost / not transfered to the new root network of the Areas.
What is the new behavior (if this is a feature change)? The "cleanup" listeners are properly moved to the new root Network when merging and detaching.
Does this PR introduce a breaking change or deprecate an API?
Other information:
This is very similar to #3076, although here it is not about iIDM extensions. I originally wanted to add notification mechanism for merging and detaching, but obviously this wouldn't work because manipulating listeners within listeners isn't the right approach (ConcurrentModificationException). I made few specific code dedicated to Area only. When iIDM will be improved to deal with equipment removal & cleanup in a generic way, this would be revisited.