diff --git a/src/main/java/com/volmit/FeatureRegistry.java b/src/main/java/com/volmit/FeatureRegistry.java index aa923f97e..d7a5f0d63 100644 --- a/src/main/java/com/volmit/FeatureRegistry.java +++ b/src/main/java/com/volmit/FeatureRegistry.java @@ -4,6 +4,7 @@ import com.volmit.mantle.MantleCodec; import com.volmit.mantle.MantleKey; import com.volmit.mantle.MantleLifetime; import com.volmit.object.ObjectGeneratorFactory; +import com.volmit.stage.StageGraph; /** Host implementation collects non-stage registrations before loading pack configuration. * Feature IDs must be unique. JSON fields must be unique per attachment target, including the @@ -20,4 +21,13 @@ public interface FeatureRegistry { void registerMantle(MantleKey key, MantleLifetime lifetime, MantleCodec codec); void registerObject(Class featureType, ObjectGeneratorFactory factory); + + /** Catalogs a settings type that no stage names in {@code when(...)}, such as one read only + * through {@link com.volmit.config.FeatureSettings#at}, so the host decodes it and studio + * describes it. Settings that a stage names are catalogued without this; registering them as + * well changes nothing. The type's feature id must be this module's id or start with it and + * {@code /}. Once registered, other modules may name the type in {@code when(...)} (see + * {@link StageGraph}). + */ + void registerSettings(Class settingsType); } diff --git a/src/main/java/com/volmit/config/OptionsMetadata.java b/src/main/java/com/volmit/config/OptionsMetadata.java index 3b4c6ec26..4274e26fe 100644 --- a/src/main/java/com/volmit/config/OptionsMetadata.java +++ b/src/main/java/com/volmit/config/OptionsMetadata.java @@ -1,5 +1,6 @@ package com.volmit.config; +import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.lang.reflect.Type; import java.util.ArrayList; @@ -12,8 +13,17 @@ public record OptionsMetadata(String description, String snippet, List