Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
- https://github.com/eclipse-syson/syson/issues/2198[#2198] [diagrams] Improve diagram-to-diagram drag and drop to support dropping multiple graphical nodes at once, leveraging Sirius Web's `droppedNodes` and `droppedElements` variables.
- https://github.com/eclipse-syson/syson/issues/2194[#2194] [diagrams] Properly report feedback messages to user when using _ISysMLMoveElementService_.
- https://github.com/eclipse-syson/syson/issues/2182[#2182] [services] Provide a way for downstream applications to extend _ISysMLMoveElementService_;
- https://github.com/eclipse-syson/syson/issues/2240[#2240] [diagrams] Update the choice of _timeslice_ and _snapshot_ elements that can be created in the selection dialog of tools creating _timeslice_ and _snapshot_ elements.
Before, the selection dialog option with selection allowed choosing between all _timeslice/snapshot_ types.
Now, the choice is restricted to the _timeslice/snapshot_ type that match the graphical node type on which the tool is applied.


=== New features
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public static class GraphicalIds {

public static final String ACTION_USAGE_ID = "61aaf64a-4fbc-356e-ba73-4bd47b386989";

public static final String ALLOCATION_USAGE_ID = "361506fb-2a1d-3edc-be2d-8cd60a235f53";

public static final String ATTRIBUTE_USAGE_ID = "7b8e6835-c563-35cd-8991-e2f894fc2139";

public static final String CONCERN_USAGE_ID = "0999b8c3-d37c-3644-a1d6-b9777a499d11";
Expand All @@ -38,16 +40,22 @@ public static class GraphicalIds {

public static final String ITEM_DEFINITION_ID = "df3542d9-6314-3da5-993c-a296f4042674";

public static final String PART_USAGE_ID = "4c4fe0d5-4974-377e-9113-9ab022c75f8c";
public static final String ITEM_USAGE_ID = "78a84b8a-e91c-3338-b447-864793773dd9";

public static final String INTERFACE_USAGE_ID = "6bc0765c-4f9f-3a9e-ab45-3d717519535c";

public static final String PART_DEFINITION_ID = "fa617798-658e-3812-92f2-52e2fc39f851";

public static final String PART_DEFINITION_TEXTUAL_REP_ID = "3a992e49-95fa-384a-bb54-47284825bf17";

public static final String REQUIREMENT_USAGE_ID = "3eea9d01-7033-3f31-b7ef-561b5bc86d10";
public static final String PART_USAGE_ID = "4c4fe0d5-4974-377e-9113-9ab022c75f8c";

public static final String OCCURRENCE_USAGE_ID = "47653014-87d1-3dc6-856b-72454aa93154";

public static final String REQUIREMENT_DEFINITION_ID = "b83f2b54-1602-382d-beb1-c500e08a8684";

public static final String REQUIREMENT_USAGE_ID = "3eea9d01-7033-3f31-b7ef-561b5bc86d10";

public static final String STATE_USAGE_ID = "1541c013-2cc7-3dd7-a39f-6e33d07b411e";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@
*******************************************************************************/
package org.eclipse.syson.direct.edit.grammars;

import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.RuntimeMetaData;
import org.antlr.v4.runtime.Vocabulary;
import org.antlr.v4.runtime.VocabularyImpl;
import org.antlr.v4.runtime.atn.ATN;
import org.antlr.v4.runtime.atn.ATNDeserializer;
import org.antlr.v4.runtime.atn.LexerATNSimulator;
import org.antlr.v4.runtime.atn.PredictionContextCache;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.*;

@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"})
public class DirectEditLexer extends Lexer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,14 @@
*******************************************************************************/
package org.eclipse.syson.direct.edit.grammars;

import java.util.List;

import org.antlr.v4.runtime.FailedPredicateException;
import org.antlr.v4.runtime.NoViableAltException;
import org.antlr.v4.runtime.Parser;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.RecognitionException;
import org.antlr.v4.runtime.RuleContext;
import org.antlr.v4.runtime.RuntimeMetaData;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.Vocabulary;
import org.antlr.v4.runtime.VocabularyImpl;
import org.antlr.v4.runtime.atn.ATN;
import org.antlr.v4.runtime.atn.ATNDeserializer;
import org.antlr.v4.runtime.atn.ParserATNSimulator;
import org.antlr.v4.runtime.atn.PredictionContextCache;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.tree.ParseTreeListener;
import org.antlr.v4.runtime.tree.TerminalNode;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"})
public class DirectEditParser extends Parser {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
*******************************************************************************/
package org.eclipse.syson.diagram.common.view.tools;

import java.util.List;
import java.util.stream.Collectors;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.sirius.components.collaborative.diagrams.DiagramContext;
import org.eclipse.sirius.components.core.api.IEditingContext;
import org.eclipse.sirius.components.diagrams.Node;
Expand All @@ -33,7 +29,6 @@
import org.eclipse.syson.sysml.SysmlPackage;
import org.eclipse.syson.util.AQLConstants;
import org.eclipse.syson.util.ServiceMethod;
import org.eclipse.syson.util.SysMLMetamodelHelper;

/**
* Used to create a snapshot in an in any subclass of {@link org.eclipse.syson.sysml.OccurrenceUsage}.
Expand All @@ -46,28 +41,6 @@
*/
public class OccurrenceUsageSnapshotNodeToolProvider implements INodeToolProvider {

private static final List<EClass> SUPPORTED_PORTION_KIND_ELEMENTS = List.of(
SysmlPackage.eINSTANCE.getAcceptActionUsage(),
SysmlPackage.eINSTANCE.getActionUsage(),
SysmlPackage.eINSTANCE.getAllocationUsage(),
SysmlPackage.eINSTANCE.getAssignmentActionUsage(),
SysmlPackage.eINSTANCE.getCaseUsage(),
SysmlPackage.eINSTANCE.getConcernUsage(),
SysmlPackage.eINSTANCE.getConstraintUsage(),
SysmlPackage.eINSTANCE.getExhibitStateUsage(),
SysmlPackage.eINSTANCE.getInterfaceUsage(),
SysmlPackage.eINSTANCE.getItemUsage(),
SysmlPackage.eINSTANCE.getOccurrenceUsage(),
SysmlPackage.eINSTANCE.getPartUsage(),
SysmlPackage.eINSTANCE.getPerformActionUsage(),
SysmlPackage.eINSTANCE.getPortUsage(),
SysmlPackage.eINSTANCE.getRequirementUsage(),
SysmlPackage.eINSTANCE.getSatisfyRequirementUsage(),
SysmlPackage.eINSTANCE.getStateUsage(),
SysmlPackage.eINSTANCE.getUseCaseUsage(),
SysmlPackage.eINSTANCE.getViewUsage()
);

private final DiagramBuilders diagramBuilderHelper = new DiagramBuilders();

private final ViewBuilders viewBuilderHelper = new ViewBuilders();
Expand Down Expand Up @@ -130,9 +103,8 @@ private DialogDescription getDescriptionDialog() {
}

private SelectionDialogTreeDescription getDialogTreeDescriptionDialog() {
String elementsExpression = SUPPORTED_PORTION_KIND_ELEMENTS.stream().map(SysMLMetamodelHelper::buildQualifiedName).collect(Collectors.joining(",", "aql:Sequence{", "}"));
return this.diagramBuilderHelper.newSelectionDialogTreeDescription()
.elementsExpression(elementsExpression)
.elementsExpression(AQLConstants.AQL_SELF + ".eClass()")
.isSelectableExpression(AQLConstants.AQL_TRUE)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
*******************************************************************************/
package org.eclipse.syson.diagram.common.view.tools;

import java.util.List;
import java.util.stream.Collectors;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.sirius.components.collaborative.diagrams.DiagramContext;
import org.eclipse.sirius.components.core.api.IEditingContext;
import org.eclipse.sirius.components.diagrams.Node;
Expand All @@ -34,7 +30,6 @@
import org.eclipse.syson.sysml.SysmlPackage;
import org.eclipse.syson.util.AQLConstants;
import org.eclipse.syson.util.ServiceMethod;
import org.eclipse.syson.util.SysMLMetamodelHelper;

/**
* Used to create a time slice in any subclass of {@link org.eclipse.syson.sysml.OccurrenceUsage}.
Expand All @@ -47,28 +42,6 @@
*/
public class OccurrenceUsageTimesliceNodeToolProvider implements INodeToolProvider {

private static final List<EClass> SUPPORTED_PORTION_KIND_ELEMENTS = List.of(
SysmlPackage.eINSTANCE.getAcceptActionUsage(),
SysmlPackage.eINSTANCE.getActionUsage(),
SysmlPackage.eINSTANCE.getAllocationUsage(),
SysmlPackage.eINSTANCE.getAssignmentActionUsage(),
SysmlPackage.eINSTANCE.getCaseUsage(),
SysmlPackage.eINSTANCE.getConcernUsage(),
SysmlPackage.eINSTANCE.getConstraintUsage(),
SysmlPackage.eINSTANCE.getExhibitStateUsage(),
SysmlPackage.eINSTANCE.getInterfaceUsage(),
SysmlPackage.eINSTANCE.getItemUsage(),
SysmlPackage.eINSTANCE.getOccurrenceUsage(),
SysmlPackage.eINSTANCE.getPartUsage(),
SysmlPackage.eINSTANCE.getPerformActionUsage(),
SysmlPackage.eINSTANCE.getPortUsage(),
SysmlPackage.eINSTANCE.getRequirementUsage(),
SysmlPackage.eINSTANCE.getSatisfyRequirementUsage(),
SysmlPackage.eINSTANCE.getStateUsage(),
SysmlPackage.eINSTANCE.getUseCaseUsage(),
SysmlPackage.eINSTANCE.getViewUsage()
);

private final DiagramBuilders diagramBuilderHelper = new DiagramBuilders();

private final ViewBuilders viewBuilderHelper = new ViewBuilders();
Expand Down Expand Up @@ -131,9 +104,8 @@ private DialogDescription getDescriptionDialog() {
}

private SelectionDialogTreeDescription getDialogTreeDescriptionDialog() {
String elementsExpression = SUPPORTED_PORTION_KIND_ELEMENTS.stream().map(SysMLMetamodelHelper::buildQualifiedName).collect(Collectors.joining(",", "aql:Sequence{", "}"));
return this.diagramBuilderHelper.newSelectionDialogTreeDescription()
.elementsExpression(elementsExpression)
.elementsExpression(AQLConstants.AQL_SELF + ".eClass()")
.isSelectableExpression(AQLConstants.AQL_TRUE)
.build();
}
Expand Down
21 changes: 12 additions & 9 deletions doc/content/modules/user-manual/pages/release-notes/2026.7.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ image::release-notes-start-done-states.png[Tool to create a start and done, widt
+
image::release-notes-framed-concern-tool.png[Tool to create a _frame_ concern usage, width=60%,height=60%]

** Add the _frames_ compartment graphical node in `RequirementUsage` and `RequirementDefinition` graphical nodes.
** Add the _frames_ compartment graphical node to `RequirementUsage` and `RequirementDefinition` graphical nodes.
+
image::release-notes-frames-compartment.png[frames compartment displaying concern usages of a requirement, width=40%,height=40%]

Expand All @@ -32,7 +32,7 @@ image::release-notes-frames-compartment.png[frames compartment displaying concer
* In the _Explorer_ view:

** The tree items corresponding to the internals of `Expression` elements (syntax tree) are now hidden by default.
A new _Explorer_ view filter named _Hide expression internals_ allows to display them if needed.
A new _Explorer_ view filter named _Hide expression internals_ allows displaying them if needed.
+
[cols="1,1"]
|===
Expand All @@ -43,17 +43,17 @@ a|image::explorer-expression-internals-hidden.png[Internals hidden (default)]
a|image::explorer-expression-internals-visible.png[Internals visible]
|===

** The dialog creating a child element provide two more options for `RequirementUsage` or `RequirementDefinition` tree items.
One creates a `ConcernUsage` and another one creates `FramedConcernMembership`.
The one creating a `ConcernUsage` create a `FramedConcernMembership` as an intermediate container.
The one creating a `FramedConcernMembership` only creates the membership.
In both cases, to display the `FramedConcernMembership` deactivate the `Hide Memberships` filter.
** The dialog creating a child element provides two more options for `RequirementUsage` or `RequirementDefinition` tree items.
One creates a `ConcernUsage` and another one creates a `FramedConcernMembership`.
The option that creates a `ConcernUsage` creates a `FramedConcernMembership` as an intermediate container.
The option that creates a `FramedConcernMembership` only creates the membership.
In both cases, to display the `FramedConcernMembership`, deactivate the `Hide Memberships` filter.
** It is now possible to create, edit and delete _Expressions_ using their textual syntax from the _Explorer_ view.
To _create_ an expression, invoke the _New expression_ context menu action on a compatible element (supported elements are `Attributes`, `Constraints` and `Transitions`).
A modal will open where you can enter the textual representation of the expression to create.
Click on the _Update_ button to validate.
If the expression entered is valid, it will be created and the modal will be automatically close.
If the expression entered is _not_ valid, the modal will be kept open and show the error(s) in an expandable accordion.
If the entered expression is valid, it will be created and the modal will automatically close.
If the entered expression is _not_ valid, the modal will remain open and show the error(s) in an expandable accordion.
Fix any error reported before clicking on _Update_ again (or canceling the operation).
+
image::edit-expression-modal.png[Edit expression modal, width=80%]
Expand All @@ -78,6 +78,9 @@ Now, the label dynamically adapts based on whether the `ConcernUsage` or `Constr
*** Elements having both a name and an owned reference subsetting now display using the standard subsetting notation (e.g., `ElementName ::> SubsettingName`).
*** Elements without name and an owned reference subsetting display only the reference subsetting name
*** Elements without reference subsetting display their name.
** Update the choice of _timeslice_ and _snapshot_ elements that can be created in the selection dialog of tools creating _timeslice_ and _snapshot_ elements.
Before, the selection dialog allowed choosing between all _timeslice_ and _snapshot_ types.
Now, the choice is restricted to the _timeslice_ or _snapshot_ type that matches the graphical node type on which the tool is applied.

== Technical details

Expand Down
Loading