[1978] Add support for PortionKind edition with direct-edit in diagrams#2016
[1978] Add support for PortionKind edition with direct-edit in diagrams#2016
Conversation
5d3aebe to
6b3fccd
Compare
| ** Newly created `InterfaceDefinition` graphical nodes now have two initial _ports_ named _source_ and _target_. | ||
| Additional ports can be created using the _New Port as end_ graphical node tool. | ||
|
|
||
| ** Allow to edit the _timeslice_ and _snapshot_ property of `OccurrenceUsage` and subtypes graphical nodes with the direct edit. |
There was a problem hiding this comment.
property => properties
OccurrenceUsage and subtypes graphical nodes => OccurrenceUsage graphical nodes (and all its subtypes such as PartUsage, ItemUsage...)
apply the changes in the changelog as well
| public void exitPortionKindExpression(PortionKindExpressionContext ctx) { | ||
| if (this.element instanceof OccurrenceUsage occurrenceUsage) { | ||
| if (ctx != null) { | ||
| if (ctx.getText().equals(LabelConstants.TIMESLICE)) { |
There was a problem hiding this comment.
Inverse the operands or use Objects.equals
| if (ctx != null) { | ||
| if (ctx.getText().equals(LabelConstants.TIMESLICE)) { | ||
| occurrenceUsage.setPortionKind(PortionKind.TIMESLICE); | ||
| } else if (ctx.getText().equals(LabelConstants.SNAPSHOT)) { |
There was a problem hiding this comment.
Inverse the operands or use Objects.equals
| REFERENCES : 'references'; | ||
| REP : 'rep'; | ||
| RETURN : 'return'; | ||
| SNAPSHOT_PREFIX : 'snapshot'; |
There was a problem hiding this comment.
you should probably do as it done by DERIVED/DERIVED_PREFIX or CONSTANT/CONSTANT_PREFIX
| SUBTYPE : 'subtype'; | ||
| SUCCESSION : 'succession'; | ||
| THEN : 'then'; | ||
| TIMESLICE_PREFIX : 'timeslice'; |
|
|
||
| prefixNodeExpression : | ||
| (abstractPrefixExpression | variationPrefixExpression | variantPrefixExpression)* | ||
| (portionKindExpression)* (abstractPrefixExpression | variationPrefixExpression | variantPrefixExpression)* |
There was a problem hiding this comment.
it's a really strange change at first sight. why did you not add portionKindExpression as a new possibility of prefix with | ?
In other words:
FROM
(abstractPrefixExpression | variationPrefixExpression | variantPrefixExpression)*
TO
(abstractPrefixExpression | variationPrefixExpression | variantPrefixExpression | portionKindExpression)*
There was a problem hiding this comment.
Because I wanted to force the portionKindPrefixExpression to be the first prefix has it is described in the specification, but maybe that is not the best way to do it
There was a problem hiding this comment.
I will also rename portionKindExpression to portionKindPrefixExpression
There was a problem hiding this comment.
Because I wanted to force the
portionKindPrefixExpressionto be the first prefix has it is described in the specification, but maybe that is not the best way to do it
But since it is for the direct edit, that does not matter where the user has to type the keyword.
I will do as you suggested.
| @Sql(scripts = { GeneralViewDirectEditTestProjectData.SCRIPT_PATH }, executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, | ||
| config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) | ||
| @Sql(scripts = { "/scripts/cleanup.sql" }, executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD, config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) | ||
| @GivenSysONServer({ GeneralViewDirectEditTestProjectData.SCRIPT_PATH }) |
Bug: #1978 Signed-off-by: Guillaume Coutable <guillaume.coutable@obeo.fr>
6b3fccd to
9729c57
Compare
Bug: #1978
Signed-off-by: Guillaume Coutable guillaume.coutable@obeo.fr
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