Developers implementing their own custom HelpTopic implementations can use this utility method to ensure their implementations comply with the expected behavior of the HelpTopic#amendTopic(String, String) method. @param baseText The existing text of the help topic. @param amendment The amen
(@NotNull String baseText, @Nullable String amendment)
| 117 | * according to the expected rules of amendTopic(). |
| 118 | */ |
| 119 | @NotNull |
| 120 | protected String applyAmendment(@NotNull String baseText, @Nullable String amendment) { |
| 121 | if (amendment == null) { |
| 122 | return baseText; |
| 123 | } else { |
| 124 | return amendment.replaceAll("<text>", baseText); |
| 125 | } |
| 126 | } |
| 127 | } |