diff --git a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/ExpandAllTreePathProvider.java b/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/ExpandAllTreePathProvider.java index a4244f1f7a6..266aad9f956 100644 --- a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/ExpandAllTreePathProvider.java +++ b/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/ExpandAllTreePathProvider.java @@ -22,6 +22,7 @@ import org.eclipse.sirius.components.collaborative.trees.dto.ExpandAllTreePathInput; import org.eclipse.sirius.components.collaborative.trees.dto.ExpandAllTreePathSuccessPayload; import org.eclipse.sirius.components.collaborative.trees.dto.TreePath; +import org.eclipse.sirius.components.collaborative.trees.services.api.ITreeNavigationService; import org.eclipse.sirius.components.core.api.IContentService; import org.eclipse.sirius.components.core.api.IEditingContext; import org.eclipse.sirius.components.core.api.IIdentityService; @@ -30,7 +31,6 @@ import org.eclipse.sirius.components.representations.VariableManager; import org.eclipse.sirius.components.trees.Tree; import org.eclipse.sirius.components.trees.description.TreeDescription; -import org.eclipse.sirius.web.application.views.explorer.services.api.IExplorerNavigationService; import org.eclipse.sirius.web.domain.boundedcontexts.representationdata.services.api.IRepresentationDataSearchService; import org.springframework.stereotype.Service; @@ -46,16 +46,16 @@ public class ExpandAllTreePathProvider implements IExpandAllTreePathProvider { private final IContentService contentService; - private final IExplorerNavigationService explorerNavigationService; + private final ITreeNavigationService treeNavigationService; private final IRepresentationDataSearchService representationDataSearchService; private final IRepresentationDescriptionSearchService representationDescriptionSearchService; - public ExpandAllTreePathProvider(IIdentityService identityService, IContentService contentService, IExplorerNavigationService explorerNavigationService, IRepresentationDescriptionSearchService representationDescriptionSearchService, IRepresentationDataSearchService representationDataSearchService) { + public ExpandAllTreePathProvider(IIdentityService identityService, IContentService contentService, ITreeNavigationService treeNavigationService, IRepresentationDescriptionSearchService representationDescriptionSearchService, IRepresentationDataSearchService representationDataSearchService) { this.identityService = Objects.requireNonNull(identityService); this.contentService = Objects.requireNonNull(contentService); - this.explorerNavigationService = Objects.requireNonNull(explorerNavigationService); + this.treeNavigationService = Objects.requireNonNull(treeNavigationService); this.representationDescriptionSearchService = Objects.requireNonNull(representationDescriptionSearchService); this.representationDataSearchService = Objects.requireNonNull(representationDataSearchService); } @@ -74,7 +74,7 @@ public IPayload handle(IEditingContext editingContext, Tree tree, ExpandAllTreeP var object = this.getTreeItemObject(editingContext, tree, treeItemId); if (object instanceof EObject) { // We need to get the current depth of the tree item - var itemAncestors = this.explorerNavigationService.getAncestors(editingContext, tree, treeItemId); + var itemAncestors = this.treeNavigationService.getAncestors(editingContext, tree, treeItemId); maxDepth = itemAncestors.size(); maxDepth = this.addAllContents(editingContext, treeItemId, maxDepth, treeItemIdsToExpand, tree); } else if (object instanceof Resource resource) { diff --git a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/ExplorerTreePathProvider.java b/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/ExplorerTreePathProvider.java index 0db7f9cb055..55179915c37 100644 --- a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/ExplorerTreePathProvider.java +++ b/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/ExplorerTreePathProvider.java @@ -21,10 +21,10 @@ import org.eclipse.sirius.components.collaborative.trees.dto.TreePath; import org.eclipse.sirius.components.collaborative.trees.dto.TreePathInput; import org.eclipse.sirius.components.collaborative.trees.dto.TreePathSuccessPayload; +import org.eclipse.sirius.components.collaborative.trees.services.api.ITreeNavigationService; import org.eclipse.sirius.components.core.api.IEditingContext; import org.eclipse.sirius.components.core.api.IPayload; import org.eclipse.sirius.components.trees.Tree; -import org.eclipse.sirius.web.application.views.explorer.services.api.IExplorerNavigationService; import org.springframework.stereotype.Service; /** @@ -35,10 +35,10 @@ @Service public class ExplorerTreePathProvider implements ITreePathProvider { - private final IExplorerNavigationService explorerNavigationService; + private final ITreeNavigationService treeNavigationService; - public ExplorerTreePathProvider(IExplorerNavigationService explorerNavigationService) { - this.explorerNavigationService = Objects.requireNonNull(explorerNavigationService); + public ExplorerTreePathProvider(ITreeNavigationService treeNavigationService) { + this.treeNavigationService = Objects.requireNonNull(treeNavigationService); } @Override @@ -51,7 +51,7 @@ public IPayload handle(IEditingContext editingContext, Tree tree, TreePathInput int maxDepth = 0; Set allAncestors = new LinkedHashSet<>(); for (String selectionEntryId : input.selectionEntryIds()) { - List itemAncestors = this.explorerNavigationService.getAncestors(editingContext, tree, selectionEntryId); + List itemAncestors = this.treeNavigationService.getAncestors(editingContext, tree, selectionEntryId); allAncestors.addAll(itemAncestors); maxDepth = Math.max(maxDepth, itemAncestors.size()); } diff --git a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/tree/DomainExpandAllTreePathProvider.java b/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/tree/DomainExpandAllTreePathProvider.java index 6a9fadb309b..dd58b905208 100644 --- a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/tree/DomainExpandAllTreePathProvider.java +++ b/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/tree/DomainExpandAllTreePathProvider.java @@ -22,6 +22,7 @@ import org.eclipse.sirius.components.collaborative.trees.dto.ExpandAllTreePathInput; import org.eclipse.sirius.components.collaborative.trees.dto.ExpandAllTreePathSuccessPayload; import org.eclipse.sirius.components.collaborative.trees.dto.TreePath; +import org.eclipse.sirius.components.collaborative.trees.services.api.ITreeNavigationService; import org.eclipse.sirius.components.core.api.IContentService; import org.eclipse.sirius.components.core.api.IEditingContext; import org.eclipse.sirius.components.core.api.IIdentityService; @@ -31,7 +32,6 @@ import org.eclipse.sirius.components.representations.VariableManager; import org.eclipse.sirius.components.trees.Tree; import org.eclipse.sirius.components.trees.description.TreeDescription; -import org.eclipse.sirius.web.application.views.explorer.services.api.IExplorerNavigationService; import org.eclipse.sirius.web.domain.boundedcontexts.representationdata.services.api.IRepresentationDataSearchService; import org.springframework.stereotype.Service; @@ -47,15 +47,15 @@ public class DomainExpandAllTreePathProvider implements IExpandAllTreePathProvid private final IContentService contentService; - private final IExplorerNavigationService explorerNavigationService; + private final ITreeNavigationService treeNavigationService; private final IRepresentationDataSearchService representationDataSearchService; private final IRepresentationDescriptionSearchService representationDescriptionSearchService; - public DomainExpandAllTreePathProvider(IIdentityService identityService, IContentService contentService, IExplorerNavigationService explorerNavigationService, IRepresentationDescriptionSearchService representationDescriptionSearchService, IRepresentationDataSearchService representationDataSearchService) { + public DomainExpandAllTreePathProvider(IIdentityService identityService, IContentService contentService, ITreeNavigationService treeNavigationService, IRepresentationDescriptionSearchService representationDescriptionSearchService, IRepresentationDataSearchService representationDataSearchService) { this.identityService = Objects.requireNonNull(identityService); this.contentService = Objects.requireNonNull(contentService); - this.explorerNavigationService = Objects.requireNonNull(explorerNavigationService); + this.treeNavigationService = Objects.requireNonNull(treeNavigationService); this.representationDescriptionSearchService = Objects.requireNonNull(representationDescriptionSearchService); this.representationDataSearchService = Objects.requireNonNull(representationDataSearchService); } @@ -74,7 +74,7 @@ public IPayload handle(IEditingContext editingContext, Tree tree, ExpandAllTreeP var object = this.getTreeItemObject(editingContext, tree, treeItemId); if (object instanceof EObject || treeItemId.startsWith(DomainTreeRepresentationDescriptionProvider.SETTING)) { // We need to get the current depth of the tree item - var itemAncestors = this.explorerNavigationService.getAncestors(editingContext, tree, treeItemId); + var itemAncestors = this.treeNavigationService.getAncestors(editingContext, tree, treeItemId); maxDepth = itemAncestors.size(); maxDepth = this.addAllContents(editingContext, treeItemId, maxDepth, treeItemIdsToExpand, tree); } diff --git a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/tree/DomainTreePathProvider.java b/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/tree/DomainTreePathProvider.java index c2586b149d0..cc65ed3ce3f 100644 --- a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/tree/DomainTreePathProvider.java +++ b/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/tree/DomainTreePathProvider.java @@ -21,10 +21,10 @@ import org.eclipse.sirius.components.collaborative.trees.dto.TreePath; import org.eclipse.sirius.components.collaborative.trees.dto.TreePathInput; import org.eclipse.sirius.components.collaborative.trees.dto.TreePathSuccessPayload; +import org.eclipse.sirius.components.collaborative.trees.services.api.ITreeNavigationService; import org.eclipse.sirius.components.core.api.IEditingContext; import org.eclipse.sirius.components.core.api.IPayload; import org.eclipse.sirius.components.trees.Tree; -import org.eclipse.sirius.web.application.views.explorer.services.api.IExplorerNavigationService; import org.springframework.stereotype.Service; /** @@ -35,10 +35,10 @@ @Service public class DomainTreePathProvider implements ITreePathProvider { - private final IExplorerNavigationService explorerNavigationService; + private final ITreeNavigationService treeNavigationService; - public DomainTreePathProvider(IExplorerNavigationService explorerNavigationService) { - this.explorerNavigationService = Objects.requireNonNull(explorerNavigationService); + public DomainTreePathProvider(ITreeNavigationService treeNavigationService) { + this.treeNavigationService = Objects.requireNonNull(treeNavigationService); } @Override @@ -52,7 +52,7 @@ public IPayload handle(IEditingContext editingContext, Tree tree, TreePathInput int maxDepth = 0; Set allAncestors = new LinkedHashSet<>(); for (String selectionEntryId : input.selectionEntryIds()) { - List itemAncestors = this.explorerNavigationService.getAncestors(editingContext, tree, selectionEntryId); + List itemAncestors = this.treeNavigationService.getAncestors(editingContext, tree, selectionEntryId); allAncestors.addAll(itemAncestors); maxDepth = Math.max(maxDepth, itemAncestors.size()); } diff --git a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/studio/services/representations/DomainExplorerExpandAllTreePathProvider.java b/packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/handlers/DefaultExpandAllTreePathHandler.java similarity index 71% rename from packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/studio/services/representations/DomainExplorerExpandAllTreePathProvider.java rename to packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/handlers/DefaultExpandAllTreePathHandler.java index b4348ca77cb..576865c5d4f 100644 --- a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/studio/services/representations/DomainExplorerExpandAllTreePathProvider.java +++ b/packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/handlers/DefaultExpandAllTreePathHandler.java @@ -10,7 +10,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.web.application.studio.services.representations; +package org.eclipse.sirius.components.collaborative.trees.handlers; import java.util.LinkedHashSet; import java.util.List; @@ -18,11 +18,10 @@ import java.util.Optional; import java.util.Set; -import org.eclipse.sirius.components.collaborative.trees.api.IExpandAllTreePathProvider; import org.eclipse.sirius.components.collaborative.trees.dto.ExpandAllTreePathInput; import org.eclipse.sirius.components.collaborative.trees.dto.ExpandAllTreePathSuccessPayload; import org.eclipse.sirius.components.collaborative.trees.dto.TreePath; -import org.eclipse.sirius.components.core.URLParser; +import org.eclipse.sirius.components.collaborative.trees.services.api.ITreeNavigationService; import org.eclipse.sirius.components.core.api.IEditingContext; import org.eclipse.sirius.components.core.api.IPayload; import org.eclipse.sirius.components.core.api.IRepresentationDescriptionSearchService; @@ -30,58 +29,31 @@ import org.eclipse.sirius.components.trees.Tree; import org.eclipse.sirius.components.trees.description.TreeDescription; import org.eclipse.sirius.components.trees.renderer.TreeRenderer; -import org.eclipse.sirius.components.view.emf.IViewRepresentationDescriptionSearchService; -import org.eclipse.sirius.components.view.emf.tree.ITreeIdProvider; -import org.eclipse.sirius.web.application.views.explorer.services.ExplorerDescriptionProvider; -import org.eclipse.sirius.web.application.views.explorer.services.api.IExplorerNavigationService; import org.springframework.stereotype.Service; /** - * Used to handle the Expand All action on the Domain explorer. + * This class is used as a fallback to handle an ExpandAllTreePath event that no handlers can handle. * * @author Jerome Gout */ @Service -public class DomainExplorerExpandAllTreePathProvider implements IExpandAllTreePathProvider { - - private final IExplorerNavigationService explorerNavigationService; +public class DefaultExpandAllTreePathHandler { + private final ITreeNavigationService treeNavigationService; private final IRepresentationDescriptionSearchService representationDescriptionSearchService; - private final IViewRepresentationDescriptionSearchService viewRepresentationDescriptionSearchService; - - public DomainExplorerExpandAllTreePathProvider(IExplorerNavigationService explorerNavigationService, IRepresentationDescriptionSearchService representationDescriptionSearchService, - IViewRepresentationDescriptionSearchService viewRepresentationDescriptionSearchService) { - this.explorerNavigationService = Objects.requireNonNull(explorerNavigationService); + public DefaultExpandAllTreePathHandler(ITreeNavigationService treeNavigationService, IRepresentationDescriptionSearchService representationDescriptionSearchService) { + this.treeNavigationService = Objects.requireNonNull(treeNavigationService); this.representationDescriptionSearchService = Objects.requireNonNull(representationDescriptionSearchService); - this.viewRepresentationDescriptionSearchService = viewRepresentationDescriptionSearchService; - } - - @Override - public boolean canHandle(Tree tree) { - return tree.getDescriptionId().startsWith(ITreeIdProvider.TREE_DESCRIPTION_KIND); } - @Override public IPayload handle(IEditingContext editingContext, Tree tree, ExpandAllTreePathInput input) { - var parameterValues = new URLParser().getParameterValues(tree.getId()); - var treeDescriptionId = parameterValues.get(ExplorerDescriptionProvider.TREE_DESCRIPTION_ID_PARAMETER).get(0); - var optionalViewTreeDescription = this.viewRepresentationDescriptionSearchService.findById(editingContext, treeDescriptionId); - if (optionalViewTreeDescription.isPresent()) { - if (optionalViewTreeDescription.get().getName().equals(DomainViewTreeDescriptionProvider.DOMAIN_EXPLORER_DESCRIPTION_NAME)) { - return this.doHandle(editingContext, tree, input); - } - } - return new ExpandAllTreePathSuccessPayload(input.id(), new TreePath(List.of(), 0)); - } - - public IPayload doHandle(IEditingContext editingContext, Tree tree, ExpandAllTreePathInput input) { int maxDepth = 0; String treeItemId = input.treeItemId(); Set treeItemIdsToExpand = new LinkedHashSet<>(); // We need to get the current depth of the tree item - var itemAncestors = this.explorerNavigationService.getAncestors(editingContext, tree, treeItemId); + var itemAncestors = this.treeNavigationService.getAncestors(editingContext, tree, treeItemId); maxDepth = itemAncestors.size(); maxDepth = this.addAllContents(editingContext, treeItemId, maxDepth, treeItemIdsToExpand, tree); return new ExpandAllTreePathSuccessPayload(input.id(), new TreePath(treeItemIdsToExpand.stream().toList(), maxDepth)); diff --git a/packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/handlers/ExpandAllTreePathEventHandler.java b/packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/handlers/ExpandAllTreePathEventHandler.java index 415835044de..607f6c63a0d 100644 --- a/packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/handlers/ExpandAllTreePathEventHandler.java +++ b/packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/handlers/ExpandAllTreePathEventHandler.java @@ -48,8 +48,11 @@ public class ExpandAllTreePathEventHandler implements ITreeEventHandler { private final List expandAllTreePathsProviders; - public ExpandAllTreePathEventHandler(List treePathProviders) { + private final DefaultExpandAllTreePathHandler defaultExpandAllTreePathHandler; + + public ExpandAllTreePathEventHandler(List treePathProviders, DefaultExpandAllTreePathHandler defaultExpandAllTreePathHandler) { this.expandAllTreePathsProviders = Objects.requireNonNull(treePathProviders); + this.defaultExpandAllTreePathHandler = Objects.requireNonNull(defaultExpandAllTreePathHandler); } @Override @@ -65,12 +68,12 @@ public void handle(One payloadSink, Many changeDesc if (treeInput instanceof ExpandAllTreePathInput input) { Optional optionalPathsProvider = this.expandAllTreePathsProviders.stream().filter(expandAllTreePathsProvider -> expandAllTreePathsProvider.canHandle(tree)).findFirst(); if (optionalPathsProvider.isPresent()) { - IPayload resultPayload = optionalPathsProvider.get().handle(editingContext, tree, input); - if (resultPayload instanceof ExpandAllTreePathSuccessPayload) { - payload = resultPayload; - } else if (resultPayload instanceof ErrorPayload errorPayload) { - this.logger.warn(errorPayload.message()); - } + payload = optionalPathsProvider.get().handle(editingContext, tree, input); + } else { + payload = this.defaultExpandAllTreePathHandler.handle(editingContext, tree, input); + } + if (payload instanceof ErrorPayload errorPayload) { + this.logger.warn(errorPayload.message()); } } diff --git a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/ExplorerNavigationService.java b/packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/services/TreeNavigationService.java similarity index 91% rename from packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/ExplorerNavigationService.java rename to packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/services/TreeNavigationService.java index 975f5e9efce..6d500b50fa0 100644 --- a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/ExplorerNavigationService.java +++ b/packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/services/TreeNavigationService.java @@ -10,32 +10,32 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.web.application.views.explorer.services; +package org.eclipse.sirius.components.collaborative.trees.services; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.Optional; +import org.eclipse.sirius.components.collaborative.trees.services.api.ITreeNavigationService; import org.eclipse.sirius.components.core.api.IEditingContext; import org.eclipse.sirius.components.core.api.IRepresentationDescriptionSearchService; import org.eclipse.sirius.components.representations.VariableManager; import org.eclipse.sirius.components.trees.Tree; import org.eclipse.sirius.components.trees.description.TreeDescription; -import org.eclipse.sirius.web.application.views.explorer.services.api.IExplorerNavigationService; import org.springframework.stereotype.Service; /** - * Services for the navigation through the Sirius Web Explorer. + * Services for the tree navigation. * * @author arichard */ @Service -public class ExplorerNavigationService implements IExplorerNavigationService { +public class TreeNavigationService implements ITreeNavigationService { private final IRepresentationDescriptionSearchService representationDescriptionSearchService; - public ExplorerNavigationService(IRepresentationDescriptionSearchService representationDescriptionSearchService) { + public TreeNavigationService(IRepresentationDescriptionSearchService representationDescriptionSearchService) { this.representationDescriptionSearchService = Objects.requireNonNull(representationDescriptionSearchService); } diff --git a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/api/IExplorerNavigationService.java b/packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/services/api/ITreeNavigationService.java similarity index 81% rename from packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/api/IExplorerNavigationService.java rename to packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/services/api/ITreeNavigationService.java index 5323d0eba49..9645f21dc6c 100644 --- a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/views/explorer/services/api/IExplorerNavigationService.java +++ b/packages/trees/backend/sirius-components-collaborative-trees/src/main/java/org/eclipse/sirius/components/collaborative/trees/services/api/ITreeNavigationService.java @@ -10,7 +10,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.web.application.views.explorer.services.api; +package org.eclipse.sirius.components.collaborative.trees.services.api; import java.util.List; @@ -18,11 +18,11 @@ import org.eclipse.sirius.components.trees.Tree; /** - * Interface of the service for the navigation through the Sirius Web Explorer. + * Interface of the service for the tree navigation. * * @author arichard */ -public interface IExplorerNavigationService { +public interface ITreeNavigationService { List getAncestors(IEditingContext editingContext, Tree tree, String treeItemId); @@ -31,7 +31,7 @@ public interface IExplorerNavigationService { * * @author frouene */ - class NoOp implements IExplorerNavigationService { + class NoOp implements ITreeNavigationService { @Override public List getAncestors(IEditingContext editingContext, Tree tree, String treeItemId) { diff --git a/packages/trees/backend/sirius-components-trees/src/main/java/org/eclipse/sirius/components/trees/description/TreeDescription.java b/packages/trees/backend/sirius-components-trees/src/main/java/org/eclipse/sirius/components/trees/description/TreeDescription.java index aaea5b17188..129476acada 100644 --- a/packages/trees/backend/sirius-components-trees/src/main/java/org/eclipse/sirius/components/trees/description/TreeDescription.java +++ b/packages/trees/backend/sirius-components-trees/src/main/java/org/eclipse/sirius/components/trees/description/TreeDescription.java @@ -258,6 +258,7 @@ private Builder(TreeDescription treeDescription) { this.deleteHandler = treeDescription.getDeleteHandler(); this.renameHandler = treeDescription.getRenameHandler(); this.treeItemObjectProvider = treeDescription.getTreeItemObjectProvider(); + this.treeItemLabelProvider = treeDescription.getTreeItemLabelProvider(); } public Builder id(String id) {