Record Class IdeSettings

java.lang.Object
java.lang.Record
network.ike.workspace.IdeSettings
Record Components:
languageLevel - IntelliJ language-level enum value written to .idea/misc.xml (e.g., JDK_25, JDK_25_PREVIEW). Null means "do not enforce" — IntelliJ's detected level stands.
jdkName - IntelliJ JDK alias written as project-jdk-name in .idea/misc.xml. Null means "do not enforce".
trackMiscXml - whether .idea/misc.xml is whitelisted (committed) by the workspace .gitignore. Defaults to false: misc.xml co-mingles per-machine Maven profile selection (enabled/ disabled profiles), so it stays ignored unless a workspace opts in (IKE-Network/ike-issues#571).

public record IdeSettings(String languageLevel, String jdkName, boolean trackMiscXml) extends Record
Optional IntelliJ IDEA project settings that should be shared across collaborators via workspace.yaml.

These values drive the curated slice of .idea/ files that workspace tooling keeps in sync (see the ws:scaffold-publish goal's ScaffoldConventionReconciler). When a field is null, the corresponding IDE setting is left untouched.

Typical usage in workspace.yaml:

ide:
  language-level: JDK_25_PREVIEW
  jdk-name: "25"
  track-misc-xml: true   # optional; default false
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final IdeSettings
    A sentinel value equivalent to the ide: section being absent.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IdeSettings(String languageLevel, String jdkName, boolean trackMiscXml)
    Creates an instance of a IdeSettings record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Whether the ide section contributed any enforceable value.
    final int
    Returns a hash code value for this object.
    Returns the value of the jdkName record component.
    Returns the value of the languageLevel record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the trackMiscXml record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • EMPTY

      public static final IdeSettings EMPTY
      A sentinel value equivalent to the ide: section being absent.
  • Constructor Details

    • IdeSettings

      public IdeSettings(String languageLevel, String jdkName, boolean trackMiscXml)
      Creates an instance of a IdeSettings record class.
      Parameters:
      languageLevel - the value for the languageLevel record component
      jdkName - the value for the jdkName record component
      trackMiscXml - the value for the trackMiscXml record component
  • Method Details

    • hasAnyValue

      public boolean hasAnyValue()
      Whether the ide section contributed any enforceable value. Convenient guard for callers that want to skip IDE updates when workspace.yaml does not specify settings.
      Returns:
      true if at least one field is non-null
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • languageLevel

      public String languageLevel()
      Returns the value of the languageLevel record component.
      Returns:
      the value of the languageLevel record component
    • jdkName

      public String jdkName()
      Returns the value of the jdkName record component.
      Returns:
      the value of the jdkName record component
    • trackMiscXml

      public boolean trackMiscXml()
      Returns the value of the trackMiscXml record component.
      Returns:
      the value of the trackMiscXml record component