Skip to content

Commit 46a7634

Browse files
authored
Merge pull request #2618 from ControlSystemStudio/action_macro_props
Widget open-file actions: support $(property)
2 parents fbb6732 + 8f6166a commit 46a7634

File tree

1 file changed

+4
-1
lines changed
  • app/display/runtime/src/main/java/org/csstudio/display/builder/runtime

1 file changed

+4
-1
lines changed

app/display/runtime/src/main/java/org/csstudio/display/builder/runtime/ActionUtil.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ private static void openDisplay(final Widget source_widget,
8888
final Macros expanded = new Macros(action.getMacros());
8989
expanded.expandValues(source_widget.getEffectiveMacros());
9090
final Macros macros = Macros.merge(source_widget.getEffectiveMacros(), expanded);
91+
// For display path, use the combined macros...
9192
expanded_path = MacroHandler.replace(new MacroOrSystemProvider(macros), action.getFile());
93+
// .. but fall back to properties
94+
expanded_path = MacroHandler.replace(source_widget.getMacrosOrProperties(), expanded_path);
9295
logger.log(Level.FINER, "{0}, effective macros {1} ({2})", new Object[] { action, macros, expanded_path });
9396

9497
// Resolve new display file relative to the source widget model (not 'top'!)
@@ -370,7 +373,7 @@ private static void openWebpage(final Widget source_widget, final OpenWebpageAct
370373
private static String resolve(final Widget source_widget, final String path) throws Exception
371374
{
372375
// Path to resolve, after expanding macros
373-
final Macros macros = source_widget.getEffectiveMacros();
376+
final MacroValueProvider macros = source_widget.getMacrosOrProperties();
374377
final String expanded_path = MacroHandler.replace(macros, path);
375378

376379
// Resolve file relative to the source widget model (not 'top'!)

0 commit comments

Comments
 (0)