-
Notifications
You must be signed in to change notification settings - Fork 94
[1589] Add filter to hide expose elements in SysON Explorer View #1600
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2025 Obeo. | ||
| * This program and the accompanying materials | ||
| * are made available under the terms of the Eclipse Public License v2.0 | ||
| * which accompanies this distribution, and is available at | ||
| * https://www.eclipse.org/legal/epl-2.0/ | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| * | ||
| * Contributors: | ||
| * Obeo - initial API and implementation | ||
| *******************************************************************************/ | ||
| package org.eclipse.syson.tree.explorer.view.filters; | ||
|
|
||
| import java.util.List; | ||
| import java.util.Objects; | ||
|
|
||
| import org.eclipse.sirius.components.representations.VariableManager; | ||
| import org.eclipse.sirius.web.application.views.explorer.services.api.IExplorerTreeItemAlteredContentProvider; | ||
| import org.eclipse.syson.tree.explorer.view.services.api.ISysONExplorerFilterService; | ||
| import org.springframework.stereotype.Service; | ||
|
|
||
| /** | ||
| * An implementation of {@link IExplorerTreeItemAlteredContentProvider} allowing to hide exposed elements tree items from | ||
| * Explorer tree. | ||
| * | ||
| * @author frouene | ||
| */ | ||
| @Service | ||
| public class HideExposeElementsTreeItemAlteredContentProvider implements IExplorerTreeItemAlteredContentProvider { | ||
|
|
||
| private final ISysONExplorerFilterService filterService; | ||
|
|
||
| public HideExposeElementsTreeItemAlteredContentProvider(ISysONExplorerFilterService filterService) { | ||
| this.filterService = Objects.requireNonNull(filterService); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean canHandle(Object object, List<String> activeFilterIds) { | ||
| return activeFilterIds.contains(SysONTreeFilterProvider.HIDE_EXPOSE_ELEMENTS_TREE_ITEM_FILTER_ID); | ||
| } | ||
|
|
||
| @Override | ||
| public List<Object> apply(List<Object> computedChildren, VariableManager variableManager) { | ||
| return this.filterService.hideExposeElements(computedChildren); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,10 @@ | |
|
|
||
| image::gv-inherited-port.png[Inherited port, width=65%,height=65%] | ||
|
|
||
| - Add a new filter in the explorer to hide expose elements in `ViewUsage`. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you also update the documentation please?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have updated the list of available filters and updated the image. |
||
|
|
||
| image::explorer-hide-expose-element-filter.png[Hide expose element filter, width=65%,height=65%] | ||
|
|
||
| == Bug fixes | ||
|
|
||
| == Improvements | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I enabled it by default.