···192192org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
193193org.eclipse.jdt.core.formatter.brace_position_for_block_in_case_after_arrow=end_of_line
194194org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
195195-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
195195+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line_on_wrap
196196org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
197197org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
198198org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
···202202org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
203203org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true
204204org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false
205205-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
205205+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
206206org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
207207org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true
208208org.eclipse.jdt.core.formatter.comment.format_block_comments=false
···414414org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
415415org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
416416org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
417417-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
417417+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=insert
418418org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
419419org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
420420org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
···468468org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false
469469org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false
470470org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line=one_line_never
471471-org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line=one_line_never
471471+org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line=one_line_if_empty
472472org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
473473org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_if_empty
474474org.eclipse.jdt.core.formatter.lineSplit=160
+1-1
build.gradle.kts
···1515plugins {
1616 id("java")
1717 id("com.github.johnrengelman.shadow") version "8.1.1"
1818- id("net.nemerosa.versioning") version "2.8.2"
1818+ id("net.nemerosa.versioning") version "3.1.0"
1919 id("com.jaredsburrows.license") version "0.9.7"
2020}
2121
+44
exec/StarRod.bat
···11@echo off
22+setlocal enabledelayedexpansion
33+44+echo Checking for Java...
55+66+@rem Check if Java is installed
77+java -version 2>nul >nul
88+if %errorlevel% neq 0 (
99+ echo.
1010+ echo ERROR: Java is not installed or not in PATH.
1111+ echo You must install Java ^(version ^>= 17^) to run Star Rod:
1212+ echo https://www.oracle.com/java/technologies/downloads/
1313+ pause >nul
1414+ exit /b 1
1515+)
1616+1717+@rem Extract the Java version string
1818+for /f "tokens=3 delims= " %%A in ('java -version 2^>^&1 ^| findstr /i "version"') do (
1919+ set "java_version=%%~A"
2020+)
2121+2222+@rem Extract the major version number
2323+for /f "tokens=1 delims=." %%A in ("%java_version%") do set "java_major=%%A"
2424+2525+echo Detected Java version: %java_version%
2626+2727+@rem Check if the major version is >= 17
2828+if %java_major% lss 17 (
2929+ echo.
3030+ echo ERROR: Star Rod requires Java version 17 or greater.
3131+ echo Install a more recent version of Java to run Star Rod:
3232+ echo https://www.oracle.com/java/technologies/downloads/
3333+ pause >nul
3434+ exit /b 1
3535+)
3636+3737+if not exist "StarRod.jar" (
3838+ echo.
3939+ echo ERROR: StarRod.jar not found in the current directory.
4040+ echo Please ensure that StarRod.jar is located in the same folder as this script.
4141+ pause >nul
4242+ exit /b 1
4343+)
4444+4545+@rem Valid Java version detected, launch Star Rod
246start "" javaw -jar -mx2G StarRod.jar
+1-2
src/main/java/app/Environment.java
···310310 File db = Directories.DATABASE.toFile();
311311312312 if (!db.exists() || !db.isDirectory()) {
313313- SwingUtils.getMessageDialog()
313313+ SwingUtils.getErrorDialog()
314314 .setTitle("Missing Directory")
315315 .setMessage("Could not find required directory: " + db.getName(),
316316 "It should be in the same directory as the jar.")
317317- .setMessageType(JOptionPane.ERROR_MESSAGE)
318317 .show();
319318320319 exit();
+5-10
src/main/java/app/RomValidator.java
···3939 public static File validateROM(File f) throws IOException
4040 {
4141 if (f.length() != LENGTH) {
4242- SwingUtils.getMessageDialog()
4242+ SwingUtils.getErrorDialog()
4343 .setTitle("ROM Validation Error")
4444 .setMessage("Selected file is not the correct size.")
4545- .setMessageType(JOptionPane.ERROR_MESSAGE)
4645 .show();
47464847 return null;
···118117 else {
119118 pleaseWait.setVisible(false);
120119121121- SwingUtils.getMessageDialog()
120120+ SwingUtils.getErrorDialog()
122121 .setTitle("ROM Validation Failure")
123122 .setMessage("Incorrect ROM or version, CRC does not match.")
124124- .setMessageType(JOptionPane.ERROR_MESSAGE)
125123 .show();
126124127125 raf.close();
···136134 if (!verifyCRCs(raf)) {
137135 pleaseWait.setVisible(false);
138136139139- SwingUtils.getMessageDialog()
137137+ SwingUtils.getErrorDialog()
140138 .setTitle("ROM Validation Failure")
141139 .setMessage("ROM data does not match CRC values!")
142142- .setMessageType(JOptionPane.ERROR_MESSAGE)
143140 .show();
144141145142 return null;
···148145 else {
149146 pleaseWait.setVisible(false);
150147151151- SwingUtils.getMessageDialog()
148148+ SwingUtils.getErrorDialog()
152149 .setTitle("ROM Validation Failure")
153150 .setMessage("Incorrect ROM or version, CRC does not match.")
154154- .setMessageType(JOptionPane.ERROR_MESSAGE)
155151 .show();
156152157153 raf.close();
···175171 if (!fileMD5.equals(MD5)) {
176172 pleaseWait.setVisible(false);
177173178178- SwingUtils.getMessageDialog()
174174+ SwingUtils.getErrorDialog()
179175 .setTitle("ROM Validation Failure")
180176 .setMessage("MD5 hash does not match!")
181181- .setMessageType(JOptionPane.ERROR_MESSAGE)
182177 .show();
183178184179 return null;
+2-5
src/main/java/app/StackTraceDialog.java
···79798080 StringBuilder msgBuilder = new StringBuilder();
81818282- if (e instanceof InputFileException) {
8383- InputFileException ifx = (InputFileException) e;
8282+ if (e instanceof InputFileException ifx) {
8483 msgBuilder.append(ifx.getOrigin());
8584 msgBuilder.append(System.lineSeparator());
8685 inputFile = ifx.getSourceFile();
···146145 JScrollPane detailScrollPane = new JScrollPane(textArea);
147146 detailScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
148147149149- int choice = SwingUtils.getOptionDialog()
148148+ int choice = SwingUtils.getErrorDialog()
150149 .setTitle("Exception Details")
151150 .setMessage(detailScrollPane)
152152- .setMessageType(JOptionPane.ERROR_MESSAGE)
153151 .setOptionsType(JOptionPane.YES_NO_CANCEL_OPTION)
154154- .setIcon(Environment.ICON_ERROR)
155152 .setOptions("OK", "Copy to Clipboard")
156153 .choose();
157154
···3636 }
37373838 /**
3939- * Certain actions only use commands for undo/redo maintainence, and not for the initial execution. Those commands are
4040- * sent here. However, this practice should be avoided wherever possible because it may lead to subtle errors involving
3939+ * Certain actions only use commands for undo/redo maintainence, and not for the
4040+ * initial execution. Those commands are sent here. However, this practice should
4141+ * be avoided wherever possible because it may lead to subtle errors involving
4142 * undo/redo state integrity.
4243 */
4344 public void pushCommand(AbstractCommand cmd)