Skip to content

Commit c1350ff

Browse files
committed
Remove redundant formatLiterals - use format instead
1 parent e952774 commit c1350ff

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

recaf-ui/src/main/java/software/coley/recaf/ui/menubar/MappingMenu.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public MappingMenu(@Nonnull WindowManager windowManager,
8282
formatToExportAsItems.put(tmpFormat, mappingItems.exportAsItem());
8383
} else {
8484
MenuItem item = new MenuItem();
85-
item.textProperty().bind(Lang.formatLiterals("menu.mappings.export.unsupported", formatName));
85+
item.textProperty().bind(Lang.format("menu.mappings.export.unsupported", formatName));
8686
item.setGraphic(new FontIconView(CarbonIcons.CLOSE));
8787
item.setDisable(true);
8888
export.getItems().add(item);

recaf-ui/src/main/java/software/coley/recaf/util/Lang.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -177,29 +177,6 @@ protected synchronized String computeValue() {
177177
};
178178
}
179179

180-
/**
181-
* @param translationKey
182-
* Key name.
183-
* @param args
184-
* Format arguments.
185-
*
186-
* @return JavaFX string binding for specific translation key with arguments.
187-
*/
188-
@Nonnull
189-
public static StringBinding formatLiterals(@Nonnull String translationKey, Object... args) {
190-
StringBinding root = getBinding(translationKey);
191-
return new SynchronizedStringBinding() {
192-
{
193-
bind(root);
194-
}
195-
196-
@Override
197-
protected synchronized String computeValue() {
198-
return String.format(root.getValue(), args);
199-
}
200-
};
201-
}
202-
203180
/**
204181
* @param translationKey
205182
* Key name.

0 commit comments

Comments
 (0)