Skip to content

Conversation

@soerendomroes
Copy link
Contributor

@soerendomroes soerendomroes commented Aug 5, 2025

Fixes #659
Fixes #1023

This comment was marked as outdated.

@soerendomroes soerendomroes requested a review from Copilot August 5, 2025 07:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements inline edge labels for self-loops that span opposing sides of a node. The changes enable proper routing and placement of edge labels that should be positioned directly on the edge path rather than offset from it.

Key changes:

  • Added inline label detection and handling in the orthogonal self-loop router
  • Modified bend point calculation to accommodate inline label dimensions
  • Updated label placement logic to support inline positioning for opposing-side loops

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
OrthogonalSelfLoopRouter.java Adds inline label detection, removes edge distance for inline labels, and adjusts bend points to reserve space for inline labels
LabelPlacer.java Updates label assignment logic to handle inline labels for opposing-side loops and removes inline property for invalid cases
SelfLoopEdge.java Adds utility methods to check for inline labels and get label sides
Comments suppressed due to low confidence (2)

plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/loops/routing/OrthogonalSelfLoopRouter.java:381

  • The variable name 'labelSides' is misleading as it represents a single PortSide, not multiple sides. Consider renaming to 'labelSide' for clarity.
        PortSide labelSides =  slEdge.getLabelSides();

plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/loops/SelfLoopEdge.java:98

  • The method name 'getLabelSides' suggests it returns multiple sides, but it returns a single PortSide. Consider renaming to 'getLabelSide' for accuracy.
    public PortSide getLabelSides() {

@soerendomroes soerendomroes added this to the Release 0.10.1 milestone Aug 5, 2025
@soerendomroes soerendomroes merged commit 72d245a into eclipse-elk:master Aug 11, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selfloops edge labels cannot be inlined Selfloop labels are not inlined

1 participant