-
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
OperatingStatus extension is on an Identifiable #598
Conversation
Signed-off-by: Sophie Frasnedo <sophie.frasnedo@rte-france.com>
...diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DefaultLabelProvider.java
Outdated
Show resolved
Hide resolved
...diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DefaultLabelProvider.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Sophie Frasnedo <sophie.frasnedo@rte-france.com>
...diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DefaultLabelProvider.java
Outdated
Show resolved
Hide resolved
...diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DefaultLabelProvider.java
Outdated
Show resolved
Hide resolved
...diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DefaultLabelProvider.java
Outdated
Show resolved
Hide resolved
...diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DefaultLabelProvider.java
Outdated
Show resolved
Hide resolved
...diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DefaultLabelProvider.java
Outdated
Show resolved
Hide resolved
...diagram/single-line-diagram-core/src/main/java/com/powsybl/sld/svg/DefaultLabelProvider.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Sophie Frasnedo <sophie.frasnedo@rte-france.com>
break; | ||
} | ||
case HVDC -> addOperatingStatusDecorator(nodeDecorators, node, direction, network.getHvdcLine(feederNode.getEquipmentId())); | ||
default -> { /* Do nothing */ } |
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.
It was a code smell before because you did nothing without telling why. Now that you added the comment it ensures that it was not an empty statement by mistake. But it's more valuable to also add more context like "no decorator for other feeder types"
switch (operatingStatus.getStatus()) { | ||
case PLANNED_OUTAGE -> nodeDecorators.add(getBranchStatusDecorator(node, direction, PLANNED_OUTAGE_BRANCH_NODE_DECORATOR)); | ||
case FORCED_OUTAGE -> nodeDecorators.add(getBranchStatusDecorator(node, direction, FORCED_OUTAGE_BRANCH_NODE_DECORATOR)); | ||
default -> { /* Do nothing */ } |
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.
Same here, and as there is only one other enum value, it's better to have it displayed instead of default
default -> { /* Do nothing */ } | |
case IN_OPERATION -> { /* no decorator for in operation equipments */ } |
Signed-off-by: Sophie Frasnedo <sophie.frasnedo@rte-france.com>
Quality Gate passedIssues Measures |
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
The OperatingStatus extension on an HVDCLine is currently read on the ConverterStation. Thus the code always returns null and the extension is never read.
What is the new behavior (if this is a feature change)?
The extension is read on the HVDCLine.
Does this PR introduce a breaking change or deprecate an API?