-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
427 changed files
with
15,061 additions
and
3,569 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
plugins/kotlin/src/main/java/org/vineflower/kotlin/KotlinOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
package org.vineflower.kotlin; | ||
|
||
import org.jetbrains.java.decompiler.api.plugin.PluginOptions; | ||
import org.jetbrains.java.decompiler.main.DecompilerContext; | ||
import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences.*; | ||
|
||
import java.util.Map; | ||
|
||
public interface KotlinOptions { | ||
@Name("Show public visibility") | ||
@Description("If a construct is public, show the public keyword") | ||
@Type(Type.BOOLEAN) | ||
String SHOW_PUBLIC_VISIBILITY = "kt-show-public"; | ||
|
||
@Name("Decompile Kotlin") | ||
@Name("Enable Kotlin plugin") | ||
@Description("Decompile Kotlin classes as Kotlin instead of Java") | ||
@Type(Type.BOOLEAN) | ||
String DECOMPILE_KOTLIN = "kt-decompile-kotlin"; | ||
String DECOMPILE_KOTLIN = "kt-enable"; | ||
|
||
@Name("Unknown default arg string") | ||
@Description("String to use for unknown default arguments, or empty to not indicate unknown defaults") | ||
@Type(Type.STRING) | ||
String UNKNOWN_DEFAULT_ARG_STRING = "kt-unknown-defaults"; | ||
|
||
static void addDefaults(PluginOptions.AddDefaults cons) { | ||
cons.addDefault(SHOW_PUBLIC_VISIBILITY, "1"); | ||
cons.addDefault(DECOMPILE_KOTLIN, "1"); | ||
cons.addDefault(UNKNOWN_DEFAULT_ARG_STRING, "..."); | ||
} | ||
} |
139 changes: 41 additions & 98 deletions
139
plugins/kotlin/src/main/java/org/vineflower/kotlin/KotlinWriter.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.