File tree Expand file tree Collapse file tree 4 files changed +16
-8
lines changed
Expand file tree Collapse file tree 4 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ Drop to a command-line, in the tcMenu/tcMenuGenerator directory and run a maven
3030
3131Run and smoke test, ensure you are in the tcMenuGenerator/target/jfx/app directory:
3232
33- java --module-path ../deps "-Dprism.lcdtext=false" --add-modules com.thecoderscorner.tcmenu.menuEditorUI com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd
33+ java --module-path ../deps "-Dprism.lcdtext=false" "-Doverride.core.plugin.dir=." --add-modules com.thecoderscorner.tcmenu.menuEditorUI com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd
3434
3535## Packaging - Build the package - Windows all versions
3636
Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ protected Optional<EnumMenuItem> getChangedMenuItem() {
4545 errors .add (new FieldError (bundle .getString ("menu.editor.enum.fmt.error" ), "Choices" ));
4646 }
4747
48+ if (localHandler .isLocalSupportEnabled ()) {
49+ checkListValuesAreInResources (listView .getItems (), errors );
50+ }
51+
4852 EnumMenuItemBuilder builder = EnumMenuItemBuilder .anEnumMenuItemBuilder ().withExisting (getMenuItem ());
4953 builder .withEnumList (items );
5054 getChangedDefaults (builder , errors );
Original file line number Diff line number Diff line change @@ -644,5 +644,15 @@ public String toString() {
644644 }
645645 }
646646
647+ protected void checkListValuesAreInResources (ObservableList <String > items , List <FieldError > errors ) {
648+ var itemsNotInResources = items .stream ()
649+ .filter (item -> item .startsWith ("%" ) && !item .startsWith ("%%" ) && item .length () > 1 )
650+ .filter (item -> localHandler .getLocalSpecificEntry (item .substring (1 )) == null )
651+ .collect (Collectors .joining (", " ));
652+ errors .add (new FieldError (bundle .getString ("menu.editor.core.locale.missing" ) + " " + itemsNotInResources ,
653+ "List values" , false ));
654+ }
655+
656+
647657 public record ControlButtons (Button addButton , Button removeButton ) { }
648658}
Original file line number Diff line number Diff line change 2626import java .util .List ;
2727import java .util .Optional ;
2828import java .util .function .BiConsumer ;
29- import java .util .stream .Collectors ;
3029
3130import static com .thecoderscorner .menu .domain .RuntimeListMenuItem .ListCreationMode ;
3231
@@ -62,12 +61,7 @@ protected Optional<RuntimeListMenuItem> getChangedMenuItem() {
6261 }
6362
6463 if (creationModeCombo .getValue () != ListCreationMode .CUSTOM_RTCALL && localHandler .isLocalSupportEnabled ()) {
65- var itemsNotInResources = listView .getItems ().stream ()
66- .filter (item -> item .startsWith ("%" ) && !item .startsWith ("%%" ) && item .length () > 1 )
67- .filter (item -> localHandler .getLocalSpecificEntry (item .substring (1 )) == null )
68- .collect (Collectors .joining (", " ));
69- errors .add (new FieldError (bundle .getString ("menu.editor.core.locale.missing" ) + " " + itemsNotInResources ,
70- "List values" , false ));
64+ checkListValuesAreInResources (listView .getItems (), errors );
7165 }
7266
7367 builder .withInitialRows (initialRowsSpinner .getValue ());
You can’t perform that action at this time.
0 commit comments