Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config entry dependencies #195

Draft
wants to merge 135 commits into
base: v8
Choose a base branch
from
Draft

Commits on Mar 1, 2023

  1. Initial dependency work

    MattSturgeon committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    c550f9f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c7f2e0a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    539b93b View commit details
    Browse the repository at this point in the history
  4. Breaking: remove colour codes from yes/no lang text

    Adding the colour formatting programmatically allows us to use the same text in contexts where we don't want colour
    MattSturgeon committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    95d7457 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2023

  1. Stub out a "hidden" option

    Not functional yet, but can be set on fields
    MattSturgeon committed Mar 4, 2023
    Configuration menu
    Copy the full SHA
    46e5754 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2023

  1. Initial hacky hiding

    The sub-category implementation is pretty clean, but for some reason the root level needed a whole separate filter, because hidden entries were being added back at the wrong index...
    MattSturgeon committed Mar 6, 2023
    Configuration menu
    Copy the full SHA
    45995d6 View commit details
    Browse the repository at this point in the history
  2. Sub-Category & List UI

    Implement disablement for lists and sub-categories
    MattSturgeon committed Mar 6, 2023
    Configuration menu
    Copy the full SHA
    6812905 View commit details
    Browse the repository at this point in the history
  3. oops

    MattSturgeon committed Mar 6, 2023
    Configuration menu
    Copy the full SHA
    9b0a8c4 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2023

  1. Introduce a "Dependency" class

    To allow for having multiple dependencies and non-boolean dependencies, lets store dependencies in the form of a class.
    
    This allows any one entry to depend on multiple other entries. **All** dependencies must be met for the entry to be enabled.
    
    A dependency can be set to "hide when disabled", if one of the unmet dependencies has this set, the entry is not shown at all.
    
    A dependency can have multiple conditions defined, if **any** condition is met the dependency is satisfied.
    MattSturgeon committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    e4d5da0 View commit details
    Browse the repository at this point in the history
  2. Comments and cleanup

    MattSturgeon committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    3104296 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2023

  1. More cleanup, Dependency constructor->generators

    Static dependency generator methods seem cleaner than having the user construct an object and then run setter methods on it.
    
    Similar UX to using builders.
    MattSturgeon committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    ea9414f View commit details
    Browse the repository at this point in the history
  2. Javadoc + cleanup

    - Move dependency generators to the base `Dependency` class.
    - Move all dependencies into the same package, to allow constructors to be package-private.
    - Add javadoc to `Dependency`'s methods.
    MattSturgeon committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    ec59e44 View commit details
    Browse the repository at this point in the history
  3. Add SelectionDependency

    `SelectionDependency` allows entries to depend on a `SelectionListEntry` being set to a particular value.
    
    Multiple condition values can also be set. If any are met the dependency is satisfied.
    
    Sub-classes such as `EnumListEntry` are also supported.
    MattSturgeon committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    901ebc4 View commit details
    Browse the repository at this point in the history
  4. Two is a plural

    MattSturgeon committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    9cca789 View commit details
    Browse the repository at this point in the history
  5. Minor optimisations & clarifications

    Also, satisfied -> met.
    MattSturgeon committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    5343bb2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1b7226f View commit details
    Browse the repository at this point in the history
  7. Autoconfig annotation implementation

    Untested, but hopefully mostly ok... Need to setup an Autoconfig demo that can be run in-game...
    
    TODO: Allow a single field to have multiple dependencies.
    
    Config fields can be annotated with `@DependsOn()` which can have the following parameters set:
    
    - `value` the i18n key of the field to be depended on
    - `hiddenWhenNotMet` whether the dependency should cause the dependent entry to become completely hidden
    - `conditions` an array of condition strings that will be parsed to the appropriate type and compared against the dependency's value.
    MattSturgeon committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    b7ed907 View commit details
    Browse the repository at this point in the history
  8. Add @DependOnEach annotation

    A wrapper annotation which contains a list of `@DependsOn` annotations. ConfigScreenProvider iterates over each DependsOn and adds multiple dependencies.
    MattSturgeon committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    4969451 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2023

  1. Make Dependency an interface

    Move most of the implementation into the abstract class `ConfigEntryDependency`
    MattSturgeon committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    ef53fed View commit details
    Browse the repository at this point in the history
  2. Replace having multiple dependencies with groups

    Instead of each config entry having a collection of dependencies, create a new special DependencyGroup that can contain multiple other dependencies.
    
    `DependencyGroup` implements `Dependency`, so it can be nested if desired. However, the annotation equivalent (`@DependsOnGroup`) cannot be nested due to annotation design limitations.
    
    In other words, Autoconfig can only have one group per field.
    
    Conditions are effectively logical operators, allowing for more advanced dependencies. E.g. `ALL` requires all dependencies be met, while `ANY` only requires one-or-more.
    MattSturgeon committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    eed9e56 View commit details
    Browse the repository at this point in the history
  3. Tweak

    MattSturgeon committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    a740fe9 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. Introduce DependencyManager

    `DependencyManager` is used to build and setup dependencies in Autoconfig.
    
    It needs to keep track of all config entries created/transformed.
    
    Made it so that GuiRegistryAccess can have a DependencyManager instance associated with it.
    MattSturgeon committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    3fba849 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2aafda3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1255a24 View commit details
    Browse the repository at this point in the history
  4. Minor cleanup

    MattSturgeon committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    4eac7a0 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2023

  1. Configuration menu
    Copy the full SHA
    44c7ebd View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary changes

    Changes were a mixture of debugging and cleanup of unrelated code.
    MattSturgeon committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    c5b0284 View commit details
    Browse the repository at this point in the history
  3. Simplify visibleChildren filter

    `DynamicEntryListWidget.visibleChildren()` can return an unmodifiable List, if the list needs to be modified, `children()` can be used directly.
    
    This means we can simply use a filtered stream to remove hidden entries, rather than creating a semi-transparent `AbstractList` implementation.
    MattSturgeon committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    8a0eddc View commit details
    Browse the repository at this point in the history
  4. Initial Autoconfig demo

    Initial basic autoconfig demo to test out the current implementation.
    
    Noticed that the `ExampleConfig` doesn't have any translation strings, so it's more a code example than a full demo as things stand currently.
    
    Also, noticed that `@TransitiveObject` having a dependency doesn't currently work as expected. Intended behaviour would probably to add the defined dependency to all children of the object.
    MattSturgeon committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    bfc87ea View commit details
    Browse the repository at this point in the history
  5. Add @dependsOn annotations to transitive children

    Allow DependencyManager to register an "override" annotation, and use this to register each child entry with its parent's annotation.
    MattSturgeon committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    fda6d1e View commit details
    Browse the repository at this point in the history
  6. TextListEntry should be visually disabled

    Like other config entries, `TextListEntry` should render `DARK_GREY` when its dependencies are not met.
    MattSturgeon committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    daee3c3 View commit details
    Browse the repository at this point in the history
  7. Minor cleanup

    MattSturgeon committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    5dbee63 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2023

  1. Better handle one->many config entries

    `GuiRegistry` often deals with a list of config entry GUIs when handling a specific field. E.g. when a `@PrefixText` is present, or when child GUIs are returned by providers/transformers such as `@TransitiveObject`.
    
    Rather than relying on the i18n key defined in `GuiRegistry`'s handlers, lets ask each GUI what it thinks its key is.
    
    Additionally, reworked how "dependency overrides" work; instead we introduce an "additional dependencies" concept.
    
    Also, made i18n prefix optional. Currently, the only optional part is the root config's i18n key.
    MattSturgeon committed Mar 18, 2023
    Configuration menu
    Copy the full SHA
    60a0272 View commit details
    Browse the repository at this point in the history
  2. registerAdditionalDependency should take an entry

    The i18n key is an internal detail of `DependencyManager`, so it makes more sense to register an additional dependency against a config entry rather than a i18n key.
    MattSturgeon committed Mar 18, 2023
    Configuration menu
    Copy the full SHA
    d4a6d10 View commit details
    Browse the repository at this point in the history
  3. Cleanup registerAdditionalDependency

    Just take a single `Collection`, rather than also trying to handle the field's annotations.
    
    The caller should simply add any field-annotations to the collection before calling.
    MattSturgeon committed Mar 18, 2023
    Configuration menu
    Copy the full SHA
    af7d34d View commit details
    Browse the repository at this point in the history
  4. Remove duplicates in combineDependencies()

    Override `Object.equals()` and `Object.hashCode()` in `DependencyGroup` and `ConfigEntryDependency` to allow comparison between different `Dependency` instances.
    
    Ensure distinct annotations are used to construct dependencies - more efficient than ensuring all constructed dependencies are distinct.
    
    Ensure no matching dependency is present when adding "single" dependencies to the groups list.
    MattSturgeon committed Mar 18, 2023
    Configuration menu
    Copy the full SHA
    67252a2 View commit details
    Browse the repository at this point in the history
  5. Move setPrefix + javadoc

    MattSturgeon committed Mar 18, 2023
    Configuration menu
    Copy the full SHA
    eb6f26e View commit details
    Browse the repository at this point in the history
  6. Refactor DependencyManager's registry

    An entry's field was being overwritten by parent fields as `DependencyManager.register()` got called multiple times.
    
    Instead of keeping track of the field, we can simplify things be maintaining a list of dependency annotations that have been registered with the entry.
    
    This also means we can get rid of the separate `additionalDependencies` map and just have a list of annotations in the main `EntryRecord`.
    
    This greatly simplifies `buildDependencies()`
    
    This fixes outer fields being unable to depend on children of their siblings.
    MattSturgeon committed Mar 18, 2023
    Configuration menu
    Copy the full SHA
    c2ee2e6 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b59baad View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2023

  1. Initial stubbing out of complex conditions

    Introduce a `Condition` class that can represent more complex conditions than simply `condition == value`. For example `NumberConditions` can check if `condition > value`.
    
    Split `ConfigEntryDependency` into Simple+Complex variants:
    
    - For `SimpleDependency`, the condition type is the same as the config entry type. E.g. `BooleanDependency`
    - For `ComplexDependency`, the condition is a `Condition` object, which relates to the same type as the config entry.
    
    We could completely remove the simple variant and instead introduce a `SimpleCondition` whose `check()` method is simply `condition.value == entry.value` if this is preferred?
    MattSturgeon committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    91b4701 View commit details
    Browse the repository at this point in the history
  2. Convert Boolean & Selection to complex

    Mostly playing with what the API would look like if all dependencies used "complex" `Condition`s, at least under the hood.
    
    Introduced `withCondition()` and `withSimpleCondition()` to try and provide low-boilerplate methods of having multiple/complex conditions.
    
    Fleshed out `Condition` a bit more, introduced `BooleanCondition` and `EnumCondition`.
    
    Reduced `SelectionDependency` in scope to only support `Enum` selections as that helped maintain type-safety with the generics.
    MattSturgeon committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    b3544c8 View commit details
    Browse the repository at this point in the history
  3. Use EnumListEntry in autoconfig

    Since `SelectionDependency`'s scope was limited to just Enums, this is required.
    
    It also improves type safety and simplifies the `@EnumHandler` provider code greatly. Since we've already checked `field.getType().isEnum()` in the predicate we can safely cast `field.getType()` to `Class<Enum<?>>`;
    MattSturgeon committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    f367b20 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b455156 View commit details
    Browse the repository at this point in the history
  5. Tweak/polish tooltips

    MattSturgeon committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    a655f77 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fcece1d View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. Configuration menu
    Copy the full SHA
    a8d39a2 View commit details
    Browse the repository at this point in the history
  2. Polish up NumberCondition

    Removed the `APPROX` operator for now, couldn't come up with a simple way to implement it generically.
    
    Defined the generic type requirement `T extends Number & Comparable<T>` for `NumberCondition` values, allowing us to safely rely on `Comparable.compareTo()` when checking the condition is met.
    
    All boxed-type numbers can be compared against other instances of the same type using `compareTo()`, which suits us perfectly.
    
    This means `fromString()` can build a `NumberCondition` for any of the basic number classes instead of always using `Double`.
    MattSturgeon committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    880e938 View commit details
    Browse the repository at this point in the history
  3. Store dependency annotations in a set

    Instead of filtering for `distinct()` annotations after the fact, it's better to store them in a `Set` to begin with.
    MattSturgeon committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    c9483ca View commit details
    Browse the repository at this point in the history
  4. Cleanup DependencyManager

    Remove usage of generic `Annotation` class, instead have methods accept separate collections of `@DependsOn` and `@DependsOnGroup` annotations.
    
    This removes a lot of runtime validations and allows us to use compile-time type checking instead.
    MattSturgeon committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    bfe6197 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. Functional NumberDependency

    Made the abstract dependency classes reference a new `ConfigEntry` interface which describes all the `AbstractConfigEntry` methods that dependencies care about.
    
    This allows for dependencies to not depend on any one specific config entry class, but instead an interface describing a set of config entry classes. For example the new `NumberConfigEntry` interface.
    
    `NumberConfigEntry` describes a `ConfigEntry` that uses a type extending `Number & Comparable`. It is implemented by both slider classes and also `AbstractNumberListEntry`.
    
    `BooleanDependency` and `EnumDependency` can still depend directly on `BooleanListEntry` and `EnumListEntry` respectively, unless you'd rather also use interfaces here to create a layer of abstraction between config entries and their dependencies...
    MattSturgeon committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    6dbc4ae View commit details
    Browse the repository at this point in the history
  2. SafeVarargs seem safe

    MattSturgeon committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    dc2a8fd View commit details
    Browse the repository at this point in the history
  3. Relative i18n references

    It is now possible to depend on other fields using a relative i18n reference.
    
    By starting the reference with a `.`, the referencing field's parent key will be inserted as a prefix.
    
    It's also possible to start a reference with multiple `.`s. For each `.`, one "generation" of parent is removed from the prefix, allowing you to reference "cousin" objects too.
    MattSturgeon committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    21a49c9 View commit details
    Browse the repository at this point in the history
  4. Fixes + cleanup

    MattSturgeon committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    ada0cfb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c01a2f2 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. Re-implement using actual boolean button text

    Add the optional ability to use the actual boolean button text (usually "Yes" or "No") instead of "enabled"/"disabled.
    MattSturgeon committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    fa27f2d View commit details
    Browse the repository at this point in the history
  2. i18n key typo

    MattSturgeon committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    f7fc913 View commit details
    Browse the repository at this point in the history
  3. DependencyBuilder

    I think dependencies are starting to get complex enough that a builder actually simplifies things.
    MattSturgeon committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    aee338f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    117774e View commit details
    Browse the repository at this point in the history
  5. Fix broken lang text

    MattSturgeon committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    1699017 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a865717 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2023

  1. Make Condition code more generic

    Have less similar code in implementing classes. Not sure if I like having internal/public versions of the same method though...
    MattSturgeon committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    778d4c2 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2023

  1. Configuration menu
    Copy the full SHA
    5507ceb View commit details
    Browse the repository at this point in the history
  2. Reorganise class packages

    Move most stuff into `impl`, group dependency and builder implementations so that dependency constructors can be package-private instead of deprecated.
    MattSturgeon committed Mar 25, 2023
    Configuration menu
    Copy the full SHA
    fa87293 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2023

  1. More comprehensive tooltip inversion

    The various `getTooltip`, `getShortDescription`, `getConditionText`, `Condition#getText()` methods can now be passed an "inverted" parameter.
    
    If "inverted" is `true`, then the generated text should be logically inverted.
    MattSturgeon committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    bcfbaa3 View commit details
    Browse the repository at this point in the history
  2. Improve group tooltips

    MattSturgeon committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    85296cb View commit details
    Browse the repository at this point in the history
  3. Hash/Equals improvements

    MattSturgeon committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    799c1ce View commit details
    Browse the repository at this point in the history
  4. Flatten group tooltips where possible

    If child groups have matching condition/inversion then we can flatten them into the parent group's tooltip.
    MattSturgeon committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    8076475 View commit details
    Browse the repository at this point in the history
  5. tweak

    MattSturgeon committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    12901b0 View commit details
    Browse the repository at this point in the history
  6. Make boolean conditions optional

    `BooleanDependencyBuilder` can handle missing conditions, they default to `true`.
    MattSturgeon committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    d457fdf View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    735a0b0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c6b0628 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2023

  1. Separate hide behaviour from Dependency interface

    Dependencies shouldn't need to know how dependent guis will behave when the dependency is met/unmet.
    
    Instead, we can define an "enable if" and a "show if" dependency on each gui.
    
    For autoconfig, we can handle that with separate annotations; `@EnableIf` and `@ShowIf` with corresponding `*Group` annotations.
    
    In `DependencyManager` we can simply map the annotation to a `DependencyRecord` and use this instead of the old `@DependsOn` annotation.
    
    In `FieldBuilder` we can split `withDependency()` into `setEnabledIf()` and `setShownIf()`.
    MattSturgeon committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    4b2d9ce View commit details
    Browse the repository at this point in the history
  2. Move condition parsing out of DependencyManager

    Each condition class should handle its parsing. `DependencyManager` should simply call the class's `fromConditionString()` method.
    MattSturgeon committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    643839b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b68d34b View commit details
    Browse the repository at this point in the history
  4. Parse relative i18n earlier

    We don't need to keep track of `baseI18n` in the record, since we can parse the relative i18n key during construction.
    
    This should also reduce the chance of getting effectively-equal duplicates.
    MattSturgeon committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    aa14f86 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    797e98b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    39d1b02 View commit details
    Browse the repository at this point in the history
  7. Move records into their own files

    Keep them package-private and `@ApiStatus.Internal`
    MattSturgeon committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    6893b6b View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2023

  1. Configuration menu
    Copy the full SHA
    4addf3b View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2023

  1. "Dynamic" matcher conditions

    Condition requires that the depended-on entry matches another entry's current value
    
    ComparatorDependency is a holdover from early in the design. It might be removed, or perhaps re-worked into a "fallback" dependency for unsupported types?
    
    Still need to re-work tooltips to properly handle dynamic matcher conditions
    MattSturgeon committed Mar 30, 2023
    Configuration menu
    Copy the full SHA
    d399713 View commit details
    Browse the repository at this point in the history
  2. Flatten using LinkedList

    Avoid copying arrays or over-allocating memory by using a linked list
    MattSturgeon committed Mar 30, 2023
    Configuration menu
    Copy the full SHA
    28995b1 View commit details
    Browse the repository at this point in the history
  3. Generalise condition building

    Introduce builder methods in the Definition records to reduce code duplication.
    MattSturgeon committed Mar 30, 2023
    Configuration menu
    Copy the full SHA
    5293b8f View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2023

  1. Let getEntry throw a runtime exception

    Instead of returning an Optional and having the caller throw the exception, centralise the throw
    MattSturgeon committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    71d08ae View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7239844 View commit details
    Browse the repository at this point in the history
  3. Allow disabling tooltips + improve generation

    Improve tooltip generation for groups and for dependencies with "dynamic" matcher conditions.
    
    Allow tooltip generation to be disabled, in-case the user wishes to define their own tooltip/label text manually.
    MattSturgeon committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    b7b7fe9 View commit details
    Browse the repository at this point in the history
  4. Stream tooltip lines instead of adding to a list

    Allow the stream api to decide on an efficient way of building an array of lines instead of appending to a list manually and then converting to an array
    MattSturgeon committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    c200159 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    801d2ce View commit details
    Browse the repository at this point in the history
  6. Fix and clean some more

    MattSturgeon committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    71be351 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0759a59 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4e96d6d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    26acecc View commit details
    Browse the repository at this point in the history
  10. Move i18n parsing into its own util

    Also apply the prefix when registering, instead of when building.
    MattSturgeon committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    72a56fd View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2023

  1. Apply prefix if lookup fails

    Rather than applying the prefix if a key doesn't start with it, apply the prefix only when a lookup fails.
    
    This may be cheaper than doing string comparison. It also removes the edge-case where a prefix may need to be repeated in a poorly chosen i18n key.
    MattSturgeon committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    4baa76d View commit details
    Browse the repository at this point in the history
  2. Move annotations to their own Dependency class

    Keep them separate from the various `GUI` annotations by introducing a `Dependency` class
    MattSturgeon committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    e9fb765 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    62eaaff View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    558aaab View commit details
    Browse the repository at this point in the history
  5. Allow depending on unsupported types

    But only for dynamic matchers (for now)
    MattSturgeon committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    0f74b16 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a29a0e2 View commit details
    Browse the repository at this point in the history
  7. Require allowGeneric being set explicitly

    We don't want generic dependencies being built accidentally. They might be useful in some edge-cases, but type-specific dependencies are better.
    MattSturgeon committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    315b8c5 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2023

  1. Fix a javadoc

    MattSturgeon committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    3f223f3 View commit details
    Browse the repository at this point in the history
  2. Improve on builder API

    MattSturgeon committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    2ac2d26 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b8de536 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4a648bf View commit details
    Browse the repository at this point in the history
  5. Remove MultiConditionDependencyBuilder

    It had become redundant and could be merged into AbstractDependencyBuilder
    MattSturgeon committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    74fd183 View commit details
    Browse the repository at this point in the history
  6. DependencyBuilder split into Start* and Finish*

    `StartDependencyBuilder` is used to start the building process and select a `ConfigEntry` to depend on.
    
    `FinishDependencyBuilder` is used to finalise the process, implementors may provide additional implementation-specific methods that only make sense for their specific type.
    
    `ConfigEntryDependencyBuilder` and `DependencyGroupBuilder` are both `FinishDependencyBuilder` implementations.
    
    Non-type specific methods (such as `generateTooltip()`) should be declared on the most generic interface. Any values set on the `StartDependencyBuilder` should be handed-over to the `FinishDependencyBuilder`.
    MattSturgeon committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    24c4781 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f4676f2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    03e5417 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6c9884c View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    47110ca View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6a0bcfe View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2023

  1. Configuration menu
    Copy the full SHA
    6d7bb67 View commit details
    Browse the repository at this point in the history
  2. Restructuring Conditions into interfaces

    Each condition type has its own interface, e.g. Comparative for numeric comparison or Equality for simple `.equals()`, `MultiCondition` for dealing with collections.
    
    Additionally, there are interfaces that control how the value is provided.
    
    - `StaticCondition` has a constant value
    - `MatcherCondition` uses the value of another `ConfigEntry`
    
    This breaks tooltip generation _again_
    MattSturgeon committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    1ba7e53 View commit details
    Browse the repository at this point in the history
  3. Stub out a MultiCondition that uses a sub-condition

    This could be used for e.g. comparative checking on numeric list entries
    MattSturgeon committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    7b93cca View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2023

  1. Fix javadoc link

    MattSturgeon committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    eaf42a2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    248e841 View commit details
    Browse the repository at this point in the history
  3. Move condition flags to autoconfig

    The underlying cloth-config implementation shouldn't need flags
    MattSturgeon committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    1c43fcb View commit details
    Browse the repository at this point in the history
  4. Apply GroupRequirement to conditions too

    If a dependency has multiple conditions it may make sense to match "all" instead of "any"...
    MattSturgeon committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    79d00a9 View commit details
    Browse the repository at this point in the history
  5. PredicateCondition interface

    Allow the predicate to take two dissimilar params, e.g. regex Pattern and String. Most of the time, both params will just be the Condition's <T>
    MattSturgeon committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    78736b1 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2023

  1. Begin reworking conditions to use builders

    Instead of implementing a whole bunch of condition implementations, lets have a single predicate-based condition and move all the complexity into various builders.
    MattSturgeon committed Apr 10, 2023
    Configuration menu
    Copy the full SHA
    11e6155 View commit details
    Browse the repository at this point in the history
  2. List condition builders

    MattSturgeon committed Apr 10, 2023
    Configuration menu
    Copy the full SHA
    59d82d0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    35e62f6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6e40871 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3badb39 View commit details
    Browse the repository at this point in the history
  6. Move tooltips to builders

    Generate tooltips and descriptions when building rather than while rendering
    MattSturgeon committed Apr 10, 2023
    Configuration menu
    Copy the full SHA
    76acbcc View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2023

  1. Configuration menu
    Copy the full SHA
    0cd835b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f600a04 View commit details
    Browse the repository at this point in the history
  3. tweak

    MattSturgeon committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    cfe05dd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8cae0b9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    10d9861 View commit details
    Browse the repository at this point in the history
  6. Improve tooltips/etc

    MattSturgeon committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    0877b00 View commit details
    Browse the repository at this point in the history
  7. DependencyBuilder should build a Dependency

    Instead of building a specific implementation of Dependency
    MattSturgeon committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    6493946 View commit details
    Browse the repository at this point in the history
  8. Remove overly-specific dependency implementations

    They are redundant now that we use builders
    MattSturgeon committed Apr 19, 2023
    Configuration menu
    Copy the full SHA
    a1e7357 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e8c936b View commit details
    Browse the repository at this point in the history

Commits on May 5, 2023

  1. More refactoring

    MattSturgeon committed May 5, 2023
    Configuration menu
    Copy the full SHA
    11a9d82 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2023

  1. Configuration menu
    Copy the full SHA
    eec25fd View commit details
    Browse the repository at this point in the history