Open
Conversation
....isis.ibex.configserver/src/uk/ac/stfc/isis/ibex/configserver/configuration/GlobalMacro.java
Fixed
Show fixed
Hide fixed
...server/src/uk/ac/stfc/isis/ibex/ui/configserver/editing/macros/GlobalMacroOverviewPanel.java
Fixed
Show fixed
Hide fixed
2 tasks
davidkeymer
reviewed
Nov 20, 2025
...server/src/uk/ac/stfc/isis/ibex/ui/configserver/commands/helpers/AddBlockToConfigHelper.java
Outdated
Show resolved
Hide resolved
davidkeymer
requested changes
Feb 11, 2026
...server/src/uk/ac/stfc/isis/ibex/ui/configserver/commands/helpers/AddBlockToConfigHelper.java
Outdated
Show resolved
Hide resolved
...configserver/src/uk/ac/stfc/isis/ibex/ui/configserver/commands/helpers/EditConfigHelper.java
Outdated
Show resolved
Hide resolved
Comment on lines
67
to
72
| macros = (globalmacros == null) ? new ArrayList<>() | ||
| : globalmacros.stream().sorted().filter(Objects::nonNull) | ||
| .flatMap(macro -> macro.getMacros().entrySet().stream().sorted(Map.Entry.comparingByKey()).map( | ||
| entry -> new GlobalMacroViewModel(macro.getName(), entry.getKey(), entry.getValue()))) | ||
| .collect(Collectors.toList()); | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| macros = (globalmacros == null) ? new ArrayList<>() | |
| : globalmacros.stream().sorted().filter(Objects::nonNull) | |
| .flatMap(macro -> macro.getMacros().entrySet().stream().sorted(Map.Entry.comparingByKey()).map( | |
| entry -> new GlobalMacroViewModel(macro.getName(), entry.getKey(), entry.getValue()))) | |
| .collect(Collectors.toList()); | |
| } | |
| if (globalmacros == null) { | |
| macros = new ArrayList<>(); | |
| return; | |
| } | |
| macros = globalmacros.stream() | |
| .sorted() | |
| .filter(Objects::nonNull) | |
| .flatMap(macro ->macro.getMacros() | |
| .entrySet() | |
| .stream() | |
| .sorted(Map.Entry.comparingByKey()) | |
| .map(entry -> new GlobalMacroViewModel( | |
| macro.getName(), | |
| entry.getKey(), | |
| entry.getValue() | |
| )) | |
| ) | |
| .collect(Collectors.toList()); | |
| } |
Contributor
Author
There was a problem hiding this comment.
Reformatted the code
| * @param configuresBlockGWAndArchiver True this configuration includes the block gateway and archive files; | ||
| * False these are generated by the block server | ||
| */ | ||
| public Configuration(String name, String description, String defaultSynoptic, Collection<Ioc> iocs, |
Contributor
There was a problem hiding this comment.
try deleting this constructor.
| * @param macroValue The Macro Value. | ||
| */ | ||
| public GlobalMacroViewModel(String iocName, String macroName, String macroValue) { | ||
| this.iocName = !IOC_SEPARATOR.equals(iocName) ? iocName : ALL_IOCS; |
Contributor
There was a problem hiding this comment.
instead of IOC_SEPARATOR we could use something like <All IOCs> to make it much easier to understand?
Contributor
Author
There was a problem hiding this comment.
The IOC_SEPARATOR is __ as it is used in the globals.txt. The logic additionally expects that if a macro value is true for all IOCs, then the block server will group them under the name __, ie without any IOC name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of work
GUI changes to show macro setting from globals.txt
Ticket
This address the issue described here
Acceptance criteria
Code Review
check_opi_format.pyscript in C:\Instrument\Dev\ibex_gui\base\uk.ac.stfc.isis.ibex.opis pass?Final Steps