Repository navigation
[2590] Redefine the selected nested feature chain and document the tool - #2676
jerome-obeo wants to merge 1 commit into
Conversation
| { | ||
| canHandle: (representationKind: string, tool: GQLTool) => { | ||
| return representationKind === DIAGRAM_REPRESENTATION_KIND && tool.label === 'Redefine a nested feature'; | ||
| }, | ||
| component: RedefineNestedFeatureToolOverriddenContribution, | ||
| }, |
There was a problem hiding this comment.
We need to register a custom tool in order to provide the selection in both Model explorer and diagram of the last feature of the selected feature chain .
db38152 to
48decb1
Compare
Test the complete tool execution and final selection
|
48decb1 to
2361b02
Compare
Done, 3 tests have been added:
|
Update the changelog and document the constructor API break
|
Done |
e3df3ed to
2bd1118
Compare
| return; | ||
| } | ||
| registerPostToolSelection(payload.id, selection); | ||
| setSelection(selection); |
There was a problem hiding this comment.
Palette search with Enter skips Explorer and Details focus
Import RedefineNestedFeature.sysml from this PR and open view1. On vehicle, search the palette for Redefine a nested feature and press Enter from the search field. Select wheel.diameter and confirm. The redefinition is created, but Explorer and Details do not focus on the new diameter.
- Cause — Sirius Web's palette search invokes the default diagram tool handler on Enter. The calls that update the workbench selection and reveal the feature in Explorer live inside this override's click handler. The default handler relies on a matching graphical element, and
diameterhas none in this view. - Fix — Route Enter and pointer activation through the same tool execution and selection handling. Add a keyboard case to the existing Playwright test using
wheel.diameter. - If skipped — Keyboard users can create the redefinition but must find it manually before editing its properties.
| * the feature chain selected in the dialog | ||
| * @return the local redefined feature chain, or null on failure | ||
| */ | ||
| public List<Feature> redefineFeatureChain(Type context, ContextualFeatureChain chain) { |
There was a problem hiding this comment.
Please stop declaring new methods in XXXAQLService class.
As I already told you, those classes are only here to delegate to other service classes.
Here you should declare redefineFeatureChain in a new TreeMutationSelectionDialogService.java
Then in this TreeMutationAQLService you should only declare:
public List<Feature> redefineFeatureChain(Type context, ContextualFeatureChain chain) {
return this.treeMutationSelectionDialogService.redefineFeatureChain(context, chain);
}
| List<Feature> result = this.service.redefineFeatureChain(context, new ContextualFeatureChain(context, List.of(action, parameter))); | ||
|
|
||
| // THEN null is returned, existing relationships are preserved and no local feature is created | ||
| assertThat(result).isNull(); |
There was a problem hiding this comment.
The dialog offers parameter chains that confirmation rejects
part def Base {
action run {
in attribute input;
}
}
part p : Base;
Show p in a General View, open Redefine a nested feature, select run.input, and confirm. The tool asks you to select a feature outside the parameter list and creates no redefinition.
- Cause — The dialog checks accessibility and whether a chain needs a local redefinition. The mutation service rejects input parameters under actions, and this test confirms that rejection.
- Fix — Filter out chains containing unsupported segments using the same eligibility rules as the mutation service, or integrate positional parameter redefinition before offering these chains. Test the dialog and confirmation together for
run.input. - If skipped — Users can confirm a selectable path that the tool cannot complete, even when the model stays exactly as it was when the dialog opened.
There was a problem hiding this comment.
This PR is using MM services to create redefinitions. The commit c9e1196 which has been merged recently, takes this situation in charge.
Therefore, since this is now working properly, this test can be changed to handle input parameters redefinition.
|
|
||
| === Breaking changes | ||
|
|
||
| - https://github.com/eclipse-syson/syson/issues/2590[#2590] [services] `TreeMutationAQLService` now requires an `IFeedbackMessageService` constructor argument instead of providing a public no-argument constructor. |
There was a problem hiding this comment.
Append the constructor change to the end of Breaking changes
Open the current release's Breaking changes section. The new TreeMutationAQLService entry appears above the existing #2582 entry.
- Cause — The new entry was inserted just below the heading. The SysON contribution instructions place new entries after the last entry and its continuation lines.
- Fix — Move the entry and its continuation line below Make inherited parameters and implicit parameter redefinitions consistent across metamodel queries #2620, immediately before
Dependency update. - If skipped — The release changelog will diverge from the repository's append-order convention.
Please do it for every PR, it's not the first time you do that.
| Confirming a selection closes the dialog without modifying the model. | ||
| Actual feature redefinition will be added in a subsequent change. | ||
| ** A new _Redefine a nested feature_ tool is available in the _Structure_ section of diagram palettes for `Usage` and `Definition` nodes. | ||
| Users can select a feature path to create the required local redefinitions in one operation. |
There was a problem hiding this comment.
please also add a link to the documentation
Execute redefinition on confirmation dialog of the Redefined a nested feature tool and reveal the resulting feature in the Model Explorer. Bug: eclipse-syson#2590 Signed-off-by: Jerome Gout <jerome.gout@obeosoft.com>
2bd1118 to
f5af47d
Compare
Execute redefinition on confirmation dialog of the Redefined a nested feature tool and reveal the resulting feature in the Model Explorer.
Bug: #2590
PLEASE READ ALL ITEMS AND CHECK ONLY RELEVANT CHECKBOXES BELOW
Auto review
Project management
queue:andreview-window:labels been added to the pull request? (In case of doubt, start with the labelsqueue: triageandreview-window: unscheduled)package:,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