Skip to content

Commit

Permalink
[fix] Fix borderSize for all EdgeStyle
Browse files Browse the repository at this point in the history
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
  • Loading branch information
AxelRICHARD committed Jun 27, 2024
1 parent 3038074 commit 934d117
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public void link(DiagramDescription diagramDescription, IViewDiagramElementFinde

private EdgeStyle createEdgeStyle() {
return this.diagramBuilderHelper.newEdgeStyle()
.borderSize(0)
.color(this.colorProvider.getColor(ViewConstants.DEFAULT_EDGE_COLOR))
.edgeWidth(1)
.lineStyle(LineStyle.SOLID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
import org.eclipse.sirius.components.view.diagram.DiagramDescription;
import org.eclipse.sirius.components.view.diagram.EdgeDescription;
import org.eclipse.sirius.components.view.diagram.EdgeStyle;
import org.eclipse.sirius.components.view.diagram.InsideLabelDescription;
import org.eclipse.sirius.components.view.diagram.InsideLabelPosition;
import org.eclipse.sirius.components.view.diagram.InsideLabelStyle;
import org.eclipse.sirius.components.view.diagram.LabelEditTool;
import org.eclipse.sirius.components.view.diagram.LineStyle;
import org.eclipse.sirius.components.view.diagram.NodeDescription;
Expand Down Expand Up @@ -100,34 +97,6 @@ public void link(DiagramDescription diagramDescription, IViewDiagramElementFinde
edgeDescription.setPalette(this.createEdgePalette());
}

protected InsideLabelDescription createInsideLabelDescription() {
return this.diagramBuilderHelper.newInsideLabelDescription()
.labelExpression(AQLUtils.getSelfServiceCallExpression("getContainerLabel"))
.position(InsideLabelPosition.TOP_CENTER)
.style(this.createInsideLabelStyle())
.build();
}

protected InsideLabelStyle createInsideLabelStyle() {
return this.diagramBuilderHelper.newInsideLabelStyle()
.borderSize(0)
.displayHeaderSeparator(true)
.labelColor(this.colorProvider.getColor(ViewConstants.DEFAULT_LABEL_COLOR))
.showIcon(true)
.withHeader(true)
.build();
}

private EdgeStyle createEdgeStyle() {
return this.diagramBuilderHelper.newEdgeStyle()
.color(this.colorProvider.getColor(ViewConstants.DEFAULT_EDGE_COLOR))
.edgeWidth(1)
.lineStyle(LineStyle.SOLID)
.sourceArrowStyle(ArrowStyle.FILL_DIAMOND)
.targetArrowStyle(ArrowStyle.NONE)
.build();
}

@Override
protected boolean isDeletable() {
return true;
Expand Down Expand Up @@ -169,4 +138,15 @@ protected ChangeContextBuilder getTargetReconnectToolBody() {
return this.viewBuilderHelper.newChangeContext()
.expression(AQLConstants.AQL + AQLConstants.EDGE_SEMANTIC_ELEMENT + ".reconnnectTargetCompositionEdge(" + String.join(",", params) + ")");
}

private EdgeStyle createEdgeStyle() {
return this.diagramBuilderHelper.newEdgeStyle()
.borderSize(0)
.color(this.colorProvider.getColor(ViewConstants.DEFAULT_EDGE_COLOR))
.edgeWidth(1)
.lineStyle(LineStyle.SOLID)
.sourceArrowStyle(ArrowStyle.FILL_DIAMOND)
.targetArrowStyle(ArrowStyle.NONE)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public void link(DiagramDescription diagramDescription, IViewDiagramElementFinde

private EdgeStyle createEdgeStyle() {
return this.diagramBuilderHelper.newEdgeStyle()
.borderSize(0)
.color(this.colorProvider.getColor(ViewConstants.DEFAULT_EDGE_COLOR))
.edgeWidth(1)
.lineStyle(LineStyle.DASH)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public void link(DiagramDescription diagramDescription, IViewDiagramElementFinde

private EdgeStyle createEdgeStyle() {
return this.diagramBuilderHelper.newEdgeStyle()
.borderSize(0)
.color(this.colorProvider.getColor(ViewConstants.DEFAULT_EDGE_COLOR))
.edgeWidth(1)
.lineStyle(LineStyle.SOLID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public void link(DiagramDescription diagramDescription, IViewDiagramElementFinde

private EdgeStyle createEdgeStyle() {
return this.diagramBuilderHelper.newEdgeStyle()
.borderSize(0)
.color(this.colorProvider.getColor(ViewConstants.DEFAULT_EDGE_COLOR))
.edgeWidth(1)
.lineStyle(LineStyle.SOLID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public void link(DiagramDescription diagramDescription, IViewDiagramElementFinde

private EdgeStyle createEdgeStyle() {
return this.diagramBuilderHelper.newEdgeStyle()
.borderSize(0)
.color(this.colorProvider.getColor(ViewConstants.DEFAULT_EDGE_COLOR))
.edgeWidth(1)
.lineStyle(LineStyle.SOLID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public String getName() {

private EdgeStyle createEdgeStyle() {
return this.diagramBuilderHelper.newEdgeStyle()
.borderSize(0)
.color(this.colorProvider.getColor(ViewConstants.DEFAULT_EDGE_COLOR))
.edgeWidth(1)
.lineStyle(LineStyle.SOLID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public String getName() {

private EdgeStyle createEdgeStyle() {
return this.diagramBuilderHelper.newEdgeStyle()
.borderSize(0)
.color(this.colorProvider.getColor(ViewConstants.DEFAULT_EDGE_COLOR))
.edgeWidth(1)
.lineStyle(LineStyle.SOLID)
Expand Down

0 comments on commit 934d117

Please sign in to comment.