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.

Fix description of nls Parameter (it didn't specify that it was an option and which setting caused LF vs CLRF).
  • Loading branch information
shartte committed Nov 10, 2023
1 parent 3482e13 commit 0ca43d7
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ public interface IFernflowerPreferences {
String USER_RENAMER_CLASS = "urc";

@Name("New Line Seperator")
@Description("Character that seperates lines in the decompiled output.")
@Description("Use LF line-endings if enabled, CRLF otherwise.")
@DynamicDefaultValue("Disabled on Windows, enabled on other systems")
String NEW_LINE_SEPARATOR = "nls";

@Name("Indent String")
Expand All @@ -214,6 +215,7 @@ public interface IFernflowerPreferences {

@Name("Thread Count")
@Description("How many threads to use to decompile.")
@DynamicDefaultValue("all available processors")
String THREADS = "thr";

String DUMP_ORIGINAL_LINES = "__dump_original_lines__";
Expand Down Expand Up @@ -347,4 +349,10 @@ static Map<String, Object> getDefaults() {
public @interface Description {
String value();
}

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface DynamicDefaultValue {
String value();
}
}

0 comments on commit 0ca43d7

Please sign in to comment.