Skip to content

Commit 5c65dbf

Browse files
authored
Merge pull request #3443 from High-Voltage-Engineering/dh-expand-sar-nodes
Expand macros in OpenNodeActionHandler
2 parents 26a8931 + 298a23c commit 5c65dbf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/save-and-restore/app/src/main/java/org/phoebus/applications/saveandrestore/actions/OpenNodeActionHandler.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.csstudio.display.builder.model.spi.ActionHandler;
1010
import org.csstudio.display.builder.model.spi.ActionInfo;
1111
import org.phoebus.applications.saveandrestore.SaveAndRestoreApplication;
12+
import org.phoebus.framework.macros.MacroHandler;
1213
import org.phoebus.framework.workbench.ApplicationService;
1314

1415
import java.net.URI;
@@ -27,8 +28,11 @@ public void handleAction(Widget sourceWidget, ActionInfo actionInfo) {
2728

2829
Platform.runLater(() -> {
2930
try {
31+
String nodeId = openNodeActionInfo.getNodeId();
32+
final String expanded = MacroHandler.replace(sourceWidget.getMacrosOrProperties(), nodeId);
33+
3034
ApplicationService.createInstance(SaveAndRestoreApplication.NAME, URI.create("file:/" +
31-
URLEncoder.encode(openNodeActionInfo.getNodeId(), StandardCharsets.UTF_8) + "?app=saveandrestore&action=" + OpenNodeAction.OPEN_SAR_NODE));
35+
URLEncoder.encode(expanded, StandardCharsets.UTF_8) + "?app=saveandrestore&action=" + OpenNodeAction.OPEN_SAR_NODE));
3236
} catch (Exception e) {
3337
throw new RuntimeException(e);
3438
}

0 commit comments

Comments
 (0)