mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-10 19:32:33 +00:00
Configs with Internal annotation do not need documentation
This commit is contained in:
@@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.configuration.ConfigurationCategory;
|
||||
import com.jpexs.decompiler.flash.configuration.ConfigurationDirectory;
|
||||
import com.jpexs.decompiler.flash.configuration.ConfigurationFile;
|
||||
import com.jpexs.decompiler.flash.configuration.ConfigurationInternal;
|
||||
import com.jpexs.decompiler.flash.configuration.ConfigurationItem;
|
||||
import com.jpexs.decompiler.flash.gui.helpers.SpringUtilities;
|
||||
import com.jpexs.helpers.Helper;
|
||||
@@ -337,8 +338,12 @@ public class AdvancedSettingsDialog extends AppDialog {
|
||||
|
||||
if (resourceBundle.containsKey("config.name." + name)) {
|
||||
locName = resourceBundle.getString("config.name." + name);
|
||||
} else if (!name.startsWith("_")) { //must have _ prefix to be undocumented
|
||||
throw new RuntimeException("Missing configuration name: " + name);
|
||||
} else { //if it is undocumented, then it must have ConfigurationInternal annotation
|
||||
Field f = fields.get(name);
|
||||
ConfigurationInternal cint = f.getAnnotation(ConfigurationInternal.class);
|
||||
if (cint == null) {
|
||||
throw new RuntimeException("Missing configuration name: " + name);
|
||||
}
|
||||
}
|
||||
locNames.put(name, locName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user