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
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ This fix ensure that imported models containing, for example, a top-level `Libra
- https://github.com/eclipse-syson/syson/issues/1825[#1825] [export] `LiteralRational` value wrongly rounded during textual export.
- https://github.com/eclipse-syson/syson/issues/1784[#1784] [export] Error while exporting `FeatureValue` using enumeration literals.
- https://github.com/eclipse-syson/syson/issues/1838[#1838] [metamodel] Invalid computation of `Usage.getType`: The subsetted features should be taken into account.
- https://github.com/eclipse-syson/syson/issues/1852[#1852] [diagrams] Do not propose the _Duplicate Element_ node action on elements which do not support it

=== Improvements

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023, 2025 Obeo.
* Copyright (c) 2023, 2026 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
Expand Down Expand Up @@ -31,6 +31,7 @@
import org.eclipse.sirius.components.view.diagram.provider.DefaultToolsFactory;
import org.eclipse.sirius.components.view.emf.diagram.ViewDiagramDescriptionConverter;
import org.eclipse.syson.diagram.services.aql.DiagramMutationAQLService;
import org.eclipse.syson.util.AQLConstants;
import org.eclipse.syson.util.AQLUtils;
import org.eclipse.syson.util.ServiceMethod;
import org.eclipse.syson.util.StandardDiagramsConstants;
Expand Down Expand Up @@ -96,6 +97,7 @@ protected NodeTool getDuplicateElementAndNodeTool() {
return this.diagramBuilderHelper.newNodeTool()
.name("Duplicate Element")
.iconURLsExpression("/images/content_copy.svg")
.preconditionExpression(AQLConstants.AQL + "self.oclIsKindOf(sysml::Element) and not self.oclIsKindOf(sysml::Relationship)")
.body(this.viewBuilderHelper.newChangeContext()
.expression(
ServiceMethod.of4(DiagramMutationAQLService::duplicateElementAndExpose)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ a|image::explorer-duplicate-object-dialog.png[Duplicate Object dialog, width=40%

- A new tool is available in the palette of diagram graphical nodes to duplicate the graphical node and its semantic `Element`.

[NOTE]
====
This action is not available on `Relationships`.
====

image::manage-elements-duplicate-from-diagram.png[Duplicate element from Diagram, width=40%,height=40%]

- In diagrams, a new graphical edge tool is available to create binary `ConnectionUsage` between `Usages`.
Expand Down
Loading