[2467] Add connected elements tool to the General View - #2496
Open
AxelRICHARD wants to merge 1 commit into
Open
Conversation
cbrun
force-pushed
the
cbr/enh/addreferenced
branch
from
September 1, 2026 11:10
125ecbf to
51dcaf9
Compare
Expose existing elements connected to the selected element through both inbound and outbound General View relationships. Add the tool icon and integration coverage. Bug: #2467 Signed-off-by: Cedric Brun <cedric.brun@obeo.fr>
cbrun
force-pushed
the
cbr/enh/addreferenced
branch
from
September 1, 2026 13:18
51dcaf9 to
f4d7a9c
Compare
AxelRICHARD
commented
Sep 1, 2026
| /** | ||
| * Tests for {@link DiagramMutationExposeService}. | ||
| * | ||
| * @author arichard |
| return element; | ||
| } | ||
|
|
||
| /** Adds every project element connected to the given element to the current view. */ |
Member
Author
There was a problem hiding this comment.
Please add full javadoc
| return element; | ||
| } | ||
|
|
||
| private Set<Element> getConnectedElements(Element element, ResourceSet resourceSet) { |
Member
Author
There was a problem hiding this comment.
please add full javadoc here and on every new method you introduced
| return resource != null && resourceSet.getResources().contains(resource) && !ElementUtil.isStandardLibraryResource(resource); | ||
| } | ||
|
|
||
| private EdgeEndpoints getGeneralViewEdgeEndpoints(Element candidate) { |
Member
Author
There was a problem hiding this comment.
I think an EMF Switch in a dedicated class would be more suitable
| } | ||
|
|
||
| /** | ||
| * Create a {@link NodeToolSection} containing the {@code Add Existing Elements} tools. |
Member
Author
There was a problem hiding this comment.
please update the javadoc
| .build(); | ||
| var builder = this.diagramBuilderHelper.newNodeToolSection().name("Related Elements"); | ||
| if (nested) { | ||
| builder.nodeTools(this.addExistingElementsTool(false, true), this.addExistingElementsTool(true, true), this.addExistingConnectedElementsTool()); |
Member
Author
There was a problem hiding this comment.
why do you add your tool only if nested is true?
| public NodeToolSection relatedElementsGroupToolSection() { | ||
| return this.diagramBuilderHelper.newNodeToolSection() | ||
| .name("Related Elements") | ||
| .nodeTools(this.addExistingElementsGroupTool(false), this.addExistingElementsGroupTool(true)) |
Member
Author
There was a problem hiding this comment.
No need to add it here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose existing elements connected to the selected element through both inbound and outbound General View relationships.
Add the tool icon and integration coverage.
Bug: #2467
PLEASE READ ALL ITEMS AND CHECK ONLY RELEVANT CHECKBOXES BELOW
Auto review
Project management
priority:andpr:labels been added to the pull request? (In case of doubt, start with the labelspriority: lowandpr: to review later)area:,type:)Changelog and release notes
CHANGELOG.adoc+doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adocbeen updated to reference the relevant issues?CHANGELOG.adoc?CHANGELOG.adoc?doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?Key highlightssection indoc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?Documentation
Tests