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 asproject-jdk-namein.idea/misc.xml. Null means "do not enforce".trackMiscXml- whether.idea/misc.xmlis whitelisted (committed) by the workspace.gitignore. Defaults tofalse: 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
FieldsModifier and TypeFieldDescriptionstatic final IdeSettingsA sentinel value equivalent to theide:section being absent. -
Constructor Summary
ConstructorsConstructorDescriptionIdeSettings(String languageLevel, String jdkName, boolean trackMiscXml) Creates an instance of aIdeSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanWhether theidesection contributed any enforceable value.final inthashCode()Returns a hash code value for this object.jdkName()Returns the value of thejdkNamerecord component.Returns the value of thelanguageLevelrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thetrackMiscXmlrecord component.
-
Field Details
-
EMPTY
A sentinel value equivalent to theide:section being absent.
-
-
Constructor Details
-
IdeSettings
Creates an instance of aIdeSettingsrecord class.- Parameters:
languageLevel- the value for thelanguageLevelrecord componentjdkName- the value for thejdkNamerecord componenttrackMiscXml- the value for thetrackMiscXmlrecord component
-
-
Method Details
-
hasAnyValue
public boolean hasAnyValue()Whether theidesection contributed any enforceable value. Convenient guard for callers that want to skip IDE updates when workspace.yaml does not specify settings.- Returns:
trueif at least one field is non-null
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
languageLevel
Returns the value of thelanguageLevelrecord component.- Returns:
- the value of the
languageLevelrecord component
-
jdkName
-
trackMiscXml
public boolean trackMiscXml()Returns the value of thetrackMiscXmlrecord component.- Returns:
- the value of the
trackMiscXmlrecord component
-