Skip to content

Commit

Permalink
[2869] Add diagramContext variable to DiagramCreationService#doRender
Browse files Browse the repository at this point in the history
Bug: #2869
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
  • Loading branch information
AxelRICHARD authored and sbegaudeau committed Jan 8, 2024
1 parent 8a69bea commit 6059632
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.adoc
Expand Up @@ -114,7 +114,7 @@ It is the responsibility of the drop targets (e.g. a diagram) to validate the dr
- https://github.com/eclipse-sirius/sirius-web/issues/2772[#2772] Improve performance of the Palette
- https://github.com/eclipse-sirius/sirius-web/issues/2679[#2679] [diagram] When editing a label, place input element closer to the label's location (centered).
- https://github.com/eclipse-sirius/sirius-web/issues/2804[#2804] [sirius-web] Add the ability to declare custom nodes while using the `sirius-web-application` frontend package.
- https://github.com/eclipse-sirius/sirius-web/issues/2718[#2718] Replacing useNodes and useEdges by useReactFlow to imporove performances.
- https://github.com/eclipse-sirius/sirius-web/issues/2718[#2718] Replacing useNodes and useEdges by useReactFlow to improve performances.
- https://github.com/eclipse-sirius/sirius-web/issues/2787[#2787] [view] Add the ability to customize the icons of the node tools and edge tools in the View DSL.
- https://github.com/eclipse-sirius/sirius-web/issues/2784[#2784] [performance] Expand monitoring capabilities.
- https://github.com/eclipse-sirius/sirius-web/issues/2760[#2760] Begin and end label placement of and edge takes into account handle position.
Expand All @@ -127,6 +127,7 @@ image:doc/screenshots/biggerResizeHandles.png[Compartment with header without se
- https://github.com/eclipse-sirius/sirius-web/issues/2609[#2609] [diagram] Move handles after node move to reduce edges crossing.
- https://github.com/eclipse-sirius/sirius-web/issues/2484[#2484] [diagram] Split the label concept into three concepts: edge label, inside label and outside label.
This is a preliminary work to add some proper support for outside labels in the near future.
- https://github.com/eclipse-sirius/sirius-web/issues/2869[#2869] [diagram] Add `diagramContext` variable to accessible variables when computing semantic candidates expression.

== v2023.12.0

Expand Down
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019, 2023 Obeo and others.
* Copyright (c) 2019, 2024 Obeo and others.
* 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 @@ -138,6 +138,7 @@ private Diagram doRender(String label, Object targetObject, IEditingContext edit
variableManager.put(VariableManager.SELF, targetObject);
variableManager.put(IEditingContext.EDITING_CONTEXT, editingContext);
variableManager.put(Environment.ENVIRONMENT, new Environment(Environment.SIRIUS_COMPONENTS));
variableManager.put(IDiagramContext.DIAGRAM_CONTEXT, optionalDiagramContext.orElse(null));

Optional<IDiagramEvent> optionalDiagramElementEvent = optionalDiagramContext.map(IDiagramContext::getDiagramEvent);
Optional<Diagram> optionalPreviousDiagram = optionalDiagramContext.map(IDiagramContext::getDiagram);
Expand Down

0 comments on commit 6059632

Please sign in to comment.