Add Context Parameter to get Description (#60)

Yes this is breaking, but only to the changes that where merged not even
24 hours ago.
This commit is contained in:
Luca authored and GitHub committed 2026-05-24 13:35:25 +08:00
1 parent 19179ec894
commit 95d1533342
4 files changed
+27 -30

No files matched your search

@@ -65,10 +65,10 @@ public interface IStructureElementChain<T> extends IStructureElement<T> {
@Nullable
@Override
default List<String> getDescription() {
default List<String> getDescription(T context) {
Set<String> descriptions = new LinkedHashSet<>();
for (IStructureElement<T> fallback : fallbacks()) {
List<String> desc = fallback.getDescription();
List<String> desc = fallback.getDescription(context);
if (desc != null) {
descriptions.addAll(desc);
}