-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decoupling cells and layout, blocks and layout #380
Conversation
Signed-off-by: BenoitJeanson <benoit.jeanson@rte-france.com>
Signed-off-by: BenoitJeanson <benoit.jeanson@rte-france.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's really nice work, grouping the calculation code in dedicated visitors makes it more readable - thanks! A few minor comments before merging it
single-line-diagram-core/src/main/java/com/powsybl/sld/layout/BlockCalculationVisitors.java
Outdated
Show resolved
Hide resolved
single-line-diagram-core/src/main/java/com/powsybl/sld/layout/BlockCalculationVisitors.java
Outdated
Show resolved
Hide resolved
single-line-diagram-core/src/main/java/com/powsybl/sld/layout/BlockCalculationVisitors.java
Outdated
Show resolved
Hide resolved
single-line-diagram-core/src/main/java/com/powsybl/sld/layout/BlockCalculationVisitors.java
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,131 @@ | |||
/** | |||
* Copyright (c) 2019, RTE (http://www.rte-france.com) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you change the header of the all the new added files by replacing 2019 by 2022?
single-line-diagram-core/src/main/java/com/powsybl/sld/layout/CalculateCellCoordVisitor.java
Outdated
Show resolved
Hide resolved
* @author Benoit Jeanson <benoit.jeanson at rte-france.com> | ||
*/ | ||
public class BlockCalculationVisitors { | ||
LayoutParameters layoutParameters; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be final and private. But you can remove it in fact, BlockCalculationVisitors
can be final, with private constructor and with only static methods.
single-line-diagram-core/src/main/java/com/powsybl/sld/layout/BlockCalculationVisitors.java
Outdated
Show resolved
Hide resolved
single-line-diagram-core/src/main/java/com/powsybl/sld/layout/CalculateCellCoordVisitor.java
Outdated
Show resolved
Hide resolved
single-line-diagram-core/src/main/java/com/powsybl/sld/layout/PositionVoltageLevelLayout.java
Outdated
Show resolved
Hide resolved
Signed-off-by: BenoitJeanson <benoit.jeanson@rte-france.com>
Signed-off-by: BenoitJeanson <benoit.jeanson@rte-france.com>
Kudos, SonarCloud Quality Gate passed! |
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ? If so, link to this issue using
'#XXX'
and skip the restno
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
decoupling of subpackage from model by decoupling LayoutParameters and LayoutContext to avoid circular dependencies of subpackages.
(if any of the questions/checkboxes don't apply, please delete them entirely)