Skip to content

Commit

Permalink
Add machine-readable annotation to describe dynamic default values su…
Browse files Browse the repository at this point in the history
…ch that DocGen can display a description of how that default value is computed instead of the default value used by the build agent building the documentation. (#327)

Fix description of nls Parameter (it didn't specify that it was an option and which setting caused LF vs CLRF).

Co-authored-by: Jasmine Karthikeyan <[email protected]>
  • Loading branch information
shartte and jaskarth authored Jan 21, 2024
1 parent 0462e9f commit e65c0f6
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ public interface IFernflowerPreferences {
@Description("Use \\n instead of \\r\\n for new lines. Deprecated, do not use.")
@ShortName("nls")
@Type(Type.BOOLEAN)
@DynamicDefaultValue("Disabled on Windows, enabled on other systems")
String NEW_LINE_SEPARATOR = "new-line-separator";

@Name("Indent String")
Expand Down Expand Up @@ -305,6 +306,7 @@ public interface IFernflowerPreferences {

@Name("Thread Count")
@Description("How many threads to use to decompile.")
@DynamicDefaultValue("all available processors")
@ShortName("thr")
@Type(Type.INTEGER)
String THREADS = "thread-count";
Expand Down Expand Up @@ -473,7 +475,12 @@ static Map<String, Object> getDefaults() {
public @interface Description {
String value();
}


@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface DynamicDefaultValue {
String value();
}
/**
* The "short name" of an option. This is the older syntax,
* such as {@code -dgs=1}. It is here to ensure some amount
Expand Down

0 comments on commit e65c0f6

Please sign in to comment.