diff --git a/CHANGES.md b/CHANGES.md index c9a2d9750..39cd64fc3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ We'll only be cataloguing major changes, since there are countless bug fixes to - added multiplayer support - reworked gradle setup +- changed package from `cuchaz.enigma` to `org.quiltmc.enigma` ### enigma diff --git a/README.md b/README.md index f06710851..24afc1b68 100644 --- a/README.md +++ b/README.md @@ -26,4 +26,4 @@ Pre-compiled jars can be found on the [Quilt maven](https://maven.quiltmc.org/re ### On the command line -`java -cp enigma.jar cuchaz.enigma.command.Main` +`java -cp enigma.jar org.quiltmc.enigma.command.Main` diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 655a34ad2..4fe0f2abb 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -51,7 +51,7 @@ - + diff --git a/enigma-cli/build.gradle b/enigma-cli/build.gradle index 231cac986..c45ce1dc6 100644 --- a/enigma-cli/build.gradle +++ b/enigma-cli/build.gradle @@ -9,7 +9,7 @@ dependencies { testImplementation(testFixtures(project(':enigma'))) } -mainClassName = 'cuchaz.enigma.command.Main' +mainClassName = 'org.quiltmc.enigma.command.Main' jar.manifest.attributes 'Main-Class': mainClassName diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/Argument.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/Argument.java similarity index 98% rename from enigma-cli/src/main/java/cuchaz/enigma/command/Argument.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/Argument.java index c6986ad46..11ab1c9a0 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/Argument.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/Argument.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; public enum Argument { INPUT_JAR("", diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/CheckMappingsCommand.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/CheckMappingsCommand.java similarity index 89% rename from enigma-cli/src/main/java/cuchaz/enigma/command/CheckMappingsCommand.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/CheckMappingsCommand.java index 8c06b1cdd..3dbee781b 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/CheckMappingsCommand.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/CheckMappingsCommand.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import org.tinylog.Logger; import java.nio.file.Path; diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/Command.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/Command.java similarity index 90% rename from enigma-cli/src/main/java/cuchaz/enigma/command/Command.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/Command.java index e02c1b028..3590c8cca 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/Command.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/Command.java @@ -1,20 +1,20 @@ -package cuchaz.enigma.command; - -import cuchaz.enigma.Enigma; -import cuchaz.enigma.EnigmaProfile; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.api.EnigmaPlugin; -import cuchaz.enigma.classprovider.CachingClassProvider; -import cuchaz.enigma.classprovider.ClasspathClassProvider; -import cuchaz.enigma.classprovider.JarClassProvider; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.MappingDelta; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.mapping.tree.DeltaTrackingTree; -import cuchaz.enigma.translation.mapping.tree.EntryTree; +package org.quiltmc.enigma.command; + +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.EnigmaProfile; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.api.EnigmaPlugin; +import org.quiltmc.enigma.classprovider.CachingClassProvider; +import org.quiltmc.enigma.classprovider.ClasspathClassProvider; +import org.quiltmc.enigma.classprovider.JarClassProvider; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.MappingDelta; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.tree.DeltaTrackingTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; import org.tinylog.Logger; import java.io.BufferedWriter; diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/ComposeMappingsCommand.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/ComposeMappingsCommand.java similarity index 74% rename from enigma-cli/src/main/java/cuchaz/enigma/command/ComposeMappingsCommand.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/ComposeMappingsCommand.java index f5e6c6644..7e858d48b 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/ComposeMappingsCommand.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/ComposeMappingsCommand.java @@ -1,15 +1,15 @@ -package cuchaz.enigma.command; - -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.MappingOperations; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.serde.MappingFileNameFormat; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.serde.MappingsWriter; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.utils.Utils; +package org.quiltmc.enigma.command; + +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.MappingOperations; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.serde.MappingFileNameFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.serde.MappingsWriter; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.util.Utils; import java.io.IOException; import java.nio.file.Path; diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/ComposedArgument.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/ComposedArgument.java similarity index 66% rename from enigma-cli/src/main/java/cuchaz/enigma/command/ComposedArgument.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/ComposedArgument.java index a5cc68825..61cac1962 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/ComposedArgument.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/ComposedArgument.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; public record ComposedArgument(Argument argument, boolean optional) { } diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/ConvertMappingsCommand.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/ConvertMappingsCommand.java similarity index 67% rename from enigma-cli/src/main/java/cuchaz/enigma/command/ConvertMappingsCommand.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/ConvertMappingsCommand.java index 05064e0c6..567a6237c 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/ConvertMappingsCommand.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/ConvertMappingsCommand.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.command; - -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.serde.MappingFileNameFormat; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.serde.MappingsWriter; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.utils.Utils; +package org.quiltmc.enigma.command; + +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.serde.MappingFileNameFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.serde.MappingsWriter; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.util.Utils; import java.io.IOException; import java.nio.file.Path; diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/DecompileCommand.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/DecompileCommand.java similarity index 85% rename from enigma-cli/src/main/java/cuchaz/enigma/command/DecompileCommand.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/DecompileCommand.java index ba3c3000a..1d5e577cc 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/DecompileCommand.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/DecompileCommand.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.EnigmaProject.DecompileErrorStrategy; -import cuchaz.enigma.source.DecompilerService; -import cuchaz.enigma.source.Decompilers; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.EnigmaProject.DecompileErrorStrategy; +import org.quiltmc.enigma.source.DecompilerService; +import org.quiltmc.enigma.source.Decompilers; import org.tinylog.Logger; import java.lang.reflect.Field; diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/DeobfuscateCommand.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/DeobfuscateCommand.java similarity index 89% rename from enigma-cli/src/main/java/cuchaz/enigma/command/DeobfuscateCommand.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/DeobfuscateCommand.java index 3371935a3..8a32accec 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/DeobfuscateCommand.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/DeobfuscateCommand.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.ProgressListener; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.ProgressListener; import java.nio.file.Path; diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/DropInvalidMappingsCommand.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/DropInvalidMappingsCommand.java similarity index 89% rename from enigma-cli/src/main/java/cuchaz/enigma/command/DropInvalidMappingsCommand.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/DropInvalidMappingsCommand.java index b3bba1aaa..2331d83c3 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/DropInvalidMappingsCommand.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/DropInvalidMappingsCommand.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; import org.tinylog.Logger; import java.io.IOException; diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/FillClassMappingsCommand.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/FillClassMappingsCommand.java similarity index 82% rename from enigma-cli/src/main/java/cuchaz/enigma/command/FillClassMappingsCommand.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/FillClassMappingsCommand.java index af53ade4a..d84055ed1 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/FillClassMappingsCommand.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/FillClassMappingsCommand.java @@ -1,18 +1,18 @@ -package cuchaz.enigma.command; - -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.serde.MappingFileNameFormat; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.serde.MappingsWriter; -import cuchaz.enigma.translation.mapping.tree.DeltaTrackingTree; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.EntryTreeNode; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.ParentedEntry; -import cuchaz.enigma.utils.Utils; +package org.quiltmc.enigma.command; + +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.serde.MappingFileNameFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.serde.MappingsWriter; +import org.quiltmc.enigma.translation.mapping.tree.DeltaTrackingTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTreeNode; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.ParentedEntry; +import org.quiltmc.enigma.util.Utils; import org.tinylog.Logger; import java.nio.file.Path; diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/HelpCommand.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/HelpCommand.java similarity index 96% rename from enigma-cli/src/main/java/cuchaz/enigma/command/HelpCommand.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/HelpCommand.java index 91ef08e64..3f34e1d12 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/HelpCommand.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/HelpCommand.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; import org.tinylog.Logger; diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/InsertProposedMappingsCommand.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/InsertProposedMappingsCommand.java similarity index 76% rename from enigma-cli/src/main/java/cuchaz/enigma/command/InsertProposedMappingsCommand.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/InsertProposedMappingsCommand.java index 4d1b731da..942fd276a 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/InsertProposedMappingsCommand.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/InsertProposedMappingsCommand.java @@ -1,28 +1,28 @@ -package cuchaz.enigma.command; - -import cuchaz.enigma.Enigma; -import cuchaz.enigma.EnigmaProfile; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.analysis.index.EntryIndex; -import cuchaz.enigma.api.EnigmaPlugin; -import cuchaz.enigma.api.service.NameProposalService; -import cuchaz.enigma.translation.ProposingTranslator; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.serde.MappingsWriter; -import cuchaz.enigma.translation.mapping.tree.DeltaTrackingTree; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.Utils; +package org.quiltmc.enigma.command; + +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.EnigmaProfile; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.analysis.index.EntryIndex; +import org.quiltmc.enigma.api.EnigmaPlugin; +import org.quiltmc.enigma.api.service.NameProposalService; +import org.quiltmc.enigma.translation.ProposingTranslator; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.serde.MappingsWriter; +import org.quiltmc.enigma.translation.mapping.tree.DeltaTrackingTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.Utils; import org.tinylog.Logger; import java.nio.file.Path; diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/InvertMappingsCommand.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/InvertMappingsCommand.java similarity index 68% rename from enigma-cli/src/main/java/cuchaz/enigma/command/InvertMappingsCommand.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/InvertMappingsCommand.java index 1944f8af6..988a81e07 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/InvertMappingsCommand.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/InvertMappingsCommand.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.command; - -import cuchaz.enigma.translation.mapping.MappingOperations; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.serde.MappingFileNameFormat; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.serde.MappingsWriter; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.utils.Utils; +package org.quiltmc.enigma.command; + +import org.quiltmc.enigma.translation.mapping.MappingOperations; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.serde.MappingFileNameFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.serde.MappingsWriter; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.util.Utils; import java.io.IOException; import java.nio.file.Path; diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/Main.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/Main.java similarity index 96% rename from enigma-cli/src/main/java/cuchaz/enigma/command/Main.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/Main.java index 8a4bddbe3..8461af951 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/Main.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/Main.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; -import cuchaz.enigma.Enigma; +import org.quiltmc.enigma.Enigma; import org.tinylog.Logger; import java.util.LinkedHashMap; @@ -61,7 +61,7 @@ private static void printHelp() { StringBuilder help = new StringBuilder(); help.append(""" Usage: - \tjava -cp enigma.jar cuchaz.enigma.command.CommandMain + \tjava -cp enigma.jar org.quiltmc.enigma.command.CommandMain \twhere is one of:"""); for (Command command : COMMANDS.values()) { diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/MapSpecializedMethodsCommand.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/MapSpecializedMethodsCommand.java similarity index 72% rename from enigma-cli/src/main/java/cuchaz/enigma/command/MapSpecializedMethodsCommand.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/MapSpecializedMethodsCommand.java index 308cb71d1..33f84b1da 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/MapSpecializedMethodsCommand.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/MapSpecializedMethodsCommand.java @@ -1,21 +1,21 @@ -package cuchaz.enigma.command; - -import cuchaz.enigma.analysis.index.BridgeMethodIndex; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.translation.MappingTranslator; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.serde.MappingFileNameFormat; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.serde.MappingsWriter; -import cuchaz.enigma.translation.mapping.tree.DeltaTrackingTree; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.EntryTreeNode; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.Utils; +package org.quiltmc.enigma.command; + +import org.quiltmc.enigma.analysis.index.BridgeMethodIndex; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.translation.MappingTranslator; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.serde.MappingFileNameFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.serde.MappingsWriter; +import org.quiltmc.enigma.translation.mapping.tree.DeltaTrackingTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTreeNode; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.Utils; import java.io.IOException; import java.nio.file.Path; diff --git a/enigma-cli/src/main/java/cuchaz/enigma/command/MappingCommandsUtil.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/MappingCommandsUtil.java similarity index 73% rename from enigma-cli/src/main/java/cuchaz/enigma/command/MappingCommandsUtil.java rename to enigma-cli/src/main/java/org/quiltmc/enigma/command/MappingCommandsUtil.java index b2d79dd26..9818c4954 100644 --- a/enigma-cli/src/main/java/cuchaz/enigma/command/MappingCommandsUtil.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/MappingCommandsUtil.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.mapping.serde.MappingsWriter; -import cuchaz.enigma.translation.mapping.serde.tinyv2.TinyV2Writer; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingsWriter; +import org.quiltmc.enigma.translation.mapping.serde.tinyv2.TinyV2Writer; public final class MappingCommandsUtil { private MappingCommandsUtil() { diff --git a/enigma-cli/src/test/java/cuchaz/enigma/command/CheckMappingsCommandTest.java b/enigma-cli/src/test/java/org/quiltmc/enigma/command/CheckMappingsCommandTest.java similarity index 81% rename from enigma-cli/src/test/java/cuchaz/enigma/command/CheckMappingsCommandTest.java rename to enigma-cli/src/test/java/org/quiltmc/enigma/command/CheckMappingsCommandTest.java index 3a4956897..a013babe2 100644 --- a/enigma-cli/src/test/java/cuchaz/enigma/command/CheckMappingsCommandTest.java +++ b/enigma-cli/src/test/java/org/quiltmc/enigma/command/CheckMappingsCommandTest.java @@ -1,13 +1,13 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; -import cuchaz.enigma.TestUtil; +import org.quiltmc.enigma.TestUtil; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import java.nio.file.Path; public class CheckMappingsCommandTest extends CommandTest { - private static final Path JAR = TestUtil.obfJar("packageAccess"); + private static final Path JAR = TestUtil.obfJar("package_access"); private static final Path WRONG_MAPPINGS = getResource("/packageAccess/wrongMappings"); private static final Path CORRECT_MAPPINGS = getResource("/packageAccess/correctMappings"); diff --git a/enigma-cli/src/test/java/cuchaz/enigma/command/CommandTest.java b/enigma-cli/src/test/java/org/quiltmc/enigma/command/CommandTest.java similarity index 71% rename from enigma-cli/src/test/java/cuchaz/enigma/command/CommandTest.java rename to enigma-cli/src/test/java/org/quiltmc/enigma/command/CommandTest.java index 7372f7b48..c55616f6c 100644 --- a/enigma-cli/src/test/java/cuchaz/enigma/command/CommandTest.java +++ b/enigma-cli/src/test/java/org/quiltmc/enigma/command/CommandTest.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.representation.entry.Entry; import java.net.URISyntaxException; import java.nio.file.Path; diff --git a/enigma-cli/src/test/java/cuchaz/enigma/command/FillClassMappingsCommandTest.java b/enigma-cli/src/test/java/org/quiltmc/enigma/command/FillClassMappingsCommandTest.java similarity index 87% rename from enigma-cli/src/test/java/cuchaz/enigma/command/FillClassMappingsCommandTest.java rename to enigma-cli/src/test/java/org/quiltmc/enigma/command/FillClassMappingsCommandTest.java index 349122217..bdb22d49b 100644 --- a/enigma-cli/src/test/java/cuchaz/enigma/command/FillClassMappingsCommandTest.java +++ b/enigma-cli/src/test/java/org/quiltmc/enigma/command/FillClassMappingsCommandTest.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; -import cuchaz.enigma.TestUtil; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.TestUtil; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import org.junit.jupiter.api.Test; import java.nio.file.Files; @@ -17,7 +17,7 @@ import static org.junit.jupiter.api.Assertions.assertNull; public class FillClassMappingsCommandTest extends CommandTest { - private static final Path JAR = TestUtil.obfJar("innerClasses"); + private static final Path JAR = TestUtil.obfJar("inner_classes"); private static final Path MAPPINGS = getResource("/fillClassMappings/"); private static final ClassEntry A = new ClassEntry("a"); diff --git a/enigma-cli/src/test/java/cuchaz/enigma/command/MapSpecializedMethodsCommandTest.java b/enigma-cli/src/test/java/org/quiltmc/enigma/command/MapSpecializedMethodsCommandTest.java similarity index 92% rename from enigma-cli/src/test/java/cuchaz/enigma/command/MapSpecializedMethodsCommandTest.java rename to enigma-cli/src/test/java/org/quiltmc/enigma/command/MapSpecializedMethodsCommandTest.java index c832a36cc..dcf3d2630 100644 --- a/enigma-cli/src/test/java/cuchaz/enigma/command/MapSpecializedMethodsCommandTest.java +++ b/enigma-cli/src/test/java/org/quiltmc/enigma/command/MapSpecializedMethodsCommandTest.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.command; +package org.quiltmc.enigma.command; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.TestUtil; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.TestUtil; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import org.junit.jupiter.api.Test; import java.nio.file.Files; diff --git a/enigma-server/build.gradle b/enigma-server/build.gradle index 6efd4ab59..ca4df4023 100644 --- a/enigma-server/build.gradle +++ b/enigma-server/build.gradle @@ -9,7 +9,7 @@ dependencies { implementation libs.jopt } -mainClassName = 'cuchaz.enigma.network.DedicatedEnigmaServer' +mainClassName = 'org.quiltmc.enigma.network.DedicatedEnigmaServer' jar.manifest.attributes 'Main-Class': mainClassName diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/ClientPacketHandler.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/ClientPacketHandler.java similarity index 57% rename from enigma-server/src/main/java/cuchaz/enigma/network/ClientPacketHandler.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/ClientPacketHandler.java index 61fca8c2d..b35c68131 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/ClientPacketHandler.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/ClientPacketHandler.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.network; +package org.quiltmc.enigma.network; -import cuchaz.enigma.translation.mapping.EntryChange; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.network.packet.Packet; +import org.quiltmc.enigma.translation.mapping.EntryChange; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.network.packet.Packet; import java.util.List; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/DedicatedEnigmaServer.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/DedicatedEnigmaServer.java similarity index 90% rename from enigma-server/src/main/java/cuchaz/enigma/network/DedicatedEnigmaServer.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/DedicatedEnigmaServer.java index a7ab9524f..52eade431 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/DedicatedEnigmaServer.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/DedicatedEnigmaServer.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.network; - -import cuchaz.enigma.Enigma; -import cuchaz.enigma.EnigmaProfile; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.classprovider.ClasspathClassProvider; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.utils.Utils; +package org.quiltmc.enigma.network; + +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.EnigmaProfile; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.classprovider.ClasspathClassProvider; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.util.Utils; import joptsimple.OptionParser; import joptsimple.OptionSet; import joptsimple.OptionSpec; @@ -80,7 +80,7 @@ public static void main(String[] args) { OptionSpec portOpt = parser.accepts("port", "Port to run the server on") .withOptionalArg() .ofType(Integer.class) - .defaultsTo(EnigmaServer.DEFAULT_PORT); + .defaultsTo(DEFAULT_PORT); OptionSpec passwordOpt = parser.accepts("password", "The password to join the server") .withRequiredArg() @@ -97,8 +97,8 @@ public static void main(String[] args) { Path profileFile = parsedArgs.valueOf(profileOpt); int port = parsedArgs.valueOf(portOpt); char[] password = parsedArgs.valueOf(passwordOpt).toCharArray(); - if (password.length > EnigmaServer.MAX_PASSWORD_LENGTH) { - Logger.error("Password too long, must be at most {} characters", EnigmaServer.MAX_PASSWORD_LENGTH); + if (password.length > MAX_PASSWORD_LENGTH) { + Logger.error("Password too long, must be at most {} characters", MAX_PASSWORD_LENGTH); System.exit(1); } diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/EnigmaClient.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/EnigmaClient.java similarity index 93% rename from enigma-server/src/main/java/cuchaz/enigma/network/EnigmaClient.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/EnigmaClient.java index 65dbf06e5..3012af3e4 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/EnigmaClient.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/EnigmaClient.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.network; +package org.quiltmc.enigma.network; -import cuchaz.enigma.network.packet.Packet; -import cuchaz.enigma.network.packet.PacketRegistry; +import org.quiltmc.enigma.network.packet.Packet; +import org.quiltmc.enigma.network.packet.PacketRegistry; import org.tinylog.Logger; import javax.swing.SwingUtilities; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/EnigmaServer.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/EnigmaServer.java similarity index 92% rename from enigma-server/src/main/java/cuchaz/enigma/network/EnigmaServer.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/EnigmaServer.java index 5c2876e29..08960b0ca 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/EnigmaServer.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/EnigmaServer.java @@ -1,15 +1,15 @@ -package cuchaz.enigma.network; - -import cuchaz.enigma.network.packet.EntryChangeS2CPacket; -import cuchaz.enigma.network.packet.KickS2CPacket; -import cuchaz.enigma.network.packet.MessageS2CPacket; -import cuchaz.enigma.network.packet.Packet; -import cuchaz.enigma.network.packet.PacketRegistry; -import cuchaz.enigma.network.packet.UserListS2CPacket; -import cuchaz.enigma.translation.mapping.EntryChange; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.representation.entry.Entry; +package org.quiltmc.enigma.network; + +import org.quiltmc.enigma.network.packet.EntryChangeS2CPacket; +import org.quiltmc.enigma.network.packet.KickS2CPacket; +import org.quiltmc.enigma.network.packet.MessageS2CPacket; +import org.quiltmc.enigma.network.packet.Packet; +import org.quiltmc.enigma.network.packet.PacketRegistry; +import org.quiltmc.enigma.network.packet.UserListS2CPacket; +import org.quiltmc.enigma.translation.mapping.EntryChange; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.representation.entry.Entry; import org.tinylog.Logger; import java.io.DataInput; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/IntegratedEnigmaServer.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/IntegratedEnigmaServer.java similarity index 78% rename from enigma-server/src/main/java/cuchaz/enigma/network/IntegratedEnigmaServer.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/IntegratedEnigmaServer.java index 1ba0c53b7..1d17a9c45 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/IntegratedEnigmaServer.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/IntegratedEnigmaServer.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.network; +package org.quiltmc.enigma.network; -import cuchaz.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; import javax.swing.SwingUtilities; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/ServerAddress.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/ServerAddress.java similarity index 98% rename from enigma-server/src/main/java/cuchaz/enigma/network/ServerAddress.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/ServerAddress.java index c0623238b..0f07b2daa 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/ServerAddress.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/ServerAddress.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.network; +package org.quiltmc.enigma.network; import java.util.Objects; import javax.annotation.Nullable; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/ServerMessage.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/ServerMessage.java similarity index 97% rename from enigma-server/src/main/java/cuchaz/enigma/network/ServerMessage.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/ServerMessage.java index 1bf42f807..65f6d9f9d 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/ServerMessage.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/ServerMessage.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.network; +package org.quiltmc.enigma.network; -import cuchaz.enigma.network.packet.PacketHelper; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.network.packet.PacketHelper; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.util.I18n; import java.io.DataInput; import java.io.DataOutput; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/ServerPacketHandler.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/ServerPacketHandler.java similarity index 73% rename from enigma-server/src/main/java/cuchaz/enigma/network/ServerPacketHandler.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/ServerPacketHandler.java index 8a52ffae9..aa8ffa21b 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/ServerPacketHandler.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/ServerPacketHandler.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.network; +package org.quiltmc.enigma.network; import java.net.Socket; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/packet/ConfirmChangeC2SPacket.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/ConfirmChangeC2SPacket.java similarity index 86% rename from enigma-server/src/main/java/cuchaz/enigma/network/packet/ConfirmChangeC2SPacket.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/packet/ConfirmChangeC2SPacket.java index 4a91e06e4..f2a5e1297 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/packet/ConfirmChangeC2SPacket.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/ConfirmChangeC2SPacket.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.network.packet; +package org.quiltmc.enigma.network.packet; -import cuchaz.enigma.network.ServerPacketHandler; +import org.quiltmc.enigma.network.ServerPacketHandler; import java.io.DataInput; import java.io.DataOutput; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/packet/EntryChangeC2SPacket.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/EntryChangeC2SPacket.java similarity index 84% rename from enigma-server/src/main/java/cuchaz/enigma/network/packet/EntryChangeC2SPacket.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/packet/EntryChangeC2SPacket.java index f2ed5c36f..4184b7d47 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/packet/EntryChangeC2SPacket.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/EntryChangeC2SPacket.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.network.packet; +package org.quiltmc.enigma.network.packet; -import cuchaz.enigma.network.ServerMessage; -import cuchaz.enigma.network.ServerPacketHandler; -import cuchaz.enigma.translation.mapping.EntryChange; -import cuchaz.enigma.translation.mapping.EntryUtil; -import cuchaz.enigma.utils.validation.ValidationContext; +import org.quiltmc.enigma.network.ServerMessage; +import org.quiltmc.enigma.network.ServerPacketHandler; +import org.quiltmc.enigma.translation.mapping.EntryChange; +import org.quiltmc.enigma.translation.mapping.EntryUtil; +import org.quiltmc.enigma.util.validation.ValidationContext; import java.io.DataInput; import java.io.DataOutput; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/packet/EntryChangeS2CPacket.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/EntryChangeS2CPacket.java similarity index 84% rename from enigma-server/src/main/java/cuchaz/enigma/network/packet/EntryChangeS2CPacket.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/packet/EntryChangeS2CPacket.java index e25f454f4..9dafc063f 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/packet/EntryChangeS2CPacket.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/EntryChangeS2CPacket.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.network.packet; +package org.quiltmc.enigma.network.packet; -import cuchaz.enigma.network.ClientPacketHandler; -import cuchaz.enigma.translation.mapping.EntryChange; +import org.quiltmc.enigma.network.ClientPacketHandler; +import org.quiltmc.enigma.translation.mapping.EntryChange; import java.io.DataInput; import java.io.DataOutput; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/packet/KickS2CPacket.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/KickS2CPacket.java similarity index 86% rename from enigma-server/src/main/java/cuchaz/enigma/network/packet/KickS2CPacket.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/packet/KickS2CPacket.java index 163a92ff1..ac29e545b 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/packet/KickS2CPacket.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/KickS2CPacket.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.network.packet; +package org.quiltmc.enigma.network.packet; -import cuchaz.enigma.network.ClientPacketHandler; +import org.quiltmc.enigma.network.ClientPacketHandler; import java.io.DataInput; import java.io.DataOutput; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/packet/LoginC2SPacket.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/LoginC2SPacket.java similarity index 91% rename from enigma-server/src/main/java/cuchaz/enigma/network/packet/LoginC2SPacket.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/packet/LoginC2SPacket.java index 38f6ce6be..c9ddfab1a 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/packet/LoginC2SPacket.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/LoginC2SPacket.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.network.packet; +package org.quiltmc.enigma.network.packet; -import cuchaz.enigma.network.EnigmaServer; -import cuchaz.enigma.network.ServerPacketHandler; -import cuchaz.enigma.network.ServerMessage; +import org.quiltmc.enigma.network.EnigmaServer; +import org.quiltmc.enigma.network.ServerPacketHandler; +import org.quiltmc.enigma.network.ServerMessage; import java.io.DataInput; import java.io.DataOutput; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/packet/MessageC2SPacket.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/MessageC2SPacket.java similarity index 84% rename from enigma-server/src/main/java/cuchaz/enigma/network/packet/MessageC2SPacket.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/packet/MessageC2SPacket.java index a01204030..26320f0ad 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/packet/MessageC2SPacket.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/MessageC2SPacket.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.network.packet; +package org.quiltmc.enigma.network.packet; -import cuchaz.enigma.network.ServerPacketHandler; -import cuchaz.enigma.network.ServerMessage; +import org.quiltmc.enigma.network.ServerPacketHandler; +import org.quiltmc.enigma.network.ServerMessage; import java.io.DataInput; import java.io.DataOutput; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/packet/MessageS2CPacket.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/MessageS2CPacket.java similarity index 80% rename from enigma-server/src/main/java/cuchaz/enigma/network/packet/MessageS2CPacket.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/packet/MessageS2CPacket.java index d689e40b1..8fb29a852 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/packet/MessageS2CPacket.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/MessageS2CPacket.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.network.packet; +package org.quiltmc.enigma.network.packet; -import cuchaz.enigma.network.ClientPacketHandler; -import cuchaz.enigma.network.ServerMessage; +import org.quiltmc.enigma.network.ClientPacketHandler; +import org.quiltmc.enigma.network.ServerMessage; import java.io.DataInput; import java.io.DataOutput; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/packet/Packet.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/Packet.java similarity index 84% rename from enigma-server/src/main/java/cuchaz/enigma/network/packet/Packet.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/packet/Packet.java index 15054e7b3..91f066645 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/packet/Packet.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/Packet.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.network.packet; +package org.quiltmc.enigma.network.packet; import java.io.DataInput; import java.io.DataOutput; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/packet/PacketHelper.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/PacketHelper.java similarity index 89% rename from enigma-server/src/main/java/cuchaz/enigma/network/packet/PacketHelper.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/packet/PacketHelper.java index 126a4e264..167b76f8a 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/packet/PacketHelper.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/PacketHelper.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.network.packet; - -import cuchaz.enigma.translation.mapping.EntryChange; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.TristateChange; +package org.quiltmc.enigma.network.packet; + +import org.quiltmc.enigma.translation.mapping.EntryChange; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.TristateChange; import java.io.DataInput; import java.io.DataOutput; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/packet/PacketRegistry.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/PacketRegistry.java similarity index 93% rename from enigma-server/src/main/java/cuchaz/enigma/network/packet/PacketRegistry.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/packet/PacketRegistry.java index 4d462b7c1..c5ad89a21 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/packet/PacketRegistry.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/PacketRegistry.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.network.packet; +package org.quiltmc.enigma.network.packet; -import cuchaz.enigma.network.ClientPacketHandler; -import cuchaz.enigma.network.ServerPacketHandler; +import org.quiltmc.enigma.network.ClientPacketHandler; +import org.quiltmc.enigma.network.ServerPacketHandler; import java.util.HashMap; import java.util.Map; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/packet/SyncMappingsS2CPacket.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/SyncMappingsS2CPacket.java similarity index 82% rename from enigma-server/src/main/java/cuchaz/enigma/network/packet/SyncMappingsS2CPacket.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/packet/SyncMappingsS2CPacket.java index 45f0d0603..7a929b8e2 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/packet/SyncMappingsS2CPacket.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/SyncMappingsS2CPacket.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.network.packet; +package org.quiltmc.enigma.network.packet; -import cuchaz.enigma.network.ClientPacketHandler; -import cuchaz.enigma.network.EnigmaServer; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.EntryTreeNode; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.network.ClientPacketHandler; +import org.quiltmc.enigma.network.EnigmaServer; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTreeNode; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.entry.Entry; import java.io.DataInput; import java.io.DataOutput; diff --git a/enigma-server/src/main/java/cuchaz/enigma/network/packet/UserListS2CPacket.java b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/UserListS2CPacket.java similarity index 89% rename from enigma-server/src/main/java/cuchaz/enigma/network/packet/UserListS2CPacket.java rename to enigma-server/src/main/java/org/quiltmc/enigma/network/packet/UserListS2CPacket.java index 2536bce89..3308a96cc 100644 --- a/enigma-server/src/main/java/cuchaz/enigma/network/packet/UserListS2CPacket.java +++ b/enigma-server/src/main/java/org/quiltmc/enigma/network/packet/UserListS2CPacket.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.network.packet; +package org.quiltmc.enigma.network.packet; -import cuchaz.enigma.network.ClientPacketHandler; +import org.quiltmc.enigma.network.ClientPacketHandler; import java.io.DataInput; import java.io.DataOutput; diff --git a/enigma-server/src/test/java/cuchaz/enigma/network/ServerAddressTest.java b/enigma-server/src/test/java/org/quiltmc/enigma/network/ServerAddressTest.java similarity index 96% rename from enigma-server/src/test/java/cuchaz/enigma/network/ServerAddressTest.java rename to enigma-server/src/test/java/org/quiltmc/enigma/network/ServerAddressTest.java index 41c4933c5..1ad3dbb74 100644 --- a/enigma-server/src/test/java/cuchaz/enigma/network/ServerAddressTest.java +++ b/enigma-server/src/test/java/org/quiltmc/enigma/network/ServerAddressTest.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.network; +package org.quiltmc.enigma.network; import org.junit.jupiter.api.Test; diff --git a/enigma-swing/build.gradle b/enigma-swing/build.gradle index bab65dba4..e0e50e9a6 100644 --- a/enigma-swing/build.gradle +++ b/enigma-swing/build.gradle @@ -18,14 +18,30 @@ dependencies { testImplementation(testFixtures(project(':enigma'))) } -mainClassName = 'cuchaz.enigma.gui.Main' +mainClassName = 'org.quiltmc.enigma.gui.Main' jar.manifest.attributes 'Main-Class': mainClassName +static String convertToGradleTaskName(String name) { + String newName = new String(name); + + for (int i = 0; i < name.length(); i++) { + if (name.charAt(i) == '_') { + var toReplace = '_' + name.charAt(i + 1) + var newChar = name.charAt(i + 1).toUpperCase().toString() + newName = newName.replace(toReplace, newChar) + } + } + + return newName +} + def registerTestTask(String name) { - tasks.register("${name}TestGui", JavaExec.class) { + String taskName = convertToGradleTaskName(name); + + tasks.register("${taskName}TestGui", JavaExec.class) { group("test") - dependsOn(":enigma:${name}TestObf") + dependsOn(":enigma:${taskName}TestObf") mainClass = mainClassName classpath = sourceSets.main.runtimeClasspath @@ -38,7 +54,7 @@ def registerTestTask(String name) { } } -project(":enigma").file("src/test/java/cuchaz/enigma/inputs").listFiles().each { +project(":enigma").file("src/test/java/org/quiltmc/enigma/input").listFiles().each { if (it.directory) { registerTestTask(it.name) } diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/events/EditorActionListener.java b/enigma-swing/src/main/java/cuchaz/enigma/gui/events/EditorActionListener.java deleted file mode 100644 index 1651abf01..000000000 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/events/EditorActionListener.java +++ /dev/null @@ -1,18 +0,0 @@ -package cuchaz.enigma.gui.events; - -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.classhandle.ClassHandle; -import cuchaz.enigma.gui.panels.EditorPanel; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; - -public interface EditorActionListener { - default void onCursorReferenceChanged(EditorPanel editor, EntryReference, Entry> ref) { - } - - default void onClassHandleChanged(EditorPanel editor, ClassEntry old, ClassHandle ch) { - } - - default void onTitleChanged(EditorPanel editor, String title) { - } -} diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/events/ThemeChangeListener.java b/enigma-swing/src/main/java/cuchaz/enigma/gui/events/ThemeChangeListener.java deleted file mode 100644 index 383e1aad0..000000000 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/events/ThemeChangeListener.java +++ /dev/null @@ -1,11 +0,0 @@ -package cuchaz.enigma.gui.events; - -import cuchaz.enigma.gui.config.LookAndFeel; -import cuchaz.enigma.gui.highlight.BoxHighlightPainter; -import cuchaz.enigma.source.RenamableTokenType; - -import java.util.Map; - -public interface ThemeChangeListener { - void onThemeChanged(LookAndFeel lookAndFeel, Map boxHighlightPainters); -} diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/BrowserCaret.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/BrowserCaret.java similarity index 87% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/BrowserCaret.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/BrowserCaret.java index 4b1754b52..5380128db 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/BrowserCaret.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/BrowserCaret.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui; +package org.quiltmc.enigma.gui; import javax.swing.text.DefaultCaret; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/ClassSelector.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/ClassSelector.java similarity index 95% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/ClassSelector.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/ClassSelector.java index d0ef73839..0bd55952e 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/ClassSelector.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/ClassSelector.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.gui; - -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.elements.ClassTreeCellRenderer; -import cuchaz.enigma.gui.node.ClassSelectorClassNode; -import cuchaz.enigma.gui.node.SortedMutableTreeNode; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +package org.quiltmc.enigma.gui; + +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.element.ClassTreeCellRenderer; +import org.quiltmc.enigma.gui.node.ClassSelectorClassNode; +import org.quiltmc.enigma.gui.node.SortedMutableTreeNode; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import javax.annotation.Nullable; import javax.swing.JTree; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/ConnectionState.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/ConnectionState.java similarity index 68% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/ConnectionState.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/ConnectionState.java index db6590de9..8c7e15390 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/ConnectionState.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/ConnectionState.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui; +package org.quiltmc.enigma.gui; public enum ConnectionState { NOT_CONNECTED, diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/EditableType.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/EditableType.java similarity index 68% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/EditableType.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/EditableType.java index 7567a90e5..e8682f5fd 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/EditableType.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/EditableType.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui; +package org.quiltmc.enigma.gui; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import javax.annotation.Nullable; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/Gui.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/Gui.java similarity index 91% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/Gui.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/Gui.java index 60ae657b1..a681ab164 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/Gui.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/Gui.java @@ -1,44 +1,44 @@ -package cuchaz.enigma.gui; - -import cuchaz.enigma.Enigma; -import cuchaz.enigma.EnigmaProfile; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.gui.config.NetConfig; -import cuchaz.enigma.gui.config.Themes; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.dialog.JavadocDialog; -import cuchaz.enigma.gui.dialog.SearchDialog; -import cuchaz.enigma.gui.docker.AllClassesDocker; -import cuchaz.enigma.gui.docker.CallsTreeDocker; -import cuchaz.enigma.gui.docker.ClassesDocker; -import cuchaz.enigma.gui.docker.CollabDocker; -import cuchaz.enigma.gui.docker.DeobfuscatedClassesDocker; -import cuchaz.enigma.gui.docker.Dock; -import cuchaz.enigma.gui.docker.Docker; -import cuchaz.enigma.gui.docker.DockerManager; -import cuchaz.enigma.gui.docker.ImplementationsTreeDocker; -import cuchaz.enigma.gui.docker.InheritanceTreeDocker; -import cuchaz.enigma.gui.docker.NotificationsDocker; -import cuchaz.enigma.gui.docker.ObfuscatedClassesDocker; -import cuchaz.enigma.gui.docker.StructureDocker; -import cuchaz.enigma.gui.elements.EditorTabbedPane; -import cuchaz.enigma.gui.elements.MainWindow; -import cuchaz.enigma.gui.elements.MenuBar; -import cuchaz.enigma.gui.panels.EditorPanel; -import cuchaz.enigma.gui.panels.IdentifierPanel; -import cuchaz.enigma.gui.renderer.MessageListCellRenderer; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.gui.util.LanguageUtil; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.network.ServerMessage; -import cuchaz.enigma.source.Token; -import cuchaz.enigma.translation.mapping.EntryChange; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.validation.Message; -import cuchaz.enigma.utils.validation.ParameterizedMessage; -import cuchaz.enigma.utils.validation.ValidationContext; +package org.quiltmc.enigma.gui; + +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.EnigmaProfile; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.gui.config.NetConfig; +import org.quiltmc.enigma.gui.config.Themes; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.dialog.JavadocDialog; +import org.quiltmc.enigma.gui.dialog.SearchDialog; +import org.quiltmc.enigma.gui.docker.AllClassesDocker; +import org.quiltmc.enigma.gui.docker.CallsTreeDocker; +import org.quiltmc.enigma.gui.docker.ClassesDocker; +import org.quiltmc.enigma.gui.docker.CollabDocker; +import org.quiltmc.enigma.gui.docker.DeobfuscatedClassesDocker; +import org.quiltmc.enigma.gui.docker.Dock; +import org.quiltmc.enigma.gui.docker.Docker; +import org.quiltmc.enigma.gui.docker.DockerManager; +import org.quiltmc.enigma.gui.docker.ImplementationsTreeDocker; +import org.quiltmc.enigma.gui.docker.InheritanceTreeDocker; +import org.quiltmc.enigma.gui.docker.NotificationsDocker; +import org.quiltmc.enigma.gui.docker.ObfuscatedClassesDocker; +import org.quiltmc.enigma.gui.docker.StructureDocker; +import org.quiltmc.enigma.gui.element.EditorTabbedPane; +import org.quiltmc.enigma.gui.element.MainWindow; +import org.quiltmc.enigma.gui.element.MenuBar; +import org.quiltmc.enigma.gui.panel.EditorPanel; +import org.quiltmc.enigma.gui.panel.IdentifierPanel; +import org.quiltmc.enigma.gui.renderer.MessageListCellRenderer; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.LanguageUtil; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.network.ServerMessage; +import org.quiltmc.enigma.source.Token; +import org.quiltmc.enigma.translation.mapping.EntryChange; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.validation.Message; +import org.quiltmc.enigma.util.validation.ParameterizedMessage; +import org.quiltmc.enigma.util.validation.ValidationContext; import javax.annotation.Nullable; import javax.swing.DefaultListModel; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/GuiController.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/GuiController.java similarity index 84% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/GuiController.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/GuiController.java index 5ca63666f..9fa2f968a 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/GuiController.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/GuiController.java @@ -1,70 +1,70 @@ -package cuchaz.enigma.gui; +package org.quiltmc.enigma.gui; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import cuchaz.enigma.Enigma; -import cuchaz.enigma.EnigmaProfile; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.analysis.ClassImplementationsTreeNode; -import cuchaz.enigma.analysis.ClassInheritanceTreeNode; -import cuchaz.enigma.analysis.ClassReferenceTreeNode; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.analysis.FieldReferenceTreeNode; -import cuchaz.enigma.analysis.IndexTreeBuilder; -import cuchaz.enigma.analysis.MethodImplementationsTreeNode; -import cuchaz.enigma.analysis.MethodInheritanceTreeNode; -import cuchaz.enigma.analysis.MethodReferenceTreeNode; -import cuchaz.enigma.analysis.StructureTreeNode; -import cuchaz.enigma.analysis.StructureTreeOptions; -import cuchaz.enigma.api.service.ObfuscationTestService; -import cuchaz.enigma.classhandle.ClassHandle; -import cuchaz.enigma.classhandle.ClassHandleProvider; -import cuchaz.enigma.classprovider.ClasspathClassProvider; -import cuchaz.enigma.gui.config.NetConfig; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.dialog.ProgressDialog; -import cuchaz.enigma.gui.docker.CollabDocker; -import cuchaz.enigma.stats.StatType; -import cuchaz.enigma.gui.util.History; -import cuchaz.enigma.network.ClientPacketHandler; -import cuchaz.enigma.network.EnigmaClient; -import cuchaz.enigma.network.EnigmaServer; -import cuchaz.enigma.network.IntegratedEnigmaServer; -import cuchaz.enigma.network.ServerMessage; -import cuchaz.enigma.network.ServerPacketHandler; -import cuchaz.enigma.network.packet.EntryChangeC2SPacket; -import cuchaz.enigma.network.packet.LoginC2SPacket; -import cuchaz.enigma.network.packet.Packet; -import cuchaz.enigma.source.DecompiledClassSource; -import cuchaz.enigma.source.DecompilerService; -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.source.Token; -import cuchaz.enigma.stats.StatsGenerator; -import cuchaz.enigma.stats.StatsResult; -import cuchaz.enigma.stats.StatsTree; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryChange; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.mapping.EntryUtil; -import cuchaz.enigma.translation.mapping.MappingDelta; -import cuchaz.enigma.translation.mapping.ResolutionStrategy; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.TristateChange; -import cuchaz.enigma.utils.Utils; -import cuchaz.enigma.utils.validation.Message; -import cuchaz.enigma.utils.validation.ParameterizedMessage; -import cuchaz.enigma.utils.validation.ValidationContext; +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.EnigmaProfile; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.analysis.ClassImplementationsTreeNode; +import org.quiltmc.enigma.analysis.ClassInheritanceTreeNode; +import org.quiltmc.enigma.analysis.ClassReferenceTreeNode; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.analysis.FieldReferenceTreeNode; +import org.quiltmc.enigma.analysis.IndexTreeBuilder; +import org.quiltmc.enigma.analysis.MethodImplementationsTreeNode; +import org.quiltmc.enigma.analysis.MethodInheritanceTreeNode; +import org.quiltmc.enigma.analysis.MethodReferenceTreeNode; +import org.quiltmc.enigma.analysis.StructureTreeNode; +import org.quiltmc.enigma.analysis.StructureTreeOptions; +import org.quiltmc.enigma.api.service.ObfuscationTestService; +import org.quiltmc.enigma.classhandle.ClassHandle; +import org.quiltmc.enigma.classhandle.ClassHandleProvider; +import org.quiltmc.enigma.classprovider.ClasspathClassProvider; +import org.quiltmc.enigma.gui.config.NetConfig; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.dialog.ProgressDialog; +import org.quiltmc.enigma.gui.docker.CollabDocker; +import org.quiltmc.enigma.stats.StatType; +import org.quiltmc.enigma.gui.util.History; +import org.quiltmc.enigma.network.ClientPacketHandler; +import org.quiltmc.enigma.network.EnigmaClient; +import org.quiltmc.enigma.network.EnigmaServer; +import org.quiltmc.enigma.network.IntegratedEnigmaServer; +import org.quiltmc.enigma.network.ServerMessage; +import org.quiltmc.enigma.network.ServerPacketHandler; +import org.quiltmc.enigma.network.packet.EntryChangeC2SPacket; +import org.quiltmc.enigma.network.packet.LoginC2SPacket; +import org.quiltmc.enigma.network.packet.Packet; +import org.quiltmc.enigma.source.DecompiledClassSource; +import org.quiltmc.enigma.source.DecompilerService; +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.Token; +import org.quiltmc.enigma.stats.StatsGenerator; +import org.quiltmc.enigma.stats.StatsResult; +import org.quiltmc.enigma.stats.StatsTree; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryChange; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.mapping.EntryUtil; +import org.quiltmc.enigma.translation.mapping.MappingDelta; +import org.quiltmc.enigma.translation.mapping.ResolutionStrategy; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.TristateChange; +import org.quiltmc.enigma.util.Utils; +import org.quiltmc.enigma.util.validation.Message; +import org.quiltmc.enigma.util.validation.ParameterizedMessage; +import org.quiltmc.enigma.util.validation.ValidationContext; import org.tinylog.Logger; import javax.swing.JOptionPane; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/Main.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/Main.java similarity index 94% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/Main.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/Main.java index cc67fa241..87f395083 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/Main.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/Main.java @@ -1,13 +1,13 @@ -package cuchaz.enigma.gui; - -import cuchaz.enigma.EnigmaProfile; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.config.Themes; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.dialog.CrashDialog; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.validation.Message; -import cuchaz.enigma.utils.validation.ParameterizedMessage; +package org.quiltmc.enigma.gui; + +import org.quiltmc.enigma.EnigmaProfile; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.config.Themes; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.dialog.CrashDialog; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.validation.Message; +import org.quiltmc.enigma.util.validation.ParameterizedMessage; import joptsimple.OptionException; import joptsimple.OptionParser; import joptsimple.OptionSet; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/NestedPackages.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/NestedPackages.java similarity index 90% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/NestedPackages.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/NestedPackages.java index f5fbe021b..c32f81439 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/NestedPackages.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/NestedPackages.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui; +package org.quiltmc.enigma.gui; -import cuchaz.enigma.gui.node.ClassSelectorClassNode; -import cuchaz.enigma.gui.node.ClassSelectorPackageNode; -import cuchaz.enigma.gui.node.SortedMutableTreeNode; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.gui.node.ClassSelectorClassNode; +import org.quiltmc.enigma.gui.node.ClassSelectorPackageNode; +import org.quiltmc.enigma.gui.node.SortedMutableTreeNode; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/NotificationManager.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/NotificationManager.java similarity index 96% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/NotificationManager.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/NotificationManager.java index 9f788b642..2c67b53cd 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/NotificationManager.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/NotificationManager.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.gui; - -import cuchaz.enigma.gui.docker.NotificationsDocker; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.validation.Message; -import cuchaz.enigma.utils.validation.ParameterizedMessage; -import cuchaz.enigma.utils.validation.ValidationContext; +package org.quiltmc.enigma.gui; + +import org.quiltmc.enigma.gui.docker.NotificationsDocker; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.validation.Message; +import org.quiltmc.enigma.util.validation.ParameterizedMessage; +import org.quiltmc.enigma.util.validation.ValidationContext; import javax.swing.BorderFactory; import javax.swing.JButton; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/ReadableToken.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/ReadableToken.java similarity index 92% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/ReadableToken.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/ReadableToken.java index 5c15722ba..ad4ed3fc0 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/ReadableToken.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/ReadableToken.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui; +package org.quiltmc.enigma.gui; public class ReadableToken { public final int line; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/Decompiler.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/Decompiler.java similarity index 80% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/config/Decompiler.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/Decompiler.java index a075ad178..9e02c30e8 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/Decompiler.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/Decompiler.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.gui.config; +package org.quiltmc.enigma.gui.config; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.dialog.decompiler.VineflowerSettingsDialog; -import cuchaz.enigma.source.DecompilerService; -import cuchaz.enigma.source.Decompilers; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.dialog.decompiler.VineflowerSettingsDialog; +import org.quiltmc.enigma.source.DecompilerService; +import org.quiltmc.enigma.source.Decompilers; import java.util.Map; import java.util.function.BiConsumer; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/DecompilerConfig.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/DecompilerConfig.java similarity index 84% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/config/DecompilerConfig.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/DecompilerConfig.java index 7622d0d53..154c21906 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/DecompilerConfig.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/DecompilerConfig.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.gui.config; +package org.quiltmc.enigma.gui.config; -import cuchaz.enigma.config.ConfigContainer; -import cuchaz.enigma.config.ConfigSection; -import cuchaz.enigma.source.vineflower.VineflowerPreferences; +import org.quiltmc.enigma.config.ConfigContainer; +import org.quiltmc.enigma.config.ConfigSection; +import org.quiltmc.enigma.source.vineflower.VineflowerPreferences; import java.util.HashSet; import java.util.Map; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/KeyBindsConfig.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/KeyBindsConfig.java similarity index 77% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/config/KeyBindsConfig.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/KeyBindsConfig.java index 51017169c..43dd50f15 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/KeyBindsConfig.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/KeyBindsConfig.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.gui.config; +package org.quiltmc.enigma.gui.config; -import cuchaz.enigma.config.ConfigContainer; -import cuchaz.enigma.config.ConfigSection; -import cuchaz.enigma.gui.config.keybind.KeyBind; +import org.quiltmc.enigma.config.ConfigContainer; +import org.quiltmc.enigma.config.ConfigSection; +import org.quiltmc.enigma.gui.config.keybind.KeyBind; public final class KeyBindsConfig { private KeyBindsConfig() { diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/LookAndFeel.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/LookAndFeel.java similarity index 98% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/config/LookAndFeel.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/LookAndFeel.java index 1fd02b712..edf2eb3ad 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/LookAndFeel.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/LookAndFeel.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.config; +package org.quiltmc.enigma.gui.config; import com.formdev.flatlaf.FlatDarkLaf; import com.formdev.flatlaf.FlatLightLaf; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/NetConfig.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/NetConfig.java similarity index 91% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/config/NetConfig.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/NetConfig.java index eaf20e7fc..7c2695675 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/NetConfig.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/NetConfig.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.gui.config; +package org.quiltmc.enigma.gui.config; -import cuchaz.enigma.config.ConfigContainer; -import cuchaz.enigma.network.EnigmaServer; +import org.quiltmc.enigma.config.ConfigContainer; +import org.quiltmc.enigma.network.EnigmaServer; public final class NetConfig { private NetConfig() { diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/Themes.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/Themes.java similarity index 93% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/config/Themes.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/Themes.java index a25c3510f..1f2429f20 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/Themes.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/Themes.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.gui.config; +package org.quiltmc.enigma.gui.config; -import cuchaz.enigma.gui.events.ThemeChangeListener; -import cuchaz.enigma.gui.highlight.BoxHighlightPainter; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.gui.event.ThemeChangeListener; +import org.quiltmc.enigma.gui.highlight.BoxHighlightPainter; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.source.RenamableTokenType; import org.quiltmc.syntaxpain.JavaSyntaxKit; import java.awt.Font; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/UiConfig.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/UiConfig.java similarity index 96% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/config/UiConfig.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/UiConfig.java index 4fc92b620..5432786c4 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/UiConfig.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/UiConfig.java @@ -1,15 +1,15 @@ -package cuchaz.enigma.gui.config; - -import cuchaz.enigma.config.ConfigContainer; -import cuchaz.enigma.config.ConfigSection; -import cuchaz.enigma.gui.EnigmaQuickFindDialog; -import cuchaz.enigma.gui.NotificationManager; -import cuchaz.enigma.gui.docker.Dock; -import cuchaz.enigma.gui.docker.Docker; -import cuchaz.enigma.gui.docker.DockerManager; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.Pair; +package org.quiltmc.enigma.gui.config; + +import org.quiltmc.enigma.config.ConfigContainer; +import org.quiltmc.enigma.config.ConfigSection; +import org.quiltmc.enigma.gui.dialog.EnigmaQuickFindDialog; +import org.quiltmc.enigma.gui.NotificationManager; +import org.quiltmc.enigma.gui.docker.Dock; +import org.quiltmc.enigma.gui.docker.Docker; +import org.quiltmc.enigma.gui.docker.DockerManager; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.Pair; import org.quiltmc.syntaxpain.SyntaxpainConfiguration; import org.tinylog.Logger; @@ -140,7 +140,7 @@ public static float getScaleFactor() { } public static float getActiveScaleFactor() { - return (float) runningSwing.section(GENERAL).setIfAbsentDouble(SCALE_FACTOR, 1.0); + return (float) swing.data().section(GENERAL).setIfAbsentDouble(SCALE_FACTOR, 1.0); } public static void setScaleFactor(float scale) { @@ -307,7 +307,7 @@ public static LookAndFeel getLookAndFeel() { } public static LookAndFeel getActiveLookAndFeel() { - return runningSwing.section(THEMES).setIfAbsentEnum(LookAndFeel::valueOf, CURRENT, LookAndFeel.NONE); + return swing.data().section(THEMES).setIfAbsentEnum(LookAndFeel::valueOf, CURRENT, LookAndFeel.NONE); } public static void setLookAndFeel(LookAndFeel laf) { @@ -336,12 +336,12 @@ private static Color fromComponents(int rgb, double alpha) { } private static Color getThemeColorRgba(String colorName) { - ConfigSection s = runningSwing.section(THEMES).section(getActiveLookAndFeel().name()).section(COLORS); + ConfigSection s = swing.data().section(THEMES).section(getActiveLookAndFeel().name()).section(COLORS); return fromComponents(s.getRgbColor(colorName).orElse(0), s.getDouble(String.format("%s Alpha", colorName)).orElse(0)); } private static Color getThemeColorRgb(String colorName) { - ConfigSection s = runningSwing.section(THEMES).section(getActiveLookAndFeel().name()).section(COLORS); + ConfigSection s = swing.data().section(THEMES).section(getActiveLookAndFeel().name()).section(COLORS); return new Color(s.getRgbColor(colorName).orElse(0)); } @@ -406,7 +406,7 @@ public static boolean useCustomFonts() { } public static boolean activeUseCustomFonts() { - return runningSwing.section(THEMES).section(getActiveLookAndFeel().name()).section(FONTS).setIfAbsentBool(USE_CUSTOM, false); + return swing.data().section(THEMES).section(getActiveLookAndFeel().name()).section(FONTS).setIfAbsentBool(USE_CUSTOM, false); } public static void setUseCustomFonts(boolean b) { @@ -419,7 +419,7 @@ public static Optional getFont(String name) { } public static Optional getActiveFont(String name) { - Optional spec = runningSwing.section(THEMES).section(getActiveLookAndFeel().name()).section(FONTS).getString(name); + Optional spec = swing.data().section(THEMES).section(getActiveLookAndFeel().name()).section(FONTS).getString(name); return spec.map(Font::decode); } diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/keybind/KeyBind.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/keybind/KeyBind.java similarity index 97% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/config/keybind/KeyBind.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/keybind/KeyBind.java index bce7e632d..60cf316bb 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/keybind/KeyBind.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/keybind/KeyBind.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.gui.config.keybind; +package org.quiltmc.enigma.gui.config.keybind; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.util.I18n; import org.tinylog.Logger; import java.awt.event.KeyEvent; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/keybind/KeyBinds.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/keybind/KeyBinds.java similarity index 98% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/config/keybind/KeyBinds.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/keybind/KeyBinds.java index 53bd7a6ed..df752cf99 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/config/keybind/KeyBinds.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/config/keybind/KeyBinds.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.gui.config.keybind; +package org.quiltmc.enigma.gui.config.keybind; -import cuchaz.enigma.gui.config.KeyBindsConfig; +import org.quiltmc.enigma.gui.config.KeyBindsConfig; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/AboutDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/AboutDialog.java similarity index 88% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/AboutDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/AboutDialog.java index 182ca9d46..762b97630 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/AboutDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/AboutDialog.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.dialog; +package org.quiltmc.enigma.gui.dialog; -import cuchaz.enigma.Enigma; -import cuchaz.enigma.gui.config.Decompiler; -import cuchaz.enigma.gui.util.GridBagConstraintsBuilder; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.gui.config.Decompiler; +import org.quiltmc.enigma.gui.util.GridBagConstraintsBuilder; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.util.I18n; import java.awt.Container; import java.awt.GridBagConstraints; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/AbstractDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/AbstractDialog.java similarity index 88% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/AbstractDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/AbstractDialog.java index f88cbc87f..39812f287 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/AbstractDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/AbstractDialog.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.gui.dialog; - -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.util.GridBagConstraintsBuilder; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.Pair; -import cuchaz.enigma.utils.validation.ValidationContext; +package org.quiltmc.enigma.gui.dialog; + +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.util.GridBagConstraintsBuilder; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.Pair; +import org.quiltmc.enigma.util.validation.ValidationContext; import java.awt.BorderLayout; import java.awt.Component; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/ChangeDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/ChangeDialog.java similarity index 87% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/ChangeDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/ChangeDialog.java index 7a0bd627f..75a63e7c0 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/ChangeDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/ChangeDialog.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.gui.dialog; +package org.quiltmc.enigma.gui.dialog; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.util.I18n; import java.awt.BorderLayout; import java.awt.Dialog; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/ConnectToServerDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/ConnectToServerDialog.java similarity index 84% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/ConnectToServerDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/ConnectToServerDialog.java index 758ac9ce8..c84a4cd3f 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/ConnectToServerDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/ConnectToServerDialog.java @@ -1,13 +1,13 @@ -package cuchaz.enigma.gui.dialog; +package org.quiltmc.enigma.gui.dialog; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.NetConfig; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.network.EnigmaServer; -import cuchaz.enigma.network.ServerAddress; -import cuchaz.enigma.utils.Pair; -import cuchaz.enigma.utils.validation.Message; -import cuchaz.enigma.utils.validation.StandardValidation; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.NetConfig; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.network.EnigmaServer; +import org.quiltmc.enigma.network.ServerAddress; +import org.quiltmc.enigma.util.Pair; +import org.quiltmc.enigma.util.validation.Message; +import org.quiltmc.enigma.util.validation.StandardValidation; import java.awt.Component; import java.awt.Dimension; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/CrashDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/CrashDialog.java similarity index 93% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/CrashDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/CrashDialog.java index 1fe31814a..362c594f1 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/CrashDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/CrashDialog.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.dialog; +package org.quiltmc.enigma.gui.dialog; -import cuchaz.enigma.Enigma; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.gui.util.ScaleUtil; import org.tinylog.Logger; import java.awt.BorderLayout; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/CreateServerDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/CreateServerDialog.java similarity index 84% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/CreateServerDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/CreateServerDialog.java index c00bd941a..5b5645857 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/CreateServerDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/CreateServerDialog.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.gui.dialog; +package org.quiltmc.enigma.gui.dialog; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.NetConfig; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.network.EnigmaServer; -import cuchaz.enigma.utils.Pair; -import cuchaz.enigma.utils.validation.Message; -import cuchaz.enigma.utils.validation.StandardValidation; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.NetConfig; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.network.EnigmaServer; +import org.quiltmc.enigma.util.Pair; +import org.quiltmc.enigma.util.validation.Message; +import org.quiltmc.enigma.util.validation.StandardValidation; import java.awt.Component; import java.awt.Dimension; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/EnigmaQuickFindDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/EnigmaQuickFindDialog.java similarity index 92% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/EnigmaQuickFindDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/EnigmaQuickFindDialog.java index 71ce1a9ef..94f11b8f2 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/EnigmaQuickFindDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/EnigmaQuickFindDialog.java @@ -11,11 +11,11 @@ * limitations under the License. */ -package cuchaz.enigma.gui; +package org.quiltmc.enigma.gui.dialog; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.util.I18n; import org.quiltmc.syntaxpain.QuickFindDialog; import javax.swing.text.JTextComponent; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/FontDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/FontDialog.java similarity index 94% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/FontDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/FontDialog.java index 9aa86a697..da9dc73f6 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/FontDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/FontDialog.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.gui.dialog; +package org.quiltmc.enigma.gui.dialog; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.util.GridBagConstraintsBuilder; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.util.GridBagConstraintsBuilder; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.util.I18n; import org.drjekyll.fontchooser.FontChooser; import java.awt.Component; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/JavadocDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/JavadocDialog.java similarity index 89% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/JavadocDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/JavadocDialog.java index 571f97ca9..748b72edc 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/JavadocDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/JavadocDialog.java @@ -1,17 +1,17 @@ -package cuchaz.enigma.gui.dialog; +package org.quiltmc.enigma.gui.dialog; import com.google.common.base.Strings; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.gui.GuiController; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.translation.mapping.EntryChange; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.validation.ValidationContext; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.gui.GuiController; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.translation.mapping.EntryChange; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.validation.ValidationContext; import java.awt.BorderLayout; import java.awt.Container; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/ProgressDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/ProgressDialog.java similarity index 91% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/ProgressDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/ProgressDialog.java index 4b4595fb8..18ac94677 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/ProgressDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/ProgressDialog.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.gui.dialog; - -import cuchaz.enigma.Enigma; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.util.GridBagConstraintsBuilder; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.utils.I18n; +package org.quiltmc.enigma.gui.dialog; + +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.util.GridBagConstraintsBuilder; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.util.I18n; import java.awt.Container; import java.awt.Dimension; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/SearchDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/SearchDialog.java similarity index 93% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/SearchDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/SearchDialog.java index be7c0bfde..cc21a4bae 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/SearchDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/SearchDialog.java @@ -1,22 +1,22 @@ -package cuchaz.enigma.gui.dialog; - -import cuchaz.enigma.analysis.index.EntryIndex; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.GuiController; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.docker.DeobfuscatedClassesDocker; -import cuchaz.enigma.gui.docker.ObfuscatedClassesDocker; -import cuchaz.enigma.gui.util.AbstractListCellRenderer; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.translation.representation.entry.ParentedEntry; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.gui.search.SearchEntry; -import cuchaz.enigma.gui.search.SearchUtil; +package org.quiltmc.enigma.gui.dialog; + +import org.quiltmc.enigma.analysis.index.EntryIndex; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.GuiController; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.docker.DeobfuscatedClassesDocker; +import org.quiltmc.enigma.gui.docker.ObfuscatedClassesDocker; +import org.quiltmc.enigma.gui.util.AbstractListCellRenderer; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.representation.entry.ParentedEntry; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.gui.search.SearchEntry; +import org.quiltmc.enigma.gui.search.SearchUtil; import java.awt.BorderLayout; import java.awt.Color; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/StatsDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/StatsDialog.java similarity index 93% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/StatsDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/StatsDialog.java index 2f6065a9d..f161bb4e9 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/StatsDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/StatsDialog.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.gui.dialog; - -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.stats.ProjectStatsResult; -import cuchaz.enigma.stats.StatType; -import cuchaz.enigma.gui.util.GridBagConstraintsBuilder; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.utils.I18n; +package org.quiltmc.enigma.gui.dialog; + +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.stats.ProjectStatsResult; +import org.quiltmc.enigma.stats.StatType; +import org.quiltmc.enigma.gui.util.GridBagConstraintsBuilder; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.util.I18n; import java.awt.Container; import java.awt.Dimension; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/decompiler/DecompilerSettingsDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/decompiler/DecompilerSettingsDialog.java similarity index 88% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/decompiler/DecompilerSettingsDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/decompiler/DecompilerSettingsDialog.java index 8897add2e..7ef4f137d 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/decompiler/DecompilerSettingsDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/decompiler/DecompilerSettingsDialog.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.dialog.decompiler; +package org.quiltmc.enigma.gui.dialog.decompiler; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.Decompiler; -import cuchaz.enigma.gui.util.GridBagConstraintsBuilder; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.Decompiler; +import org.quiltmc.enigma.gui.util.GridBagConstraintsBuilder; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.util.I18n; import javax.swing.JButton; import javax.swing.JDialog; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/decompiler/VineflowerSettingsDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/decompiler/VineflowerSettingsDialog.java similarity index 93% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/decompiler/VineflowerSettingsDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/decompiler/VineflowerSettingsDialog.java index ba08a1f36..628a9fa0f 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/decompiler/VineflowerSettingsDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/decompiler/VineflowerSettingsDialog.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.dialog.decompiler; +package org.quiltmc.enigma.gui.dialog.decompiler; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.DecompilerConfig; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.source.vineflower.VineflowerPreferences; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.DecompilerConfig; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.source.vineflower.VineflowerPreferences; +import org.quiltmc.enigma.util.I18n; import javax.swing.BoxLayout; import javax.swing.JButton; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/keybind/CombinationPanel.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/keybind/CombinationPanel.java similarity index 96% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/keybind/CombinationPanel.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/keybind/CombinationPanel.java index 2d9460549..2b84d4134 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/keybind/CombinationPanel.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/keybind/CombinationPanel.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.gui.dialog.keybind; +package org.quiltmc.enigma.gui.dialog.keybind; -import cuchaz.enigma.gui.config.keybind.KeyBind; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.gui.config.keybind.KeyBind; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.util.I18n; import javax.swing.JButton; import javax.swing.JPanel; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/keybind/ConfigureCategoryKeyBindsDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/keybind/ConfigureCategoryKeyBindsDialog.java similarity index 91% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/keybind/ConfigureCategoryKeyBindsDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/keybind/ConfigureCategoryKeyBindsDialog.java index 72c9aa729..4de26c586 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/keybind/ConfigureCategoryKeyBindsDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/keybind/ConfigureCategoryKeyBindsDialog.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.gui.dialog.keybind; +package org.quiltmc.enigma.gui.dialog.keybind; -import cuchaz.enigma.gui.config.keybind.KeyBind; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.gui.config.keybind.KeyBind; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.util.I18n; import javax.swing.JButton; import javax.swing.JDialog; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/keybind/ConfigureKeyBindsDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/keybind/ConfigureKeyBindsDialog.java similarity index 88% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/keybind/ConfigureKeyBindsDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/keybind/ConfigureKeyBindsDialog.java index 713e49dca..138f5495b 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/keybind/ConfigureKeyBindsDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/keybind/ConfigureKeyBindsDialog.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.gui.dialog.keybind; - -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.keybind.KeyBind; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.util.GridBagConstraintsBuilder; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.utils.I18n; +package org.quiltmc.enigma.gui.dialog.keybind; + +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.keybind.KeyBind; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.util.GridBagConstraintsBuilder; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.util.I18n; import javax.swing.JButton; import javax.swing.JDialog; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/keybind/EditKeyBindDialog.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/keybind/EditKeyBindDialog.java similarity index 95% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/keybind/EditKeyBindDialog.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/keybind/EditKeyBindDialog.java index eecef0f0e..48bd8de10 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/dialog/keybind/EditKeyBindDialog.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/dialog/keybind/EditKeyBindDialog.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.dialog.keybind; +package org.quiltmc.enigma.gui.dialog.keybind; -import cuchaz.enigma.gui.config.keybind.KeyBind; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.gui.config.keybind.KeyBind; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.util.I18n; import javax.swing.JButton; import javax.swing.JDialog; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/AbstractInheritanceTreeDocker.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/AbstractInheritanceTreeDocker.java similarity index 84% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/AbstractInheritanceTreeDocker.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/AbstractInheritanceTreeDocker.java index b1fdacab9..e5e5e2b1d 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/AbstractInheritanceTreeDocker.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/AbstractInheritanceTreeDocker.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.gui.docker; +package org.quiltmc.enigma.gui.docker; -import cuchaz.enigma.analysis.AbstractClassTreeNode; -import cuchaz.enigma.analysis.AbstractMethodTreeNode; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.gui.util.SingleTreeSelectionModel; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.analysis.AbstractClassTreeNode; +import org.quiltmc.enigma.analysis.AbstractMethodTreeNode; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.SingleTreeSelectionModel; +import org.quiltmc.enigma.translation.representation.entry.Entry; import javax.annotation.Nullable; import javax.swing.JScrollPane; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/AllClassesDocker.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/AllClassesDocker.java similarity index 74% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/AllClassesDocker.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/AllClassesDocker.java index 7294faa92..52976ed4f 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/AllClassesDocker.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/AllClassesDocker.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.gui.docker; +package org.quiltmc.enigma.gui.docker; -import cuchaz.enigma.gui.ClassSelector; -import cuchaz.enigma.gui.Gui; +import org.quiltmc.enigma.gui.ClassSelector; +import org.quiltmc.enigma.gui.Gui; public class AllClassesDocker extends ClassesDocker { public AllClassesDocker(Gui gui) { diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/CallsTreeDocker.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/CallsTreeDocker.java similarity index 81% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/CallsTreeDocker.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/CallsTreeDocker.java index 543a3f0df..6eb0c80a3 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/CallsTreeDocker.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/CallsTreeDocker.java @@ -1,18 +1,18 @@ -package cuchaz.enigma.gui.docker; - -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.analysis.ReferenceTreeNode; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.TokenListCellRenderer; -import cuchaz.enigma.gui.renderer.CallsTreeCellRenderer; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.gui.util.SingleTreeSelectionModel; -import cuchaz.enigma.source.Token; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.gui.docker; + +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.analysis.ReferenceTreeNode; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.renderer.TokenListCellRenderer; +import org.quiltmc.enigma.gui.renderer.CallsTreeCellRenderer; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.gui.util.SingleTreeSelectionModel; +import org.quiltmc.enigma.source.Token; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.awt.BorderLayout; import java.awt.event.MouseEvent; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/ClassesDocker.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/ClassesDocker.java similarity index 84% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/ClassesDocker.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/ClassesDocker.java index 5ee3339a6..2a8856ae2 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/ClassesDocker.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/ClassesDocker.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.gui.docker; +package org.quiltmc.enigma.gui.docker; -import cuchaz.enigma.gui.ClassSelector; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.elements.ClassSelectorPopupMenu; -import cuchaz.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.ClassSelector; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.element.ClassSelectorPopupMenu; +import org.quiltmc.enigma.gui.util.GuiUtil; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/CollabDocker.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/CollabDocker.java similarity index 96% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/CollabDocker.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/CollabDocker.java index 497ac2aee..6dfe0e783 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/CollabDocker.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/CollabDocker.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.gui.docker; +package org.quiltmc.enigma.gui.docker; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.docker.component.DockerTitleBar; -import cuchaz.enigma.network.packet.MessageC2SPacket; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.docker.component.DockerTitleBar; +import org.quiltmc.enigma.network.packet.MessageC2SPacket; +import org.quiltmc.enigma.util.I18n; import javax.swing.AbstractAction; import javax.swing.JButton; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/DeobfuscatedClassesDocker.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/DeobfuscatedClassesDocker.java similarity index 76% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/DeobfuscatedClassesDocker.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/DeobfuscatedClassesDocker.java index 0cd614d9d..0aa3a29ff 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/DeobfuscatedClassesDocker.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/DeobfuscatedClassesDocker.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.gui.docker; +package org.quiltmc.enigma.gui.docker; -import cuchaz.enigma.gui.ClassSelector; -import cuchaz.enigma.gui.Gui; +import org.quiltmc.enigma.gui.ClassSelector; +import org.quiltmc.enigma.gui.Gui; public class DeobfuscatedClassesDocker extends ClassesDocker { public DeobfuscatedClassesDocker(Gui gui) { diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/Dock.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/Dock.java similarity index 98% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/Dock.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/Dock.java index 832199752..93a2ec6b4 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/Dock.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/Dock.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.docker; +package org.quiltmc.enigma.gui.docker; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.docker.component.DockerButton; -import cuchaz.enigma.gui.docker.component.DockerSelector; -import cuchaz.enigma.gui.docker.component.Draggable; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.docker.component.DockerButton; +import org.quiltmc.enigma.gui.docker.component.DockerSelector; +import org.quiltmc.enigma.gui.docker.component.Draggable; import javax.swing.JPanel; import javax.swing.JSplitPane; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/Docker.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/Docker.java similarity index 93% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/Docker.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/Docker.java index b21c2c26f..ea96cd120 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/Docker.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/Docker.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.docker; +package org.quiltmc.enigma.gui.docker; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.docker.component.DockerButton; -import cuchaz.enigma.gui.docker.component.DockerTitleBar; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.docker.component.DockerButton; +import org.quiltmc.enigma.gui.docker.component.DockerTitleBar; +import org.quiltmc.enigma.util.I18n; import javax.swing.JPanel; import java.awt.BorderLayout; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/DockerManager.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/DockerManager.java similarity index 98% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/DockerManager.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/DockerManager.java index 32d277802..3d32296d2 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/DockerManager.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/DockerManager.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.gui.docker; +package org.quiltmc.enigma.gui.docker; -import cuchaz.enigma.gui.Gui; +import org.quiltmc.enigma.gui.Gui; import java.util.Collection; import java.util.HashMap; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/ImplementationsTreeDocker.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/ImplementationsTreeDocker.java similarity index 66% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/ImplementationsTreeDocker.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/ImplementationsTreeDocker.java index a1b4a9d3d..335c6242d 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/ImplementationsTreeDocker.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/ImplementationsTreeDocker.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.docker; +package org.quiltmc.enigma.gui.docker; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.renderer.ImplementationsTreeCellRenderer; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.renderer.ImplementationsTreeCellRenderer; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import javax.annotation.Nullable; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/InheritanceTreeDocker.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/InheritanceTreeDocker.java similarity index 65% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/InheritanceTreeDocker.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/InheritanceTreeDocker.java index 7682d372a..138793eaa 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/InheritanceTreeDocker.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/InheritanceTreeDocker.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.docker; +package org.quiltmc.enigma.gui.docker; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.renderer.InheritanceTreeCellRenderer; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.renderer.InheritanceTreeCellRenderer; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import javax.annotation.Nullable; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/NotificationsDocker.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/NotificationsDocker.java similarity index 89% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/NotificationsDocker.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/NotificationsDocker.java index 08d40abfd..1ba1e102e 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/NotificationsDocker.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/NotificationsDocker.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.gui.docker; +package org.quiltmc.enigma.gui.docker; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.NotificationManager; -import cuchaz.enigma.gui.docker.component.VerticalFlowLayout; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.NotificationManager; +import org.quiltmc.enigma.gui.docker.component.VerticalFlowLayout; import javax.swing.JPanel; import javax.swing.JScrollPane; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/ObfuscatedClassesDocker.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/ObfuscatedClassesDocker.java similarity index 78% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/ObfuscatedClassesDocker.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/ObfuscatedClassesDocker.java index 2d7f67a08..5e47d89b5 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/ObfuscatedClassesDocker.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/ObfuscatedClassesDocker.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.gui.docker; +package org.quiltmc.enigma.gui.docker; -import cuchaz.enigma.gui.ClassSelector; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.gui.ClassSelector; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import java.util.Comparator; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/StructureDocker.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/StructureDocker.java similarity index 88% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/StructureDocker.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/StructureDocker.java index 63c71d655..5d78f5114 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/StructureDocker.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/StructureDocker.java @@ -1,19 +1,19 @@ -package cuchaz.enigma.gui.docker; - -import cuchaz.enigma.analysis.StructureTreeNode; -import cuchaz.enigma.analysis.StructureTreeOptions; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.panels.EditorPanel; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.renderer.StructureOptionListCellRenderer; -import cuchaz.enigma.gui.util.GridBagConstraintsBuilder; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.gui.util.SingleTreeSelectionModel; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.translation.representation.entry.ParentedEntry; -import cuchaz.enigma.utils.I18n; +package org.quiltmc.enigma.gui.docker; + +import org.quiltmc.enigma.analysis.StructureTreeNode; +import org.quiltmc.enigma.analysis.StructureTreeOptions; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.panel.EditorPanel; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.renderer.StructureOptionListCellRenderer; +import org.quiltmc.enigma.gui.util.GridBagConstraintsBuilder; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.SingleTreeSelectionModel; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.representation.entry.ParentedEntry; +import org.quiltmc.enigma.util.I18n; import java.awt.BorderLayout; import java.awt.Component; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/DockerButton.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/DockerButton.java similarity index 94% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/DockerButton.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/DockerButton.java index 1ea281e8e..8d49ab43c 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/DockerButton.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/DockerButton.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.gui.docker.component; +package org.quiltmc.enigma.gui.docker.component; -import cuchaz.enigma.gui.config.LookAndFeel; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.docker.Docker; +import org.quiltmc.enigma.gui.config.LookAndFeel; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.docker.Docker; import javax.swing.JComponent; import javax.swing.JToggleButton; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/DockerLabel.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/DockerLabel.java similarity index 92% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/DockerLabel.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/DockerLabel.java index fc28a4d14..9c63606a1 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/DockerLabel.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/DockerLabel.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.gui.docker.component; +package org.quiltmc.enigma.gui.docker.component; -import cuchaz.enigma.gui.docker.Dock; -import cuchaz.enigma.gui.docker.Docker; +import org.quiltmc.enigma.gui.docker.Dock; +import org.quiltmc.enigma.gui.docker.Docker; import javax.swing.JComponent; import javax.swing.JLabel; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/DockerSelector.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/DockerSelector.java similarity index 95% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/DockerSelector.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/DockerSelector.java index 1210bcdae..14c5249c2 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/DockerSelector.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/DockerSelector.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.gui.docker.component; +package org.quiltmc.enigma.gui.docker.component; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.docker.Docker; -import cuchaz.enigma.gui.docker.DockerManager; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.docker.Docker; +import org.quiltmc.enigma.gui.docker.DockerManager; import javax.swing.JPanel; import java.awt.BorderLayout; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/DockerTitleBar.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/DockerTitleBar.java similarity index 93% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/DockerTitleBar.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/DockerTitleBar.java index 08c2e2ec3..21a0a1ab7 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/DockerTitleBar.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/DockerTitleBar.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.gui.docker.component; +package org.quiltmc.enigma.gui.docker.component; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.docker.Docker; -import cuchaz.enigma.gui.docker.Dock; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.docker.Docker; +import org.quiltmc.enigma.gui.docker.Dock; import javax.swing.JButton; import javax.swing.JPanel; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/Draggable.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/Draggable.java similarity index 99% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/Draggable.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/Draggable.java index 2e0029e2e..c9f3d5191 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/Draggable.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/Draggable.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.docker.component; +package org.quiltmc.enigma.gui.docker.component; import javax.swing.JComponent; import javax.swing.JFrame; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/VerticalFlowLayout.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/VerticalFlowLayout.java similarity index 97% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/VerticalFlowLayout.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/VerticalFlowLayout.java index 09f072aec..27a455c64 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/docker/component/VerticalFlowLayout.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/docker/component/VerticalFlowLayout.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.docker.component; +package org.quiltmc.enigma.gui.docker.component; import java.awt.Component; import java.awt.Container; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/ClassSelectorPopupMenu.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/ClassSelectorPopupMenu.java similarity index 91% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/elements/ClassSelectorPopupMenu.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/ClassSelectorPopupMenu.java index d0ad705e5..cff593567 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/ClassSelectorPopupMenu.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/ClassSelectorPopupMenu.java @@ -1,13 +1,13 @@ -package cuchaz.enigma.gui.elements; - -import cuchaz.enigma.gui.ClassSelector; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.docker.ClassesDocker; -import cuchaz.enigma.gui.util.PackageRenamer; -import cuchaz.enigma.translation.mapping.EntryChange; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.validation.ValidationContext; +package org.quiltmc.enigma.gui.element; + +import org.quiltmc.enigma.gui.ClassSelector; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.docker.ClassesDocker; +import org.quiltmc.enigma.gui.util.PackageRenamer; +import org.quiltmc.enigma.translation.mapping.EntryChange; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.validation.ValidationContext; import javax.swing.JMenuItem; import javax.swing.JOptionPane; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/ClassTreeCellRenderer.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/ClassTreeCellRenderer.java similarity index 87% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/elements/ClassTreeCellRenderer.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/ClassTreeCellRenderer.java index 090601c76..431ba07cb 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/ClassTreeCellRenderer.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/ClassTreeCellRenderer.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.gui.elements; - -import cuchaz.enigma.gui.ClassSelector; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.GuiController; -import cuchaz.enigma.gui.node.ClassSelectorClassNode; -import cuchaz.enigma.gui.node.ClassSelectorPackageNode; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.stats.ProjectStatsResult; -import cuchaz.enigma.stats.StatsResult; -import cuchaz.enigma.stats.StatsGenerator; +package org.quiltmc.enigma.gui.element; + +import org.quiltmc.enigma.gui.ClassSelector; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.GuiController; +import org.quiltmc.enigma.gui.node.ClassSelectorClassNode; +import org.quiltmc.enigma.gui.node.ClassSelectorPackageNode; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.stats.ProjectStatsResult; +import org.quiltmc.enigma.stats.StatsResult; +import org.quiltmc.enigma.stats.StatsGenerator; import javax.swing.BoxLayout; import javax.swing.Icon; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/ConvertingTextField.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/ConvertingTextField.java similarity index 95% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/elements/ConvertingTextField.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/ConvertingTextField.java index 0a2f2d99d..b4ebeba9a 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/ConvertingTextField.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/ConvertingTextField.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.gui.elements; +package org.quiltmc.enigma.gui.element; import com.formdev.flatlaf.FlatClientProperties; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.events.ConvertingTextFieldListener; -import cuchaz.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.event.ConvertingTextFieldListener; +import org.quiltmc.enigma.gui.util.GuiUtil; import java.awt.GridLayout; import java.awt.event.FocusAdapter; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/EditorPopupMenu.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/EditorPopupMenu.java similarity index 93% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/elements/EditorPopupMenu.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/EditorPopupMenu.java index 5198475ab..1c6f6de01 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/EditorPopupMenu.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/EditorPopupMenu.java @@ -1,17 +1,17 @@ -package cuchaz.enigma.gui.elements; - -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.gui.EditableType; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.GuiController; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.panels.EditorPanel; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.I18n; +package org.quiltmc.enigma.gui.element; + +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.gui.EditableType; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.GuiController; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.panel.EditorPanel; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.I18n; import java.awt.event.KeyEvent; import javax.swing.JMenuItem; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/EditorTabPopupMenu.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/EditorTabPopupMenu.java similarity index 90% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/elements/EditorTabPopupMenu.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/EditorTabPopupMenu.java index 86d9a98f9..9ffbafedc 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/EditorTabPopupMenu.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/EditorTabPopupMenu.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.gui.elements; +package org.quiltmc.enigma.gui.element; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.panels.EditorPanel; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.panel.EditorPanel; +import org.quiltmc.enigma.util.I18n; import java.awt.Component; import javax.swing.JMenuItem; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/EditorTabbedPane.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/EditorTabbedPane.java similarity index 90% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/elements/EditorTabbedPane.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/EditorTabbedPane.java index dd33f4e60..c4717d0f4 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/EditorTabbedPane.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/EditorTabbedPane.java @@ -1,16 +1,16 @@ -package cuchaz.enigma.gui.elements; +package org.quiltmc.enigma.gui.element; import com.google.common.collect.HashBiMap; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.classhandle.ClassHandle; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.events.EditorActionListener; -import cuchaz.enigma.gui.panels.ClosableTabTitlePane; -import cuchaz.enigma.gui.panels.EditorPanel; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.classhandle.ClassHandle; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.event.EditorActionListener; +import org.quiltmc.enigma.gui.panel.ClosableTabTitlePane; +import org.quiltmc.enigma.gui.panel.EditorPanel; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; import java.awt.Component; import java.awt.event.MouseEvent; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/MainWindow.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/MainWindow.java similarity index 90% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/elements/MainWindow.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/MainWindow.java index de781c4f2..69767571b 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/MainWindow.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/MainWindow.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.gui.elements; +package org.quiltmc.enigma.gui.element; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.docker.Docker; -import cuchaz.enigma.gui.docker.component.DockerSelector; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.docker.Docker; +import org.quiltmc.enigma.gui.docker.component.DockerSelector; import java.awt.BorderLayout; import java.awt.Container; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/MenuBar.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/MenuBar.java similarity index 94% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/elements/MenuBar.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/MenuBar.java index 4026aee45..9f6ed24bf 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/MenuBar.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/MenuBar.java @@ -1,31 +1,32 @@ -package cuchaz.enigma.gui.elements; - -import cuchaz.enigma.gui.ConnectionState; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.NotificationManager; -import cuchaz.enigma.gui.config.Decompiler; -import cuchaz.enigma.gui.config.LookAndFeel; -import cuchaz.enigma.gui.config.NetConfig; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.dialog.AboutDialog; -import cuchaz.enigma.gui.dialog.ChangeDialog; -import cuchaz.enigma.gui.dialog.ConnectToServerDialog; -import cuchaz.enigma.gui.dialog.CrashDialog; -import cuchaz.enigma.gui.dialog.CreateServerDialog; -import cuchaz.enigma.gui.dialog.FontDialog; -import cuchaz.enigma.gui.dialog.SearchDialog; -import cuchaz.enigma.gui.dialog.StatsDialog; -import cuchaz.enigma.gui.dialog.decompiler.DecompilerSettingsDialog; -import cuchaz.enigma.gui.dialog.keybind.ConfigureKeyBindsDialog; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.gui.util.LanguageUtil; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.Pair; -import cuchaz.enigma.utils.validation.Message; -import cuchaz.enigma.utils.validation.ParameterizedMessage; +package org.quiltmc.enigma.gui.element; + +import org.quiltmc.enigma.gui.ConnectionState; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.NotificationManager; +import org.quiltmc.enigma.gui.config.Decompiler; +import org.quiltmc.enigma.gui.config.LookAndFeel; +import org.quiltmc.enigma.gui.config.NetConfig; +import org.quiltmc.enigma.gui.config.Themes; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.dialog.AboutDialog; +import org.quiltmc.enigma.gui.dialog.ChangeDialog; +import org.quiltmc.enigma.gui.dialog.ConnectToServerDialog; +import org.quiltmc.enigma.gui.dialog.CrashDialog; +import org.quiltmc.enigma.gui.dialog.CreateServerDialog; +import org.quiltmc.enigma.gui.dialog.FontDialog; +import org.quiltmc.enigma.gui.dialog.SearchDialog; +import org.quiltmc.enigma.gui.dialog.StatsDialog; +import org.quiltmc.enigma.gui.dialog.decompiler.DecompilerSettingsDialog; +import org.quiltmc.enigma.gui.dialog.keybind.ConfigureKeyBindsDialog; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.LanguageUtil; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.Pair; +import org.quiltmc.enigma.util.validation.Message; +import org.quiltmc.enigma.util.validation.ParameterizedMessage; import javax.annotation.Nullable; import javax.swing.ButtonGroup; @@ -590,6 +591,7 @@ private static void prepareThemesMenu(JMenu themesMenu, Gui gui) { themeButton.addActionListener(e -> { UiConfig.setLookAndFeel(lookAndFeel); UiConfig.save(); + Themes.setupTheme(); ChangeDialog.show(gui.getFrame()); }); themesMenu.add(themeButton); diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/NavigatorPanel.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/NavigatorPanel.java similarity index 94% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/elements/NavigatorPanel.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/NavigatorPanel.java index d0b776c88..083e53e4f 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/NavigatorPanel.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/NavigatorPanel.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.elements; +package org.quiltmc.enigma.gui.element; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.source.RenamableTokenType; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.translation.representation.entry.Entry; import javax.annotation.Nullable; import javax.swing.JButton; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/StatusBar.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/StatusBar.java similarity index 98% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/elements/StatusBar.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/StatusBar.java index 214492df2..a3fcf7126 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/StatusBar.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/StatusBar.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.elements; +package org.quiltmc.enigma.gui.element; import java.awt.BorderLayout; import java.awt.Component; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/TooltipPanel.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/TooltipPanel.java similarity index 83% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/elements/TooltipPanel.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/TooltipPanel.java index e74092183..458567fde 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/elements/TooltipPanel.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/element/TooltipPanel.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.elements; +package org.quiltmc.enigma.gui.element; -import cuchaz.enigma.gui.GuiController; -import cuchaz.enigma.stats.StatType; -import cuchaz.enigma.stats.StatsGenerator; -import cuchaz.enigma.stats.StatsResult; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.gui.GuiController; +import org.quiltmc.enigma.stats.StatType; +import org.quiltmc.enigma.stats.StatsGenerator; +import org.quiltmc.enigma.stats.StatsResult; +import org.quiltmc.enigma.util.I18n; import javax.swing.JPanel; import java.awt.event.InputEvent; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/events/ConvertingTextFieldListener.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/event/ConvertingTextFieldListener.java similarity index 74% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/events/ConvertingTextFieldListener.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/event/ConvertingTextFieldListener.java index d9ec95c2f..46c61c143 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/events/ConvertingTextFieldListener.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/event/ConvertingTextFieldListener.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.gui.events; +package org.quiltmc.enigma.gui.event; -import cuchaz.enigma.gui.elements.ConvertingTextField; +import org.quiltmc.enigma.gui.element.ConvertingTextField; public interface ConvertingTextFieldListener { default void onStartEditing(ConvertingTextField field) { diff --git a/enigma-swing/src/main/java/org/quiltmc/enigma/gui/event/EditorActionListener.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/event/EditorActionListener.java new file mode 100644 index 000000000..d48e8303c --- /dev/null +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/event/EditorActionListener.java @@ -0,0 +1,18 @@ +package org.quiltmc.enigma.gui.event; + +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.classhandle.ClassHandle; +import org.quiltmc.enigma.gui.panel.EditorPanel; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; + +public interface EditorActionListener { + default void onCursorReferenceChanged(EditorPanel editor, EntryReference, Entry> ref) { + } + + default void onClassHandleChanged(EditorPanel editor, ClassEntry old, ClassHandle ch) { + } + + default void onTitleChanged(EditorPanel editor, String title) { + } +} diff --git a/enigma-swing/src/main/java/org/quiltmc/enigma/gui/event/ThemeChangeListener.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/event/ThemeChangeListener.java new file mode 100644 index 000000000..997b7a26a --- /dev/null +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/event/ThemeChangeListener.java @@ -0,0 +1,11 @@ +package org.quiltmc.enigma.gui.event; + +import org.quiltmc.enigma.gui.config.LookAndFeel; +import org.quiltmc.enigma.gui.highlight.BoxHighlightPainter; +import org.quiltmc.enigma.source.RenamableTokenType; + +import java.util.Map; + +public interface ThemeChangeListener { + void onThemeChanged(LookAndFeel lookAndFeel, Map boxHighlightPainters); +} diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/highlight/BoxHighlightPainter.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/highlight/BoxHighlightPainter.java similarity index 97% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/highlight/BoxHighlightPainter.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/highlight/BoxHighlightPainter.java index 440037824..f390eaf71 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/highlight/BoxHighlightPainter.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/highlight/BoxHighlightPainter.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.highlight; +package org.quiltmc.enigma.gui.highlight; import java.awt.Color; import java.awt.Graphics; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/highlight/SelectionHighlightPainter.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/highlight/SelectionHighlightPainter.java similarity index 89% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/highlight/SelectionHighlightPainter.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/highlight/SelectionHighlightPainter.java index 3c0828c49..32a7c314c 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/highlight/SelectionHighlightPainter.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/highlight/SelectionHighlightPainter.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.gui.highlight; +package org.quiltmc.enigma.gui.highlight; -import cuchaz.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.config.UiConfig; import java.awt.BasicStroke; import java.awt.Graphics; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/node/ClassSelectorClassNode.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/node/ClassSelectorClassNode.java similarity index 88% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/node/ClassSelectorClassNode.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/node/ClassSelectorClassNode.java index 3da6ffef0..505d8e666 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/node/ClassSelectorClassNode.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/node/ClassSelectorClassNode.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.gui.node; - -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.gui.ClassSelector; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.stats.StatsGenerator; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +package org.quiltmc.enigma.gui.node; + +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.gui.ClassSelector; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.stats.StatsGenerator; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import javax.swing.SwingUtilities; import javax.swing.SwingWorker; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/node/ClassSelectorPackageNode.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/node/ClassSelectorPackageNode.java similarity index 83% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/node/ClassSelectorPackageNode.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/node/ClassSelectorPackageNode.java index 7bca42174..6f21339c9 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/node/ClassSelectorPackageNode.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/node/ClassSelectorPackageNode.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.gui.node; +package org.quiltmc.enigma.gui.node; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import javax.swing.tree.TreeNode; import java.util.Comparator; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/node/SortedMutableTreeNode.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/node/SortedMutableTreeNode.java similarity index 98% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/node/SortedMutableTreeNode.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/node/SortedMutableTreeNode.java index b0cc9d425..87bd97ffa 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/node/SortedMutableTreeNode.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/node/SortedMutableTreeNode.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.node; +package org.quiltmc.enigma.gui.node; import com.google.common.collect.Iterables; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/ClosableTabTitlePane.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/panel/ClosableTabTitlePane.java similarity index 97% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/panels/ClosableTabTitlePane.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/panel/ClosableTabTitlePane.java index 4342d2305..137bd9b77 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/ClosableTabTitlePane.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/panel/ClosableTabTitlePane.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.gui.panels; +package org.quiltmc.enigma.gui.panel; -import cuchaz.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.GuiUtil; import javax.accessibility.AccessibleContext; import javax.swing.JButton; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/panel/EditorPanel.java similarity index 92% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/panel/EditorPanel.java index 05c45456b..edc3a1c02 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/panel/EditorPanel.java @@ -1,36 +1,36 @@ -package cuchaz.enigma.gui.panels; - -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.classhandle.ClassHandle; -import cuchaz.enigma.classhandle.ClassHandleError; -import cuchaz.enigma.events.ClassHandleListener; -import cuchaz.enigma.gui.BrowserCaret; -import cuchaz.enigma.gui.EditableType; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.GuiController; -import cuchaz.enigma.gui.config.LookAndFeel; -import cuchaz.enigma.gui.config.Themes; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.config.keybind.KeyBinds; -import cuchaz.enigma.gui.elements.EditorPopupMenu; -import cuchaz.enigma.gui.elements.NavigatorPanel; -import cuchaz.enigma.gui.events.EditorActionListener; -import cuchaz.enigma.gui.events.ThemeChangeListener; -import cuchaz.enigma.gui.highlight.BoxHighlightPainter; -import cuchaz.enigma.gui.highlight.SelectionHighlightPainter; -import cuchaz.enigma.gui.util.GridBagConstraintsBuilder; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.source.DecompiledClassSource; -import cuchaz.enigma.source.RenamableTokenType; -import cuchaz.enigma.source.Token; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.mapping.ResolutionStrategy; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.Result; +package org.quiltmc.enigma.gui.panel; + +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.classhandle.ClassHandle; +import org.quiltmc.enigma.classhandle.ClassHandleError; +import org.quiltmc.enigma.event.ClassHandleListener; +import org.quiltmc.enigma.gui.BrowserCaret; +import org.quiltmc.enigma.gui.EditableType; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.GuiController; +import org.quiltmc.enigma.gui.config.LookAndFeel; +import org.quiltmc.enigma.gui.config.Themes; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.config.keybind.KeyBinds; +import org.quiltmc.enigma.gui.element.EditorPopupMenu; +import org.quiltmc.enigma.gui.element.NavigatorPanel; +import org.quiltmc.enigma.gui.event.EditorActionListener; +import org.quiltmc.enigma.gui.event.ThemeChangeListener; +import org.quiltmc.enigma.gui.highlight.BoxHighlightPainter; +import org.quiltmc.enigma.gui.highlight.SelectionHighlightPainter; +import org.quiltmc.enigma.gui.util.GridBagConstraintsBuilder; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.source.DecompiledClassSource; +import org.quiltmc.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.source.Token; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.mapping.ResolutionStrategy; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.Result; import org.tinylog.Logger; import java.awt.Color; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/IdentifierPanel.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/panel/IdentifierPanel.java similarity index 90% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/panels/IdentifierPanel.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/panel/IdentifierPanel.java index e088fb486..fc8fec88f 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/IdentifierPanel.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/panel/IdentifierPanel.java @@ -1,20 +1,20 @@ -package cuchaz.enigma.gui.panels; - -import cuchaz.enigma.gui.EditableType; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.elements.ConvertingTextField; -import cuchaz.enigma.gui.events.ConvertingTextFieldListener; -import cuchaz.enigma.gui.util.GridBagConstraintsBuilder; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.gui.util.ScaleUtil; -import cuchaz.enigma.translation.mapping.EntryChange; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.validation.ValidationContext; +package org.quiltmc.enigma.gui.panel; + +import org.quiltmc.enigma.gui.EditableType; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.element.ConvertingTextField; +import org.quiltmc.enigma.gui.event.ConvertingTextFieldListener; +import org.quiltmc.enigma.gui.util.GridBagConstraintsBuilder; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.gui.util.ScaleUtil; +import org.quiltmc.enigma.translation.mapping.EntryChange; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.validation.ValidationContext; import java.awt.Component; import java.awt.Container; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/CallsTreeCellRenderer.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/CallsTreeCellRenderer.java similarity index 71% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/CallsTreeCellRenderer.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/CallsTreeCellRenderer.java index 3b0786b46..583bce83f 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/CallsTreeCellRenderer.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/CallsTreeCellRenderer.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.gui.renderer; - -import cuchaz.enigma.analysis.ClassReferenceTreeNode; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.analysis.FieldReferenceTreeNode; -import cuchaz.enigma.analysis.MethodReferenceTreeNode; -import cuchaz.enigma.analysis.ReferenceTreeNode; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.util.GuiUtil; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.gui.renderer; + +import org.quiltmc.enigma.analysis.ClassReferenceTreeNode; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.analysis.FieldReferenceTreeNode; +import org.quiltmc.enigma.analysis.MethodReferenceTreeNode; +import org.quiltmc.enigma.analysis.ReferenceTreeNode; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import javax.swing.JTree; import javax.swing.tree.DefaultTreeCellRenderer; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/ImplementationsTreeCellRenderer.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/ImplementationsTreeCellRenderer.java similarity index 74% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/ImplementationsTreeCellRenderer.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/ImplementationsTreeCellRenderer.java index 404f5cb29..ec6d1a14c 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/ImplementationsTreeCellRenderer.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/ImplementationsTreeCellRenderer.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.renderer; +package org.quiltmc.enigma.gui.renderer; -import cuchaz.enigma.analysis.ClassImplementationsTreeNode; -import cuchaz.enigma.analysis.MethodImplementationsTreeNode; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.analysis.ClassImplementationsTreeNode; +import org.quiltmc.enigma.analysis.MethodImplementationsTreeNode; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.util.GuiUtil; import javax.swing.JTree; import javax.swing.tree.DefaultTreeCellRenderer; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/InheritanceTreeCellRenderer.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/InheritanceTreeCellRenderer.java similarity index 81% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/InheritanceTreeCellRenderer.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/InheritanceTreeCellRenderer.java index a0d0e1193..a75bfdf27 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/InheritanceTreeCellRenderer.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/InheritanceTreeCellRenderer.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.gui.renderer; +package org.quiltmc.enigma.gui.renderer; -import cuchaz.enigma.analysis.ClassInheritanceTreeNode; -import cuchaz.enigma.analysis.MethodInheritanceTreeNode; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.UiConfig; -import cuchaz.enigma.gui.util.GuiUtil; +import org.quiltmc.enigma.analysis.ClassInheritanceTreeNode; +import org.quiltmc.enigma.analysis.MethodInheritanceTreeNode; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.util.GuiUtil; import java.awt.Component; import java.awt.Font; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/MessageListCellRenderer.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/MessageListCellRenderer.java similarity index 87% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/MessageListCellRenderer.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/MessageListCellRenderer.java index 3b4c542d6..7ab7c7a6d 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/MessageListCellRenderer.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/MessageListCellRenderer.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.gui.renderer; +package org.quiltmc.enigma.gui.renderer; -import cuchaz.enigma.network.ServerMessage; +import org.quiltmc.enigma.network.ServerMessage; import java.awt.Component; import javax.swing.DefaultListCellRenderer; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/StructureOptionListCellRenderer.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/StructureOptionListCellRenderer.java similarity index 80% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/StructureOptionListCellRenderer.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/StructureOptionListCellRenderer.java index 68bba0dc2..37e0d7719 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/renderer/StructureOptionListCellRenderer.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/StructureOptionListCellRenderer.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.gui.renderer; +package org.quiltmc.enigma.gui.renderer; -import cuchaz.enigma.analysis.StructureTreeOptions; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.analysis.StructureTreeOptions; +import org.quiltmc.enigma.util.I18n; import java.awt.Component; import javax.swing.DefaultListCellRenderer; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/TokenListCellRenderer.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/TokenListCellRenderer.java similarity index 87% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/TokenListCellRenderer.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/TokenListCellRenderer.java index f64362d9f..2bb38853f 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/TokenListCellRenderer.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/renderer/TokenListCellRenderer.java @@ -1,6 +1,7 @@ -package cuchaz.enigma.gui; +package org.quiltmc.enigma.gui.renderer; -import cuchaz.enigma.source.Token; +import org.quiltmc.enigma.gui.GuiController; +import org.quiltmc.enigma.source.Token; import javax.swing.DefaultListCellRenderer; import javax.swing.JLabel; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/search/SearchEntry.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/search/SearchEntry.java similarity index 81% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/search/SearchEntry.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/search/SearchEntry.java index 039a3e28d..7cb13d78f 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/search/SearchEntry.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/search/SearchEntry.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.gui.search; +package org.quiltmc.enigma.gui.search; -import cuchaz.enigma.gui.dialog.SearchDialog; +import org.quiltmc.enigma.gui.dialog.SearchDialog; import java.util.List; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/search/SearchUtil.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/search/SearchUtil.java similarity index 98% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/search/SearchUtil.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/search/SearchUtil.java index ff5330f0f..e4e2c75e6 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/search/SearchUtil.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/search/SearchUtil.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.gui.search; +package org.quiltmc.enigma.gui.search; -import cuchaz.enigma.gui.dialog.SearchDialog; -import cuchaz.enigma.utils.Pair; +import org.quiltmc.enigma.gui.dialog.SearchDialog; +import org.quiltmc.enigma.util.Pair; import java.util.ArrayList; import java.util.Arrays; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/AbstractListCellRenderer.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/AbstractListCellRenderer.java similarity index 98% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/util/AbstractListCellRenderer.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/AbstractListCellRenderer.java index cbce1c693..cf1bed210 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/AbstractListCellRenderer.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/AbstractListCellRenderer.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.util; +package org.quiltmc.enigma.gui.util; import java.awt.Component; import java.awt.event.MouseEvent; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/GridBagConstraintsBuilder.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/GridBagConstraintsBuilder.java similarity index 99% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/util/GridBagConstraintsBuilder.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/GridBagConstraintsBuilder.java index 2d8aa73e3..4040e3417 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/GridBagConstraintsBuilder.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/GridBagConstraintsBuilder.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.util; +package org.quiltmc.enigma.gui.util; import java.awt.GridBagConstraints; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/GuiUtil.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/GuiUtil.java similarity index 94% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/util/GuiUtil.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/GuiUtil.java index 7c4459de0..96cb6d6af 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/GuiUtil.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/GuiUtil.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.gui.util; +package org.quiltmc.enigma.gui.util; import com.formdev.flatlaf.extras.FlatSVGIcon; -import cuchaz.enigma.analysis.index.EntryIndex; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.config.LookAndFeel; -import cuchaz.enigma.stats.ProjectStatsResult; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.Os; +import org.quiltmc.enigma.analysis.index.EntryIndex; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.config.LookAndFeel; +import org.quiltmc.enigma.stats.ProjectStatsResult; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.Os; import javax.swing.Icon; import javax.swing.JComponent; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/History.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/History.java similarity index 96% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/util/History.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/History.java index 718ad6521..5d4e40db7 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/History.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/History.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.util; +package org.quiltmc.enigma.gui.util; import com.google.common.collect.Queues; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/LanguageChangeListener.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/LanguageChangeListener.java similarity index 75% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/util/LanguageChangeListener.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/LanguageChangeListener.java index 818e112bc..818a909b8 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/LanguageChangeListener.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/LanguageChangeListener.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.util; +package org.quiltmc.enigma.gui.util; public interface LanguageChangeListener { void retranslateUi(); diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/LanguageUtil.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/LanguageUtil.java similarity index 93% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/util/LanguageUtil.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/LanguageUtil.java index 30a91809f..b1fad330b 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/LanguageUtil.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/LanguageUtil.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.util; +package org.quiltmc.enigma.gui.util; import java.util.ArrayList; import java.util.List; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/PackageRenamer.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/PackageRenamer.java similarity index 94% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/util/PackageRenamer.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/PackageRenamer.java index 9f85deff4..553a1aa8a 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/PackageRenamer.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/PackageRenamer.java @@ -1,16 +1,16 @@ -package cuchaz.enigma.gui.util; +package org.quiltmc.enigma.gui.util; -import cuchaz.enigma.gui.ClassSelector; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.dialog.ProgressDialog; -import cuchaz.enigma.gui.docker.ClassesDocker; -import cuchaz.enigma.gui.docker.Docker; -import cuchaz.enigma.gui.node.ClassSelectorClassNode; -import cuchaz.enigma.gui.node.ClassSelectorPackageNode; -import cuchaz.enigma.translation.mapping.EntryChange; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.validation.Message; -import cuchaz.enigma.utils.validation.ValidationContext; +import org.quiltmc.enigma.gui.ClassSelector; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.dialog.ProgressDialog; +import org.quiltmc.enigma.gui.docker.ClassesDocker; +import org.quiltmc.enigma.gui.docker.Docker; +import org.quiltmc.enigma.gui.node.ClassSelectorClassNode; +import org.quiltmc.enigma.gui.node.ClassSelectorPackageNode; +import org.quiltmc.enigma.translation.mapping.EntryChange; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.validation.Message; +import org.quiltmc.enigma.util.validation.ValidationContext; import javax.swing.tree.TreeNode; import java.util.HashMap; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/ScaleChangeListener.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/ScaleChangeListener.java similarity index 75% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/util/ScaleChangeListener.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/ScaleChangeListener.java index 243f26fc5..23c4a4848 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/ScaleChangeListener.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/ScaleChangeListener.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.util; +package org.quiltmc.enigma.gui.util; @FunctionalInterface public interface ScaleChangeListener { diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/ScaleUtil.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/ScaleUtil.java similarity index 97% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/util/ScaleUtil.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/ScaleUtil.java index a7144fce2..948893b37 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/ScaleUtil.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/ScaleUtil.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.gui.util; +package org.quiltmc.enigma.gui.util; import com.github.swingdpi.UiDefaultsScaler; import com.github.swingdpi.plaf.BasicTweaker; import com.github.swingdpi.plaf.MetalTweaker; import com.github.swingdpi.plaf.NimbusTweaker; import com.github.swingdpi.plaf.WindowsTweaker; -import cuchaz.enigma.gui.config.UiConfig; +import org.quiltmc.enigma.gui.config.UiConfig; import org.quiltmc.syntaxpain.SyntaxpainConfiguration; import java.awt.Dimension; diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/SingleTreeSelectionModel.java b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/SingleTreeSelectionModel.java similarity index 88% rename from enigma-swing/src/main/java/cuchaz/enigma/gui/util/SingleTreeSelectionModel.java rename to enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/SingleTreeSelectionModel.java index 9d967b8cd..da09acc63 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/util/SingleTreeSelectionModel.java +++ b/enigma-swing/src/main/java/org/quiltmc/enigma/gui/util/SingleTreeSelectionModel.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.gui.util; +package org.quiltmc.enigma.gui.util; import javax.swing.tree.DefaultTreeSelectionModel; import javax.swing.tree.TreeSelectionModel; diff --git a/enigma-swing/src/test/java/cuchaz/enigma/TestPackageRename.java b/enigma-swing/src/test/java/cuchaz/enigma/TestPackageRename.java deleted file mode 100644 index 070c68c08..000000000 --- a/enigma-swing/src/test/java/cuchaz/enigma/TestPackageRename.java +++ /dev/null @@ -1,151 +0,0 @@ -package cuchaz.enigma; - -import cuchaz.enigma.gui.EditableType; -import cuchaz.enigma.gui.Gui; -import cuchaz.enigma.gui.docker.AllClassesDocker; -import cuchaz.enigma.gui.elements.ClassSelectorPopupMenu; -import cuchaz.enigma.gui.util.PackageRenamer; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.representation.entry.Entry; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledIf; - -import java.nio.file.Path; -import java.util.EnumSet; -import java.util.List; -import java.util.Set; -import java.util.concurrent.CountDownLatch; - -import static cuchaz.enigma.TestEntryFactory.*; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.notNullValue; - -@DisabledIf(value = "java.awt.GraphicsEnvironment#isHeadless", disabledReason = "headless environment") -public class TestPackageRename { - public static final Path JAR = TestUtil.obfJar("complete"); - public static final Path MAPPINGS = Path.of("src/test/resources/test_mappings"); - private static Translator deobfuscator; - - @Test - void testRemoveOnePackage() throws InterruptedException { - renamePackage("a/b/c", "a/c", PackageRenamer.Mode.REFACTOR); - - assertMapping(newClass("A"), newClass("a/c/A")); - assertMapping(newClass("B"), newClass("a/c/B")); - assertMapping(newClass("C"), newClass("a/c/C")); - assertMapping(newClass("D"), newClass("a/D")); - assertMapping(newClass("E"), newClass("E")); - } - - @Test - void testRemoveTwoPackages() throws InterruptedException { - renamePackage("a/b/c", "a", PackageRenamer.Mode.REFACTOR); - - assertMapping(newClass("A"), newClass("a/A")); - assertMapping(newClass("B"), newClass("a/B")); - assertMapping(newClass("C"), newClass("a/C")); - assertMapping(newClass("D"), newClass("a/D")); - assertMapping(newClass("E"), newClass("E")); - } - - @Test - void testPackageConservation() throws InterruptedException { - renamePackage("a/b", "a", PackageRenamer.Mode.REFACTOR); - - assertMapping(newClass("A"), newClass("a/c/A")); - assertMapping(newClass("B"), newClass("a/c/B")); - assertMapping(newClass("C"), newClass("a/C")); - assertMapping(newClass("D"), newClass("a/D")); - assertMapping(newClass("E"), newClass("E")); - } - - @Test - void testAppendOnePackage() throws InterruptedException { - renamePackage("a/b/c", "a/b/c/d", PackageRenamer.Mode.REFACTOR); - - assertMapping(newClass("A"), newClass("a/b/c/d/A")); - assertMapping(newClass("B"), newClass("a/b/c/d/B")); - assertMapping(newClass("C"), newClass("a/b/C")); - assertMapping(newClass("D"), newClass("a/D")); - assertMapping(newClass("E"), newClass("E")); - } - - @Test - void testSimpleRename() throws InterruptedException { - renamePackage("a/b/c", "a/b/d", PackageRenamer.Mode.REFACTOR); - - assertMapping(newClass("A"), newClass("a/b/d/A")); - assertMapping(newClass("B"), newClass("a/b/d/B")); - assertMapping(newClass("C"), newClass("a/b/C")); - assertMapping(newClass("D"), newClass("a/D")); - assertMapping(newClass("E"), newClass("E")); - } - - @Test - void testFirstPackageRename() throws InterruptedException { - renamePackage("a", "b", PackageRenamer.Mode.REFACTOR); - - assertMapping(newClass("A"), newClass("b/b/c/A")); - assertMapping(newClass("B"), newClass("b/b/c/B")); - assertMapping(newClass("C"), newClass("b/b/C")); - assertMapping(newClass("D"), newClass("b/D")); - assertMapping(newClass("E"), newClass("E")); - } - - @Test - void testPackageMove() throws InterruptedException { - renamePackage("a/b/c", "a/c", PackageRenamer.Mode.MOVE); - - assertMapping(newClass("A"), newClass("a/c/A")); - assertMapping(newClass("B"), newClass("a/c/B")); - assertMapping(newClass("C"), newClass("a/b/C")); - assertMapping(newClass("D"), newClass("a/D")); - assertMapping(newClass("E"), newClass("E")); - } - - private static void renamePackage(String packageName, String newName, PackageRenamer.Mode mode) throws InterruptedException { - ClassSelectorPopupMenu menu = setupMenu(); - assertBaseMappings(); - - CountDownLatch packageRenameLatch = new CountDownLatch(1); - menu.createPackageRenamer(mode).renamePackage(packageName, newName).thenRun(packageRenameLatch::countDown); - packageRenameLatch.await(); - } - - private static ClassSelectorPopupMenu setupMenu() throws InterruptedException { - Set editables = EnumSet.allOf(EditableType.class); - editables.addAll(List.of(EditableType.values())); - Gui gui = new Gui(EnigmaProfile.EMPTY, editables, false); - gui.setShowsProgressBars(false); - - CountDownLatch latch = new CountDownLatch(1); - gui.getController().openJar(JAR).thenRun(() -> gui.getController().openMappings(MappingFormat.ENIGMA_DIRECTORY, MAPPINGS).thenRun(latch::countDown)); - latch.await(); - - deobfuscator = gui.getController().getProject().getMapper().getDeobfuscator(); - return gui.getDockerManager().getDocker(AllClassesDocker.class).getPopupMenu(); - } - - private static void assertBaseMappings() { - // assert starting mappings - assertMapping(newClass("A"), newClass("a/b/c/A")); - assertMapping(newClass("B"), newClass("a/b/c/B")); - assertMapping(newClass("C"), newClass("a/b/C")); - assertMapping(newClass("D"), newClass("a/D")); - assertMapping(newClass("E"), newClass("E")); - } - - private static void assertMapping(Entry obf, Entry deobf) { - TranslateResult> result = deobfuscator.extendedTranslate(obf); - assertThat(result, is(notNullValue())); - assertThat(result.getValue(), is(deobf)); - - String deobfName = result.getValue().getName(); - if (deobfName != null) { - assertThat(deobfName, is(deobf.getName())); - } - } -} diff --git a/enigma-swing/src/test/java/org/quiltmc/enigma/TestPackageRename.java b/enigma-swing/src/test/java/org/quiltmc/enigma/TestPackageRename.java new file mode 100644 index 000000000..29a48713e --- /dev/null +++ b/enigma-swing/src/test/java/org/quiltmc/enigma/TestPackageRename.java @@ -0,0 +1,150 @@ +package org.quiltmc.enigma; + +import org.quiltmc.enigma.gui.EditableType; +import org.quiltmc.enigma.gui.Gui; +import org.quiltmc.enigma.gui.docker.AllClassesDocker; +import org.quiltmc.enigma.gui.element.ClassSelectorPopupMenu; +import org.quiltmc.enigma.gui.util.PackageRenamer; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIf; + +import java.nio.file.Path; +import java.util.EnumSet; +import java.util.List; +import java.util.Set; +import java.util.concurrent.CountDownLatch; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.notNullValue; + +@DisabledIf(value = "java.awt.GraphicsEnvironment#isHeadless", disabledReason = "headless environment") +public class TestPackageRename { + public static final Path JAR = TestUtil.obfJar("complete"); + public static final Path MAPPINGS = Path.of("src/test/resources/test_mappings"); + private static Translator deobfuscator; + + @Test + void testRemoveOnePackage() throws InterruptedException { + renamePackage("a/b/c", "a/c", PackageRenamer.Mode.REFACTOR); + + assertMapping(TestEntryFactory.newClass("A"), TestEntryFactory.newClass("a/c/A")); + assertMapping(TestEntryFactory.newClass("B"), TestEntryFactory.newClass("a/c/B")); + assertMapping(TestEntryFactory.newClass("C"), TestEntryFactory.newClass("a/c/C")); + assertMapping(TestEntryFactory.newClass("D"), TestEntryFactory.newClass("a/D")); + assertMapping(TestEntryFactory.newClass("E"), TestEntryFactory.newClass("E")); + } + + @Test + void testRemoveTwoPackages() throws InterruptedException { + renamePackage("a/b/c", "a", PackageRenamer.Mode.REFACTOR); + + assertMapping(TestEntryFactory.newClass("A"), TestEntryFactory.newClass("a/A")); + assertMapping(TestEntryFactory.newClass("B"), TestEntryFactory.newClass("a/B")); + assertMapping(TestEntryFactory.newClass("C"), TestEntryFactory.newClass("a/C")); + assertMapping(TestEntryFactory.newClass("D"), TestEntryFactory.newClass("a/D")); + assertMapping(TestEntryFactory.newClass("E"), TestEntryFactory.newClass("E")); + } + + @Test + void testPackageConservation() throws InterruptedException { + renamePackage("a/b", "a", PackageRenamer.Mode.REFACTOR); + + assertMapping(TestEntryFactory.newClass("A"), TestEntryFactory.newClass("a/c/A")); + assertMapping(TestEntryFactory.newClass("B"), TestEntryFactory.newClass("a/c/B")); + assertMapping(TestEntryFactory.newClass("C"), TestEntryFactory.newClass("a/C")); + assertMapping(TestEntryFactory.newClass("D"), TestEntryFactory.newClass("a/D")); + assertMapping(TestEntryFactory.newClass("E"), TestEntryFactory.newClass("E")); + } + + @Test + void testAppendOnePackage() throws InterruptedException { + renamePackage("a/b/c", "a/b/c/d", PackageRenamer.Mode.REFACTOR); + + assertMapping(TestEntryFactory.newClass("A"), TestEntryFactory.newClass("a/b/c/d/A")); + assertMapping(TestEntryFactory.newClass("B"), TestEntryFactory.newClass("a/b/c/d/B")); + assertMapping(TestEntryFactory.newClass("C"), TestEntryFactory.newClass("a/b/C")); + assertMapping(TestEntryFactory.newClass("D"), TestEntryFactory.newClass("a/D")); + assertMapping(TestEntryFactory.newClass("E"), TestEntryFactory.newClass("E")); + } + + @Test + void testSimpleRename() throws InterruptedException { + renamePackage("a/b/c", "a/b/d", PackageRenamer.Mode.REFACTOR); + + assertMapping(TestEntryFactory.newClass("A"), TestEntryFactory.newClass("a/b/d/A")); + assertMapping(TestEntryFactory.newClass("B"), TestEntryFactory.newClass("a/b/d/B")); + assertMapping(TestEntryFactory.newClass("C"), TestEntryFactory.newClass("a/b/C")); + assertMapping(TestEntryFactory.newClass("D"), TestEntryFactory.newClass("a/D")); + assertMapping(TestEntryFactory.newClass("E"), TestEntryFactory.newClass("E")); + } + + @Test + void testFirstPackageRename() throws InterruptedException { + renamePackage("a", "b", PackageRenamer.Mode.REFACTOR); + + assertMapping(TestEntryFactory.newClass("A"), TestEntryFactory.newClass("b/b/c/A")); + assertMapping(TestEntryFactory.newClass("B"), TestEntryFactory.newClass("b/b/c/B")); + assertMapping(TestEntryFactory.newClass("C"), TestEntryFactory.newClass("b/b/C")); + assertMapping(TestEntryFactory.newClass("D"), TestEntryFactory.newClass("b/D")); + assertMapping(TestEntryFactory.newClass("E"), TestEntryFactory.newClass("E")); + } + + @Test + void testPackageMove() throws InterruptedException { + renamePackage("a/b/c", "a/c", PackageRenamer.Mode.MOVE); + + assertMapping(TestEntryFactory.newClass("A"), TestEntryFactory.newClass("a/c/A")); + assertMapping(TestEntryFactory.newClass("B"), TestEntryFactory.newClass("a/c/B")); + assertMapping(TestEntryFactory.newClass("C"), TestEntryFactory.newClass("a/b/C")); + assertMapping(TestEntryFactory.newClass("D"), TestEntryFactory.newClass("a/D")); + assertMapping(TestEntryFactory.newClass("E"), TestEntryFactory.newClass("E")); + } + + private static void renamePackage(String packageName, String newName, PackageRenamer.Mode mode) throws InterruptedException { + ClassSelectorPopupMenu menu = setupMenu(); + assertBaseMappings(); + + CountDownLatch packageRenameLatch = new CountDownLatch(1); + menu.createPackageRenamer(mode).renamePackage(packageName, newName).thenRun(packageRenameLatch::countDown); + packageRenameLatch.await(); + } + + private static ClassSelectorPopupMenu setupMenu() throws InterruptedException { + Set editables = EnumSet.allOf(EditableType.class); + editables.addAll(List.of(EditableType.values())); + Gui gui = new Gui(EnigmaProfile.EMPTY, editables, false); + gui.setShowsProgressBars(false); + + CountDownLatch latch = new CountDownLatch(1); + gui.getController().openJar(JAR).thenRun(() -> gui.getController().openMappings(MappingFormat.ENIGMA_DIRECTORY, MAPPINGS).thenRun(latch::countDown)); + latch.await(); + + deobfuscator = gui.getController().getProject().getMapper().getDeobfuscator(); + return gui.getDockerManager().getDocker(AllClassesDocker.class).getPopupMenu(); + } + + private static void assertBaseMappings() { + // assert starting mappings + assertMapping(TestEntryFactory.newClass("A"), TestEntryFactory.newClass("a/b/c/A")); + assertMapping(TestEntryFactory.newClass("B"), TestEntryFactory.newClass("a/b/c/B")); + assertMapping(TestEntryFactory.newClass("C"), TestEntryFactory.newClass("a/b/C")); + assertMapping(TestEntryFactory.newClass("D"), TestEntryFactory.newClass("a/D")); + assertMapping(TestEntryFactory.newClass("E"), TestEntryFactory.newClass("E")); + } + + private static void assertMapping(Entry obf, Entry deobf) { + TranslateResult> result = deobfuscator.extendedTranslate(obf); + assertThat(result, is(notNullValue())); + assertThat(result.getValue(), is(deobf)); + + String deobfName = result.getValue().getName(); + if (deobfName != null) { + assertThat(deobfName, is(deobf.getName())); + } + } +} diff --git a/enigma/build.gradle b/enigma/build.gradle index eab6c6cce..ab61970cd 100644 --- a/enigma/build.gradle +++ b/enigma/build.gradle @@ -40,12 +40,27 @@ task generateVersionFile { sourceSets.main.output.dir genOutputDir, builtBy: generateVersionFile +static String convertToGradleTaskName(String name) { + String newName = new String(name); + + for (int i = 0; i < name.length(); i++) { + if (name.charAt(i) == '_') { + var toReplace = '_' + name.charAt(i + 1) + var newChar = name.charAt(i + 1).toUpperCase().toString() + newName = newName.replace(toReplace, newChar) + } + } + + return newName +} + // Generate obfuscated JARs for tests // If your test fails for class file version problem with proguard, run gradle with -Dorg.gradle.java.home="" flag def registerTestJarTasks(String name, String... input) { + String taskName = convertToGradleTaskName(name) def libraryJarsArg = "/jmods/java.base.jmod(!**.jar;!module-info.class)" - tasks.register("${name}TestJar", Jar.class) { + tasks.register("${taskName}TestJar", Jar.class) { group("test-setup") from(sourceSets.test.output) { include input @@ -60,9 +75,9 @@ def registerTestJarTasks(String name, String... input) { confFile = "src/test/resources/proguard-$name-test.conf" } - tasks.register("${name}TestObf", JavaExec.class) { + tasks.register("${taskName}TestObf", JavaExec.class) { group("test-setup") - dependsOn("${name}TestJar") + dependsOn("${taskName}TestJar") mainClass = 'proguard.ProGuard' classpath configurations.proGuard @@ -73,13 +88,15 @@ def registerTestJarTasks(String name, String... input) { } } -registerTestJarTasks("complete", "cuchaz/enigma/inputs/**/*.class") +registerTestJarTasks("complete", "org/quiltmc/enigma/input/**/*.class") test.dependsOn("completeTestObf") -file('src/test/java/cuchaz/enigma/inputs').listFiles().each { f -> +file('src/test/java/org/quiltmc/enigma/input').listFiles().each { f -> if (f.directory) { - registerTestJarTasks(f.name, "cuchaz/enigma/inputs/$f.name/**/*.class", "cuchaz/enigma/inputs/Keep.class") - test.dependsOn("${f.name}TestObf") + String taskName = convertToGradleTaskName(f.name) + + registerTestJarTasks(f.name, "org/quiltmc/enigma/input/$f.name/**/*.class", "org/quiltmc/enigma/input/Keep.class") + test.dependsOn("${taskName}TestObf") } } diff --git a/enigma/src/main/java/cuchaz/enigma/api/EnigmaPluginContext.java b/enigma/src/main/java/cuchaz/enigma/api/EnigmaPluginContext.java deleted file mode 100644 index a59051adf..000000000 --- a/enigma/src/main/java/cuchaz/enigma/api/EnigmaPluginContext.java +++ /dev/null @@ -1,9 +0,0 @@ -package cuchaz.enigma.api; - -import cuchaz.enigma.api.service.EnigmaService; -import cuchaz.enigma.api.service.EnigmaServiceFactory; -import cuchaz.enigma.api.service.EnigmaServiceType; - -public interface EnigmaPluginContext { - void registerService(String id, EnigmaServiceType serviceType, EnigmaServiceFactory factory); -} diff --git a/enigma/src/main/java/cuchaz/enigma/api/service/EnigmaService.java b/enigma/src/main/java/cuchaz/enigma/api/service/EnigmaService.java deleted file mode 100644 index 526dda776..000000000 --- a/enigma/src/main/java/cuchaz/enigma/api/service/EnigmaService.java +++ /dev/null @@ -1,4 +0,0 @@ -package cuchaz.enigma.api.service; - -public interface EnigmaService { -} diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/DefEntry.java b/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/DefEntry.java deleted file mode 100644 index 82536c735..000000000 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/DefEntry.java +++ /dev/null @@ -1,7 +0,0 @@ -package cuchaz.enigma.translation.representation.entry; - -import cuchaz.enigma.translation.representation.AccessFlags; - -public interface DefEntry

> extends Entry

{ - AccessFlags getAccess(); -} diff --git a/enigma/src/main/java/cuchaz/enigma/Enigma.java b/enigma/src/main/java/org/quiltmc/enigma/Enigma.java similarity index 85% rename from enigma/src/main/java/cuchaz/enigma/Enigma.java rename to enigma/src/main/java/org/quiltmc/enigma/Enigma.java index aa05f93bc..2ea589572 100644 --- a/enigma/src/main/java/cuchaz/enigma/Enigma.java +++ b/enigma/src/main/java/org/quiltmc/enigma/Enigma.java @@ -1,20 +1,20 @@ -package cuchaz.enigma; - -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.api.EnigmaPlugin; -import cuchaz.enigma.api.EnigmaPluginContext; -import cuchaz.enigma.api.service.EnigmaService; -import cuchaz.enigma.api.service.EnigmaServiceContext; -import cuchaz.enigma.api.service.EnigmaServiceFactory; -import cuchaz.enigma.api.service.EnigmaServiceType; -import cuchaz.enigma.api.service.JarIndexerService; -import cuchaz.enigma.classprovider.CachingClassProvider; -import cuchaz.enigma.classprovider.ClassProvider; -import cuchaz.enigma.classprovider.CombiningClassProvider; -import cuchaz.enigma.classprovider.JarClassProvider; -import cuchaz.enigma.classprovider.ObfuscationFixClassProvider; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.Utils; +package org.quiltmc.enigma; + +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.api.EnigmaPlugin; +import org.quiltmc.enigma.api.EnigmaPluginContext; +import org.quiltmc.enigma.api.service.EnigmaService; +import org.quiltmc.enigma.api.service.EnigmaServiceContext; +import org.quiltmc.enigma.api.service.EnigmaServiceFactory; +import org.quiltmc.enigma.api.service.EnigmaServiceType; +import org.quiltmc.enigma.api.service.JarIndexerService; +import org.quiltmc.enigma.classprovider.CachingClassProvider; +import org.quiltmc.enigma.classprovider.ClassProvider; +import org.quiltmc.enigma.classprovider.CombiningClassProvider; +import org.quiltmc.enigma.classprovider.JarClassProvider; +import org.quiltmc.enigma.classprovider.ObfuscationFixClassProvider; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.Utils; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableListMultimap; import org.objectweb.asm.Opcodes; diff --git a/enigma/src/main/java/cuchaz/enigma/EnigmaProfile.java b/enigma/src/main/java/org/quiltmc/enigma/EnigmaProfile.java similarity index 95% rename from enigma/src/main/java/cuchaz/enigma/EnigmaProfile.java rename to enigma/src/main/java/org/quiltmc/enigma/EnigmaProfile.java index 58925fc57..0573539a4 100644 --- a/enigma/src/main/java/cuchaz/enigma/EnigmaProfile.java +++ b/enigma/src/main/java/org/quiltmc/enigma/EnigmaProfile.java @@ -1,4 +1,4 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; import com.google.common.collect.ImmutableMap; import com.google.gson.Gson; @@ -10,9 +10,9 @@ import com.google.gson.JsonParseException; import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; -import cuchaz.enigma.api.service.EnigmaServiceType; -import cuchaz.enigma.translation.mapping.serde.MappingFileNameFormat; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.api.service.EnigmaServiceType; +import org.quiltmc.enigma.translation.mapping.serde.MappingFileNameFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; import org.tinylog.Logger; import javax.annotation.Nullable; diff --git a/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java b/enigma/src/main/java/org/quiltmc/enigma/EnigmaProject.java similarity index 89% rename from enigma/src/main/java/cuchaz/enigma/EnigmaProject.java rename to enigma/src/main/java/org/quiltmc/enigma/EnigmaProject.java index 5dc06bb8c..9d007e600 100644 --- a/enigma/src/main/java/cuchaz/enigma/EnigmaProject.java +++ b/enigma/src/main/java/org/quiltmc/enigma/EnigmaProject.java @@ -1,32 +1,32 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; import com.google.common.base.Functions; import com.google.common.base.Preconditions; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.analysis.index.EnclosingMethodIndex; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.api.service.NameProposalService; -import cuchaz.enigma.api.service.ObfuscationTestService; -import cuchaz.enigma.bytecode.translators.TranslationClassVisitor; -import cuchaz.enigma.classprovider.ClassProvider; -import cuchaz.enigma.classprovider.ObfuscationFixClassProvider; -import cuchaz.enigma.source.Decompiler; -import cuchaz.enigma.source.DecompilerService; -import cuchaz.enigma.source.SourceSettings; -import cuchaz.enigma.translation.ProposingTranslator; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.mapping.MappingsChecker; -import cuchaz.enigma.translation.mapping.tree.DeltaTrackingTree; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.I18n; -import cuchaz.enigma.utils.Pair; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.analysis.index.EnclosingMethodIndex; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.api.service.NameProposalService; +import org.quiltmc.enigma.api.service.ObfuscationTestService; +import org.quiltmc.enigma.bytecode.translator.TranslationClassVisitor; +import org.quiltmc.enigma.classprovider.ClassProvider; +import org.quiltmc.enigma.classprovider.ObfuscationFixClassProvider; +import org.quiltmc.enigma.source.Decompiler; +import org.quiltmc.enigma.source.DecompilerService; +import org.quiltmc.enigma.source.SourceSettings; +import org.quiltmc.enigma.translation.ProposingTranslator; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.mapping.MappingsChecker; +import org.quiltmc.enigma.translation.mapping.tree.DeltaTrackingTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.I18n; +import org.quiltmc.enigma.util.Pair; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.tree.ClassNode; import org.tinylog.Logger; diff --git a/enigma/src/main/java/cuchaz/enigma/EnigmaServices.java b/enigma/src/main/java/org/quiltmc/enigma/EnigmaServices.java similarity index 86% rename from enigma/src/main/java/cuchaz/enigma/EnigmaServices.java rename to enigma/src/main/java/org/quiltmc/enigma/EnigmaServices.java index 6a8bf2432..1c35ce199 100644 --- a/enigma/src/main/java/cuchaz/enigma/EnigmaServices.java +++ b/enigma/src/main/java/org/quiltmc/enigma/EnigmaServices.java @@ -1,8 +1,8 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; import com.google.common.collect.ImmutableListMultimap; -import cuchaz.enigma.api.service.EnigmaService; -import cuchaz.enigma.api.service.EnigmaServiceType; +import org.quiltmc.enigma.api.service.EnigmaService; +import org.quiltmc.enigma.api.service.EnigmaServiceType; import java.util.List; diff --git a/enigma/src/main/java/cuchaz/enigma/ProgressListener.java b/enigma/src/main/java/org/quiltmc/enigma/ProgressListener.java similarity index 92% rename from enigma/src/main/java/cuchaz/enigma/ProgressListener.java rename to enigma/src/main/java/org/quiltmc/enigma/ProgressListener.java index 634163fbe..d6839d162 100644 --- a/enigma/src/main/java/cuchaz/enigma/ProgressListener.java +++ b/enigma/src/main/java/org/quiltmc/enigma/ProgressListener.java @@ -1,4 +1,4 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; public interface ProgressListener { static ProgressListener none() { diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/AbstractClassTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/AbstractClassTreeNode.java similarity index 78% rename from enigma/src/main/java/cuchaz/enigma/analysis/AbstractClassTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/AbstractClassTreeNode.java index fe9690832..544cabe21 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/AbstractClassTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/AbstractClassTreeNode.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/AbstractMethodTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/AbstractMethodTreeNode.java similarity index 75% rename from enigma/src/main/java/cuchaz/enigma/analysis/AbstractMethodTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/AbstractMethodTreeNode.java index 3c2821ebc..c36f76c39 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/AbstractMethodTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/AbstractMethodTreeNode.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/Access.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/Access.java similarity index 87% rename from enigma/src/main/java/cuchaz/enigma/analysis/Access.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/Access.java index d54190ad2..ec6631476 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/Access.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/Access.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; -import cuchaz.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.AccessFlags; import java.lang.reflect.Modifier; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/BuiltinPlugin.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/BuiltinPlugin.java similarity index 87% rename from enigma/src/main/java/cuchaz/enigma/analysis/BuiltinPlugin.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/BuiltinPlugin.java index 1a9ef2ba2..4392848f0 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/BuiltinPlugin.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/BuiltinPlugin.java @@ -1,19 +1,19 @@ -package cuchaz.enigma.analysis; - -import cuchaz.enigma.Enigma; -import cuchaz.enigma.analysis.index.BridgeMethodIndex; -import cuchaz.enigma.api.EnigmaPlugin; -import cuchaz.enigma.api.EnigmaPluginContext; -import cuchaz.enigma.api.service.JarIndexerService; -import cuchaz.enigma.api.service.NameProposalService; -import cuchaz.enigma.source.DecompilerService; -import cuchaz.enigma.source.Decompilers; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.translation.representation.entry.ParentedEntry; +package org.quiltmc.enigma.analysis; + +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.analysis.index.BridgeMethodIndex; +import org.quiltmc.enigma.api.EnigmaPlugin; +import org.quiltmc.enigma.api.EnigmaPluginContext; +import org.quiltmc.enigma.api.service.JarIndexerService; +import org.quiltmc.enigma.api.service.NameProposalService; +import org.quiltmc.enigma.source.DecompilerService; +import org.quiltmc.enigma.source.Decompilers; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.representation.entry.ParentedEntry; import org.jetbrains.java.decompiler.util.Pair; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.FieldVisitor; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/ClassImplementationsTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/ClassImplementationsTreeNode.java similarity index 77% rename from enigma/src/main/java/cuchaz/enigma/analysis/ClassImplementationsTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/ClassImplementationsTreeNode.java index 18951f9b7..3cc4795f2 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/ClassImplementationsTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/ClassImplementationsTreeNode.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; -import cuchaz.enigma.analysis.index.InheritanceIndex; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.analysis.index.InheritanceIndex; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.util.ArrayList; import java.util.Collection; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/ClassInheritanceTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/ClassInheritanceTreeNode.java similarity index 84% rename from enigma/src/main/java/cuchaz/enigma/analysis/ClassInheritanceTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/ClassInheritanceTreeNode.java index 6c09c46ba..45a2fef3e 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/ClassInheritanceTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/ClassInheritanceTreeNode.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; -import cuchaz.enigma.analysis.index.InheritanceIndex; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.analysis.index.InheritanceIndex; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import java.util.ArrayList; import java.util.List; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/ClassReferenceTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/ClassReferenceTreeNode.java similarity index 84% rename from enigma/src/main/java/cuchaz/enigma/analysis/ClassReferenceTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/ClassReferenceTreeNode.java index 38d5bec24..fd2216207 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/ClassReferenceTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/ClassReferenceTreeNode.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; import com.google.common.collect.Sets; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.analysis.index.ReferenceIndex; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.analysis.index.ReferenceIndex; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.TreeNode; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/EntryReference.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/EntryReference.java similarity index 87% rename from enigma/src/main/java/cuchaz/enigma/analysis/EntryReference.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/EntryReference.java index 2e4cf0b09..d3d10034c 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/EntryReference.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/EntryReference.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.analysis; - -import cuchaz.enigma.translation.Translatable; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMap; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.analysis; + +import org.quiltmc.enigma.translation.Translatable; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMap; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.util.Arrays; import java.util.List; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/FieldReferenceTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/FieldReferenceTreeNode.java similarity index 82% rename from enigma/src/main/java/cuchaz/enigma/analysis/FieldReferenceTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/FieldReferenceTreeNode.java index e49dddb8a..bb51e3fd5 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/FieldReferenceTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/FieldReferenceTreeNode.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.analysis.index.ReferenceIndex; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.analysis.index.ReferenceIndex; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/IndexSimpleVerifier.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/IndexSimpleVerifier.java similarity index 91% rename from enigma/src/main/java/cuchaz/enigma/analysis/IndexSimpleVerifier.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/IndexSimpleVerifier.java index 55d72e155..9e74c5438 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/IndexSimpleVerifier.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/IndexSimpleVerifier.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.analysis; - -import cuchaz.enigma.Enigma; -import cuchaz.enigma.analysis.index.EntryIndex; -import cuchaz.enigma.analysis.index.InheritanceIndex; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +package org.quiltmc.enigma.analysis; + +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.analysis.index.EntryIndex; +import org.quiltmc.enigma.analysis.index.InheritanceIndex; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import org.objectweb.asm.Type; import org.objectweb.asm.tree.analysis.BasicValue; import org.objectweb.asm.tree.analysis.SimpleVerifier; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/IndexTreeBuilder.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/IndexTreeBuilder.java similarity index 84% rename from enigma/src/main/java/cuchaz/enigma/analysis/IndexTreeBuilder.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/IndexTreeBuilder.java index 1dd4bc6ad..9c2a89216 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/IndexTreeBuilder.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/IndexTreeBuilder.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.analysis; - -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.mapping.ResolutionStrategy; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.analysis; + +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.mapping.ResolutionStrategy; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.util.ArrayList; import java.util.Collection; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/InterpreterPair.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/InterpreterPair.java similarity index 98% rename from enigma/src/main/java/cuchaz/enigma/analysis/InterpreterPair.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/InterpreterPair.java index b39562e70..9a17c2841 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/InterpreterPair.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/InterpreterPair.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; -import cuchaz.enigma.Enigma; +import org.quiltmc.enigma.Enigma; import org.objectweb.asm.Type; import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.analysis.AnalyzerException; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/MethodImplementationsTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/MethodImplementationsTreeNode.java similarity index 80% rename from enigma/src/main/java/cuchaz/enigma/analysis/MethodImplementationsTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/MethodImplementationsTreeNode.java index 98488b26e..47c28a45a 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/MethodImplementationsTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/MethodImplementationsTreeNode.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.analysis; - -import cuchaz.enigma.analysis.index.EntryIndex; -import cuchaz.enigma.analysis.index.InheritanceIndex; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.analysis; + +import org.quiltmc.enigma.analysis.index.EntryIndex; +import org.quiltmc.enigma.analysis.index.InheritanceIndex; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.util.ArrayList; import java.util.Collection; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/MethodInheritanceTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/MethodInheritanceTreeNode.java similarity index 82% rename from enigma/src/main/java/cuchaz/enigma/analysis/MethodInheritanceTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/MethodInheritanceTreeNode.java index 251b890f0..86d2563ec 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/MethodInheritanceTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/MethodInheritanceTreeNode.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; -import cuchaz.enigma.analysis.index.EntryIndex; -import cuchaz.enigma.analysis.index.InheritanceIndex; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.analysis.index.EntryIndex; +import org.quiltmc.enigma.analysis.index.InheritanceIndex; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; public class MethodInheritanceTreeNode extends AbstractMethodTreeNode { private final boolean implemented; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/MethodNodeWithAction.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/MethodNodeWithAction.java similarity index 93% rename from enigma/src/main/java/cuchaz/enigma/analysis/MethodNodeWithAction.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/MethodNodeWithAction.java index cf6dbd733..5fed55f15 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/MethodNodeWithAction.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/MethodNodeWithAction.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; import org.objectweb.asm.tree.MethodNode; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/MethodReferenceTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/MethodReferenceTreeNode.java similarity index 85% rename from enigma/src/main/java/cuchaz/enigma/analysis/MethodReferenceTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/MethodReferenceTreeNode.java index ffcae53d1..c5a863c58 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/MethodReferenceTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/MethodReferenceTreeNode.java @@ -1,13 +1,13 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; import com.google.common.collect.Sets; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.analysis.index.ReferenceIndex; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.analysis.index.ReferenceIndex; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.TreeNode; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/ReferenceTargetType.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/ReferenceTargetType.java similarity index 92% rename from enigma/src/main/java/cuchaz/enigma/analysis/ReferenceTargetType.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/ReferenceTargetType.java index 6a4d20cb4..95ec56ae9 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/ReferenceTargetType.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/ReferenceTargetType.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; public abstract class ReferenceTargetType { public abstract Kind getKind(); diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/ReferenceTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/ReferenceTreeNode.java similarity index 65% rename from enigma/src/main/java/cuchaz/enigma/analysis/ReferenceTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/ReferenceTreeNode.java index b394ede7e..4be4abd8f 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/ReferenceTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/ReferenceTreeNode.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.Entry; public interface ReferenceTreeNode, C extends Entry> { /** diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/StructureTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/StructureTreeNode.java similarity index 88% rename from enigma/src/main/java/cuchaz/enigma/analysis/StructureTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/StructureTreeNode.java index a46836de3..9b3b161a5 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/StructureTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/StructureTreeNode.java @@ -1,18 +1,18 @@ -package cuchaz.enigma.analysis; - -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.api.service.NameProposalService; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.DefEntry; -import cuchaz.enigma.translation.representation.entry.FieldDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.translation.representation.entry.ParentedEntry; +package org.quiltmc.enigma.analysis; + +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.api.service.NameProposalService; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.DefEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.representation.entry.ParentedEntry; import javax.swing.tree.DefaultMutableTreeNode; import java.util.ArrayList; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/StructureTreeOptions.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/StructureTreeOptions.java similarity index 97% rename from enigma/src/main/java/cuchaz/enigma/analysis/StructureTreeOptions.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/StructureTreeOptions.java index 8094b7776..047ca189b 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/StructureTreeOptions.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/StructureTreeOptions.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.analysis; +package org.quiltmc.enigma.analysis; public record StructureTreeOptions( ObfuscationVisibility obfuscationVisibility, diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/index/BridgeMethodIndex.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/BridgeMethodIndex.java similarity index 92% rename from enigma/src/main/java/cuchaz/enigma/analysis/index/BridgeMethodIndex.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/index/BridgeMethodIndex.java index 99b84373a..39bcd2fa4 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/index/BridgeMethodIndex.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/BridgeMethodIndex.java @@ -1,13 +1,13 @@ -package cuchaz.enigma.analysis.index; +package org.quiltmc.enigma.analysis.index; import com.google.common.collect.Maps; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.ArgumentDescriptor; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.ArgumentDescriptor; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import javax.annotation.Nullable; import java.util.Collection; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/index/EnclosingMethodIndex.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/EnclosingMethodIndex.java similarity index 80% rename from enigma/src/main/java/cuchaz/enigma/analysis/index/EnclosingMethodIndex.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/index/EnclosingMethodIndex.java index 8d6d314ca..41940dbd8 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/index/EnclosingMethodIndex.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/EnclosingMethodIndex.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.analysis.index; +package org.quiltmc.enigma.analysis.index; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import javax.annotation.Nullable; import java.util.HashMap; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/index/EntryIndex.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/EntryIndex.java similarity index 80% rename from enigma/src/main/java/cuchaz/enigma/analysis/index/EntryIndex.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/index/EntryIndex.java index 5046bd4ac..17c78f3e9 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/index/EntryIndex.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/EntryIndex.java @@ -1,17 +1,17 @@ -package cuchaz.enigma.analysis.index; - -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldDefEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.analysis.index; + +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldDefEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import javax.annotation.Nullable; import java.util.Collection; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/index/IndexClassVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/IndexClassVisitor.java similarity index 82% rename from enigma/src/main/java/cuchaz/enigma/analysis/index/IndexClassVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/index/IndexClassVisitor.java index 87f926e85..a69e9f1ea 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/index/IndexClassVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/IndexClassVisitor.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.analysis.index; +package org.quiltmc.enigma.analysis.index; -import cuchaz.enigma.analysis.MethodNodeWithAction; -import cuchaz.enigma.translation.representation.ParameterAccessFlags; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.FieldDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.analysis.MethodNodeWithAction; +import org.quiltmc.enigma.translation.representation.ParameterAccessFlags; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.FieldVisitor; import org.objectweb.asm.MethodVisitor; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/index/IndexReferenceVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/IndexReferenceVisitor.java similarity index 89% rename from enigma/src/main/java/cuchaz/enigma/analysis/index/IndexReferenceVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/index/IndexReferenceVisitor.java index 811a426d2..5f4213d8f 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/index/IndexReferenceVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/IndexReferenceVisitor.java @@ -1,18 +1,18 @@ -package cuchaz.enigma.analysis.index; - -import cuchaz.enigma.analysis.IndexSimpleVerifier; -import cuchaz.enigma.analysis.InterpreterPair; -import cuchaz.enigma.analysis.MethodNodeWithAction; -import cuchaz.enigma.analysis.ReferenceTargetType; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.Lambda; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.Signature; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.translation.representation.entry.ParentedEntry; +package org.quiltmc.enigma.analysis.index; + +import org.quiltmc.enigma.analysis.IndexSimpleVerifier; +import org.quiltmc.enigma.analysis.InterpreterPair; +import org.quiltmc.enigma.analysis.MethodNodeWithAction; +import org.quiltmc.enigma.analysis.ReferenceTargetType; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.Lambda; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.Signature; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.representation.entry.ParentedEntry; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.Handle; import org.objectweb.asm.MethodVisitor; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/index/InheritanceIndex.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/InheritanceIndex.java similarity index 94% rename from enigma/src/main/java/cuchaz/enigma/analysis/index/InheritanceIndex.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/index/InheritanceIndex.java index dcb46c8d8..6be94cd8c 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/index/InheritanceIndex.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/InheritanceIndex.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.analysis.index; +package org.quiltmc.enigma.analysis.index; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.Sets; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import java.util.Collection; import java.util.HashSet; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/index/JarIndex.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/JarIndex.java similarity index 88% rename from enigma/src/main/java/cuchaz/enigma/analysis/index/JarIndex.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/index/JarIndex.java index 8be4f724b..9f0905d77 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/index/JarIndex.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/JarIndex.java @@ -1,24 +1,24 @@ -package cuchaz.enigma.analysis.index; +package org.quiltmc.enigma.analysis.index; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.HashMultimap; import com.google.common.collect.ListMultimap; import com.google.common.collect.Multimap; -import cuchaz.enigma.Enigma; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.analysis.ReferenceTargetType; -import cuchaz.enigma.classprovider.ClassProvider; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.mapping.IndexEntryResolver; -import cuchaz.enigma.translation.representation.Lambda; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldDefEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.translation.representation.entry.ParentedEntry; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.analysis.ReferenceTargetType; +import org.quiltmc.enigma.classprovider.ClassProvider; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.mapping.IndexEntryResolver; +import org.quiltmc.enigma.translation.representation.Lambda; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldDefEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.representation.entry.ParentedEntry; +import org.quiltmc.enigma.util.I18n; import java.util.Collection; import java.util.HashSet; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/index/JarIndexer.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/JarIndexer.java similarity index 67% rename from enigma/src/main/java/cuchaz/enigma/analysis/index/JarIndexer.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/index/JarIndexer.java index 0b6271f66..cc59d6895 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/index/JarIndexer.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/JarIndexer.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.analysis.index; - -import cuchaz.enigma.analysis.ReferenceTargetType; -import cuchaz.enigma.translation.representation.Lambda; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.FieldDefEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.analysis.index; + +import org.quiltmc.enigma.analysis.ReferenceTargetType; +import org.quiltmc.enigma.translation.representation.Lambda; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldDefEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; public interface JarIndexer { default void indexClass(ClassDefEntry classEntry) { diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/index/PackageVisibilityIndex.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/PackageVisibilityIndex.java similarity index 90% rename from enigma/src/main/java/cuchaz/enigma/analysis/index/PackageVisibilityIndex.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/index/PackageVisibilityIndex.java index 545567f32..e8bb37d8d 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/index/PackageVisibilityIndex.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/PackageVisibilityIndex.java @@ -1,16 +1,16 @@ -package cuchaz.enigma.analysis.index; +package org.quiltmc.enigma.analysis.index; import com.google.common.collect.HashMultimap; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.analysis.ReferenceTargetType; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldDefEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.analysis.ReferenceTargetType; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldDefEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.util.ArrayList; import java.util.Collection; diff --git a/enigma/src/main/java/cuchaz/enigma/analysis/index/ReferenceIndex.java b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/ReferenceIndex.java similarity index 88% rename from enigma/src/main/java/cuchaz/enigma/analysis/index/ReferenceIndex.java rename to enigma/src/main/java/org/quiltmc/enigma/analysis/index/ReferenceIndex.java index dbe428288..be964af9c 100644 --- a/enigma/src/main/java/cuchaz/enigma/analysis/index/ReferenceIndex.java +++ b/enigma/src/main/java/org/quiltmc/enigma/analysis/index/ReferenceIndex.java @@ -1,19 +1,19 @@ -package cuchaz.enigma.analysis.index; +package org.quiltmc.enigma.analysis.index; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.analysis.ReferenceTargetType; -import cuchaz.enigma.translation.mapping.ResolutionStrategy; -import cuchaz.enigma.translation.representation.Lambda; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldDefEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.analysis.ReferenceTargetType; +import org.quiltmc.enigma.translation.mapping.ResolutionStrategy; +import org.quiltmc.enigma.translation.representation.Lambda; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldDefEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.util.Collection; import java.util.Map; diff --git a/enigma/src/main/java/cuchaz/enigma/api/EnigmaPlugin.java b/enigma/src/main/java/org/quiltmc/enigma/api/EnigmaPlugin.java similarity index 69% rename from enigma/src/main/java/cuchaz/enigma/api/EnigmaPlugin.java rename to enigma/src/main/java/org/quiltmc/enigma/api/EnigmaPlugin.java index bdd60150c..6b7a3417a 100644 --- a/enigma/src/main/java/cuchaz/enigma/api/EnigmaPlugin.java +++ b/enigma/src/main/java/org/quiltmc/enigma/api/EnigmaPlugin.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.api; +package org.quiltmc.enigma.api; public interface EnigmaPlugin { void init(EnigmaPluginContext ctx); diff --git a/enigma/src/main/java/org/quiltmc/enigma/api/EnigmaPluginContext.java b/enigma/src/main/java/org/quiltmc/enigma/api/EnigmaPluginContext.java new file mode 100644 index 000000000..dbe32d1aa --- /dev/null +++ b/enigma/src/main/java/org/quiltmc/enigma/api/EnigmaPluginContext.java @@ -0,0 +1,9 @@ +package org.quiltmc.enigma.api; + +import org.quiltmc.enigma.api.service.EnigmaService; +import org.quiltmc.enigma.api.service.EnigmaServiceFactory; +import org.quiltmc.enigma.api.service.EnigmaServiceType; + +public interface EnigmaPluginContext { + void registerService(String id, EnigmaServiceType serviceType, EnigmaServiceFactory factory); +} diff --git a/enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaService.java b/enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaService.java new file mode 100644 index 000000000..4045cdcb6 --- /dev/null +++ b/enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaService.java @@ -0,0 +1,4 @@ +package org.quiltmc.enigma.api.service; + +public interface EnigmaService { +} diff --git a/enigma/src/main/java/cuchaz/enigma/api/service/EnigmaServiceContext.java b/enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaServiceContext.java similarity index 89% rename from enigma/src/main/java/cuchaz/enigma/api/service/EnigmaServiceContext.java rename to enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaServiceContext.java index e3d9b3042..98c9743f9 100644 --- a/enigma/src/main/java/cuchaz/enigma/api/service/EnigmaServiceContext.java +++ b/enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaServiceContext.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.api.service; +package org.quiltmc.enigma.api.service; import java.nio.file.Path; import java.util.Optional; diff --git a/enigma/src/main/java/cuchaz/enigma/api/service/EnigmaServiceFactory.java b/enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaServiceFactory.java similarity index 72% rename from enigma/src/main/java/cuchaz/enigma/api/service/EnigmaServiceFactory.java rename to enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaServiceFactory.java index 7c10ac26a..9093673b1 100644 --- a/enigma/src/main/java/cuchaz/enigma/api/service/EnigmaServiceFactory.java +++ b/enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaServiceFactory.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.api.service; +package org.quiltmc.enigma.api.service; public interface EnigmaServiceFactory { T create(EnigmaServiceContext ctx); diff --git a/enigma/src/main/java/cuchaz/enigma/api/service/EnigmaServiceType.java b/enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaServiceType.java similarity index 93% rename from enigma/src/main/java/cuchaz/enigma/api/service/EnigmaServiceType.java rename to enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaServiceType.java index 3657dc871..0c7d08f72 100644 --- a/enigma/src/main/java/cuchaz/enigma/api/service/EnigmaServiceType.java +++ b/enigma/src/main/java/org/quiltmc/enigma/api/service/EnigmaServiceType.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.api.service; +package org.quiltmc.enigma.api.service; public final class EnigmaServiceType { public final String key; diff --git a/enigma/src/main/java/cuchaz/enigma/api/service/JarIndexerService.java b/enigma/src/main/java/org/quiltmc/enigma/api/service/JarIndexerService.java similarity index 77% rename from enigma/src/main/java/cuchaz/enigma/api/service/JarIndexerService.java rename to enigma/src/main/java/org/quiltmc/enigma/api/service/JarIndexerService.java index a48a4fe2d..32a23ed5d 100644 --- a/enigma/src/main/java/cuchaz/enigma/api/service/JarIndexerService.java +++ b/enigma/src/main/java/org/quiltmc/enigma/api/service/JarIndexerService.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.api.service; +package org.quiltmc.enigma.api.service; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.classprovider.ClassProvider; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.classprovider.ClassProvider; import org.objectweb.asm.ClassVisitor; import java.util.Set; diff --git a/enigma/src/main/java/cuchaz/enigma/api/service/NameProposalService.java b/enigma/src/main/java/org/quiltmc/enigma/api/service/NameProposalService.java similarity index 60% rename from enigma/src/main/java/cuchaz/enigma/api/service/NameProposalService.java rename to enigma/src/main/java/org/quiltmc/enigma/api/service/NameProposalService.java index 4c357db15..d32ab7ed9 100644 --- a/enigma/src/main/java/cuchaz/enigma/api/service/NameProposalService.java +++ b/enigma/src/main/java/org/quiltmc/enigma/api/service/NameProposalService.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.api.service; +package org.quiltmc.enigma.api.service; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.representation.entry.Entry; import java.util.Optional; diff --git a/enigma/src/main/java/cuchaz/enigma/api/service/ObfuscationTestService.java b/enigma/src/main/java/org/quiltmc/enigma/api/service/ObfuscationTestService.java similarity index 66% rename from enigma/src/main/java/cuchaz/enigma/api/service/ObfuscationTestService.java rename to enigma/src/main/java/org/quiltmc/enigma/api/service/ObfuscationTestService.java index af0cf30b2..ad85930f8 100644 --- a/enigma/src/main/java/cuchaz/enigma/api/service/ObfuscationTestService.java +++ b/enigma/src/main/java/org/quiltmc/enigma/api/service/ObfuscationTestService.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.api.service; +package org.quiltmc.enigma.api.service; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.Entry; public interface ObfuscationTestService extends EnigmaService { EnigmaServiceType TYPE = EnigmaServiceType.create("obfuscation_test"); diff --git a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/AsmObjectTranslator.java b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/AsmObjectTranslator.java similarity index 83% rename from enigma/src/main/java/cuchaz/enigma/bytecode/translators/AsmObjectTranslator.java rename to enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/AsmObjectTranslator.java index 4f51cf737..744605689 100644 --- a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/AsmObjectTranslator.java +++ b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/AsmObjectTranslator.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.bytecode.translators; - -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.bytecode.translator; + +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import org.objectweb.asm.Handle; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; diff --git a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/LocalVariableFixVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/LocalVariableFixVisitor.java similarity index 93% rename from enigma/src/main/java/cuchaz/enigma/bytecode/translators/LocalVariableFixVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/LocalVariableFixVisitor.java index 86a8b13c0..0cbb79614 100644 --- a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/LocalVariableFixVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/LocalVariableFixVisitor.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.bytecode.translators; +package org.quiltmc.enigma.bytecode.translator; import com.google.common.base.CharMatcher; -import cuchaz.enigma.translation.LocalNameGenerator; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.LocalNameGenerator; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.Label; import org.objectweb.asm.MethodVisitor; diff --git a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/SourceFixVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/SourceFixVisitor.java similarity index 82% rename from enigma/src/main/java/cuchaz/enigma/bytecode/translators/SourceFixVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/SourceFixVisitor.java index 8f3bd1ec1..57d056e5e 100644 --- a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/SourceFixVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/SourceFixVisitor.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.bytecode.translators; +package org.quiltmc.enigma.bytecode.translator; -import cuchaz.enigma.analysis.index.BridgeMethodIndex; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.analysis.index.BridgeMethodIndex; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.FieldVisitor; import org.objectweb.asm.MethodVisitor; diff --git a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationAnnotationVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationAnnotationVisitor.java similarity index 85% rename from enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationAnnotationVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationAnnotationVisitor.java index 5ecc31c58..d92527070 100644 --- a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationAnnotationVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationAnnotationVisitor.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.bytecode.translators; +package org.quiltmc.enigma.bytecode.translator; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; import org.objectweb.asm.AnnotationVisitor; public class TranslationAnnotationVisitor extends AnnotationVisitor { diff --git a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationClassVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationClassVisitor.java similarity index 90% rename from enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationClassVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationClassVisitor.java index 83d134899..b423fde8f 100644 --- a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationClassVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationClassVisitor.java @@ -1,13 +1,13 @@ -package cuchaz.enigma.bytecode.translators; - -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.bytecode.translator; + +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import org.objectweb.asm.AnnotationVisitor; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.FieldVisitor; diff --git a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationFieldVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationFieldVisitor.java similarity index 83% rename from enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationFieldVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationFieldVisitor.java index 44abe0230..537fdb377 100644 --- a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationFieldVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationFieldVisitor.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.bytecode.translators; +package org.quiltmc.enigma.bytecode.translator; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.FieldDefEntry; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.FieldDefEntry; import org.objectweb.asm.AnnotationVisitor; import org.objectweb.asm.FieldVisitor; import org.objectweb.asm.TypePath; diff --git a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationMethodVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationMethodVisitor.java similarity index 88% rename from enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationMethodVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationMethodVisitor.java index db1952a1d..80180d729 100644 --- a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationMethodVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationMethodVisitor.java @@ -1,15 +1,15 @@ -package cuchaz.enigma.bytecode.translators; - -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.Signature; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.bytecode.translator; + +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.Signature; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import org.objectweb.asm.AnnotationVisitor; import org.objectweb.asm.Handle; import org.objectweb.asm.Label; diff --git a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationRecordComponentVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationRecordComponentVisitor.java similarity index 87% rename from enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationRecordComponentVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationRecordComponentVisitor.java index eb8f4170f..65eda5a63 100644 --- a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationRecordComponentVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationRecordComponentVisitor.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.bytecode.translators; +package org.quiltmc.enigma.bytecode.translator; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; import org.objectweb.asm.AnnotationVisitor; import org.objectweb.asm.RecordComponentVisitor; import org.objectweb.asm.TypePath; diff --git a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationSignatureVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationSignatureVisitor.java similarity index 97% rename from enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationSignatureVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationSignatureVisitor.java index 8a884bdfe..03070323c 100644 --- a/enigma/src/main/java/cuchaz/enigma/bytecode/translators/TranslationSignatureVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/bytecode/translator/TranslationSignatureVisitor.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.bytecode.translators; +package org.quiltmc.enigma.bytecode.translator; -import cuchaz.enigma.Enigma; +import org.quiltmc.enigma.Enigma; import org.objectweb.asm.signature.SignatureVisitor; import java.util.Stack; diff --git a/enigma/src/main/java/cuchaz/enigma/classhandle/ClassHandle.java b/enigma/src/main/java/org/quiltmc/enigma/classhandle/ClassHandle.java similarity index 91% rename from enigma/src/main/java/cuchaz/enigma/classhandle/ClassHandle.java rename to enigma/src/main/java/org/quiltmc/enigma/classhandle/ClassHandle.java index f25cc8037..a4e6727ce 100644 --- a/enigma/src/main/java/cuchaz/enigma/classhandle/ClassHandle.java +++ b/enigma/src/main/java/org/quiltmc/enigma/classhandle/ClassHandle.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.classhandle; +package org.quiltmc.enigma.classhandle; -import cuchaz.enigma.events.ClassHandleListener; -import cuchaz.enigma.source.DecompiledClassSource; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.utils.Result; +import org.quiltmc.enigma.event.ClassHandleListener; +import org.quiltmc.enigma.source.DecompiledClassSource; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.util.Result; import java.util.concurrent.CompletableFuture; import javax.annotation.Nullable; diff --git a/enigma/src/main/java/cuchaz/enigma/classhandle/ClassHandleError.java b/enigma/src/main/java/org/quiltmc/enigma/classhandle/ClassHandleError.java similarity index 95% rename from enigma/src/main/java/cuchaz/enigma/classhandle/ClassHandleError.java rename to enigma/src/main/java/org/quiltmc/enigma/classhandle/ClassHandleError.java index 58a11071f..077d60edd 100644 --- a/enigma/src/main/java/cuchaz/enigma/classhandle/ClassHandleError.java +++ b/enigma/src/main/java/org/quiltmc/enigma/classhandle/ClassHandleError.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.classhandle; +package org.quiltmc.enigma.classhandle; import java.io.ByteArrayOutputStream; import java.io.PrintStream; diff --git a/enigma/src/main/java/cuchaz/enigma/classhandle/ClassHandleProvider.java b/enigma/src/main/java/org/quiltmc/enigma/classhandle/ClassHandleProvider.java similarity index 83% rename from enigma/src/main/java/cuchaz/enigma/classhandle/ClassHandleProvider.java rename to enigma/src/main/java/org/quiltmc/enigma/classhandle/ClassHandleProvider.java index a151d9cd4..aed76843c 100644 --- a/enigma/src/main/java/cuchaz/enigma/classhandle/ClassHandleProvider.java +++ b/enigma/src/main/java/org/quiltmc/enigma/classhandle/ClassHandleProvider.java @@ -1,18 +1,18 @@ -package cuchaz.enigma.classhandle; - -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.classprovider.CachingClassProvider; -import cuchaz.enigma.classprovider.ObfuscationFixClassProvider; -import cuchaz.enigma.events.ClassHandleListener; -import cuchaz.enigma.events.ClassHandleListener.InvalidationType; -import cuchaz.enigma.source.DecompiledClassSource; -import cuchaz.enigma.source.Decompiler; -import cuchaz.enigma.source.DecompilerService; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.source.SourceSettings; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.utils.Result; +package org.quiltmc.enigma.classhandle; + +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.classprovider.CachingClassProvider; +import org.quiltmc.enigma.classprovider.ObfuscationFixClassProvider; +import org.quiltmc.enigma.event.ClassHandleListener; +import org.quiltmc.enigma.source.DecompiledClassSource; +import org.quiltmc.enigma.source.Decompiler; +import org.quiltmc.enigma.source.DecompilerService; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.SourceSettings; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.util.Result; +import org.quiltmc.enigma.util.Utils; import java.util.ArrayList; import java.util.Collections; @@ -31,8 +31,6 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; import javax.annotation.Nullable; -import static cuchaz.enigma.utils.Utils.withLock; - public final class ClassHandleProvider { private final EnigmaProject project; @@ -62,7 +60,7 @@ public ClassHandleProvider(EnigmaProject project, DecompilerService ds) { public ClassHandle openClass(ClassEntry entry) { if (!this.project.getJarIndex().getEntryIndex().hasClass(entry)) return null; - return withLock(this.lock.writeLock(), () -> { + return Utils.withLock(this.lock.writeLock(), () -> { Entry e = this.handles.computeIfAbsent(entry, entry1 -> new Entry(this, entry1)); return e.createHandle(); }); @@ -82,7 +80,7 @@ public void setDecompilerService(DecompilerService ds) { this.ds = ds; this.decompiler = this.createDecompiler(); - withLock(this.lock.readLock(), () -> this.handles.values().forEach(Entry::invalidate)); + Utils.withLock(this.lock.readLock(), () -> this.handles.values().forEach(Entry::invalidate)); } /** @@ -103,7 +101,7 @@ private Decompiler createDecompiler() { * re-remapped. */ public void invalidateMapped() { - withLock(this.lock.readLock(), () -> this.handles.values().forEach(Entry::invalidateMapped)); + Utils.withLock(this.lock.readLock(), () -> this.handles.values().forEach(Entry::invalidateMapped)); } /** @@ -115,7 +113,7 @@ public void invalidateMapped() { * @param entry the class entry to invalidate */ public void invalidateMapped(ClassEntry entry) { - withLock(this.lock.readLock(), () -> { + Utils.withLock(this.lock.readLock(), () -> { Entry e = this.handles.get(entry); if (e != null) { e.invalidateMapped(); @@ -128,7 +126,7 @@ public void invalidateMapped(ClassEntry entry) { * re-remapped. */ public void invalidateJavadoc() { - withLock(this.lock.readLock(), () -> this.handles.values().forEach(Entry::invalidateJavadoc)); + Utils.withLock(this.lock.readLock(), () -> this.handles.values().forEach(Entry::invalidateJavadoc)); } /** @@ -138,7 +136,7 @@ public void invalidateJavadoc() { * @param entry the class entry to invalidate */ public void invalidateJavadoc(ClassEntry entry) { - withLock(this.lock.readLock(), () -> { + Utils.withLock(this.lock.readLock(), () -> { Entry e = this.handles.get(entry); if (e != null) { e.invalidateJavadoc(); @@ -151,7 +149,7 @@ public void invalidateJavadoc(ClassEntry entry) { } private void deleteEntry(Entry entry) { - withLock(this.lock.writeLock(), () -> this.handles.remove(entry.entry)); + Utils.withLock(this.lock.writeLock(), () -> this.handles.remove(entry.entry)); } /** @@ -171,7 +169,7 @@ public void destroy() { throw new RuntimeException(e); } - withLock(this.lock.writeLock(), () -> { + Utils.withLock(this.lock.writeLock(), () -> { this.handles.values().forEach(Entry::destroy); this.handles.clear(); }); @@ -204,7 +202,7 @@ private Entry(ClassHandleProvider p, ClassEntry entry) { public ClassHandleImpl createHandle() { ClassHandleImpl handle = new ClassHandleImpl(this); - withLock(this.lock.writeLock(), () -> this.handles.add(handle)); + Utils.withLock(this.lock.writeLock(), () -> this.handles.add(handle)); return handle; } @@ -218,25 +216,25 @@ private void checkDeobfRefForUpdate() { if (!Objects.equals(this.deobfRef, newDeobf)) { this.deobfRef = newDeobf; // copy the list so we don't call event listener code with the lock active - withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onDeobfRefChanged(newDeobf)); + Utils.withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onDeobfRefChanged(newDeobf)); } } public void invalidate() { this.checkDeobfRefForUpdate(); - withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onInvalidate(InvalidationType.FULL)); + Utils.withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onInvalidate(ClassHandleListener.InvalidationType.FULL)); this.continueMapSource(this.continueIndexSource(this.continueInsertJavadoc(this.decompile()))); } public void invalidateJavadoc() { this.checkDeobfRefForUpdate(); - withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onInvalidate(InvalidationType.JAVADOC)); + Utils.withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onInvalidate(ClassHandleListener.InvalidationType.JAVADOC)); this.continueMapSource(this.continueIndexSource(this.continueInsertJavadoc(CompletableFuture.completedFuture(this.uncommentedSource)))); } public void invalidateMapped() { this.checkDeobfRefForUpdate(); - withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onInvalidate(InvalidationType.MAPPINGS)); + Utils.withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onInvalidate(ClassHandleListener.InvalidationType.MAPPINGS)); this.continueMapSource(CompletableFuture.completedFuture(this.source)); } @@ -249,7 +247,7 @@ private CompletableFuture> decompile() { Entry.this.uncommentedSource = uncommentedSource; Entry.this.waitingUncommentedSources.forEach(f -> f.complete(uncommentedSource)); Entry.this.waitingUncommentedSources.clear(); - withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onUncommentedSourceChanged(uncommentedSource)); + Utils.withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onUncommentedSourceChanged(uncommentedSource)); return uncommentedSource; }, this.p.pool); } @@ -259,7 +257,7 @@ private CompletableFuture> continueInsertJavado return f.thenApplyAsync(res -> { if (res == null || this.javadocVersion.get() != v) return null; Result jdSource = res.map(s -> s.withJavadocs(this.p.project.getMapper())); - withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onDocsChanged(jdSource)); + Utils.withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onDocsChanged(jdSource)); return jdSource; }, this.p.pool); } @@ -288,13 +286,13 @@ private void continueMapSource(CompletableFuture s.complete(this.source)); Entry.this.waitingSources.clear(); - withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onMappedSourceChanged(this.source)); + Utils.withLock(this.lock.readLock(), () -> new ArrayList<>(this.handles)).forEach(h -> h.onMappedSourceChanged(this.source)); }); } public void closeHandle(ClassHandleImpl classHandle) { classHandle.destroy(); - withLock(this.lock.writeLock(), () -> { + Utils.withLock(this.lock.writeLock(), () -> { this.handles.remove(classHandle); if (this.handles.isEmpty()) { this.p.deleteEntry(this); @@ -303,7 +301,7 @@ public void closeHandle(ClassHandleImpl classHandle) { } public void destroy() { - withLock(this.lock.writeLock(), () -> { + Utils.withLock(this.lock.writeLock(), () -> { this.handles.forEach(ClassHandleImpl::destroy); this.handles.clear(); }); @@ -397,7 +395,7 @@ public void onMappedSourceChanged(Result l.onMappedSourceChanged(this, source)); } - public void onInvalidate(InvalidationType t) { + public void onInvalidate(ClassHandleListener.InvalidationType t) { this.listeners.forEach(l -> l.onInvalidate(this, t)); } diff --git a/enigma/src/main/java/cuchaz/enigma/classprovider/CachingClassProvider.java b/enigma/src/main/java/org/quiltmc/enigma/classprovider/CachingClassProvider.java similarity index 96% rename from enigma/src/main/java/cuchaz/enigma/classprovider/CachingClassProvider.java rename to enigma/src/main/java/org/quiltmc/enigma/classprovider/CachingClassProvider.java index 95da808a5..687713b60 100644 --- a/enigma/src/main/java/cuchaz/enigma/classprovider/CachingClassProvider.java +++ b/enigma/src/main/java/org/quiltmc/enigma/classprovider/CachingClassProvider.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.classprovider; +package org.quiltmc.enigma.classprovider; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; diff --git a/enigma/src/main/java/cuchaz/enigma/classprovider/ClassProvider.java b/enigma/src/main/java/org/quiltmc/enigma/classprovider/ClassProvider.java similarity index 96% rename from enigma/src/main/java/cuchaz/enigma/classprovider/ClassProvider.java rename to enigma/src/main/java/org/quiltmc/enigma/classprovider/ClassProvider.java index 2b20910e6..385dabff9 100644 --- a/enigma/src/main/java/cuchaz/enigma/classprovider/ClassProvider.java +++ b/enigma/src/main/java/org/quiltmc/enigma/classprovider/ClassProvider.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.classprovider; +package org.quiltmc.enigma.classprovider; import org.objectweb.asm.tree.ClassNode; diff --git a/enigma/src/main/java/cuchaz/enigma/classprovider/ClasspathClassProvider.java b/enigma/src/main/java/org/quiltmc/enigma/classprovider/ClasspathClassProvider.java similarity index 95% rename from enigma/src/main/java/cuchaz/enigma/classprovider/ClasspathClassProvider.java rename to enigma/src/main/java/org/quiltmc/enigma/classprovider/ClasspathClassProvider.java index cf15c2f78..6e2bc227b 100644 --- a/enigma/src/main/java/cuchaz/enigma/classprovider/ClasspathClassProvider.java +++ b/enigma/src/main/java/org/quiltmc/enigma/classprovider/ClasspathClassProvider.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.classprovider; +package org.quiltmc.enigma.classprovider; import org.objectweb.asm.ClassReader; import org.objectweb.asm.tree.ClassNode; diff --git a/enigma/src/main/java/cuchaz/enigma/classprovider/CombiningClassProvider.java b/enigma/src/main/java/org/quiltmc/enigma/classprovider/CombiningClassProvider.java similarity index 96% rename from enigma/src/main/java/cuchaz/enigma/classprovider/CombiningClassProvider.java rename to enigma/src/main/java/org/quiltmc/enigma/classprovider/CombiningClassProvider.java index 7ce96cb4e..61da61ce7 100644 --- a/enigma/src/main/java/cuchaz/enigma/classprovider/CombiningClassProvider.java +++ b/enigma/src/main/java/org/quiltmc/enigma/classprovider/CombiningClassProvider.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.classprovider; +package org.quiltmc.enigma.classprovider; import org.objectweb.asm.tree.ClassNode; diff --git a/enigma/src/main/java/cuchaz/enigma/classprovider/JarClassProvider.java b/enigma/src/main/java/org/quiltmc/enigma/classprovider/JarClassProvider.java similarity index 95% rename from enigma/src/main/java/cuchaz/enigma/classprovider/JarClassProvider.java rename to enigma/src/main/java/org/quiltmc/enigma/classprovider/JarClassProvider.java index f599732fb..c73fd34d1 100644 --- a/enigma/src/main/java/cuchaz/enigma/classprovider/JarClassProvider.java +++ b/enigma/src/main/java/org/quiltmc/enigma/classprovider/JarClassProvider.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.classprovider; +package org.quiltmc.enigma.classprovider; import com.google.common.collect.ImmutableSet; -import cuchaz.enigma.utils.AsmUtil; +import org.quiltmc.enigma.util.AsmUtil; import org.objectweb.asm.tree.ClassNode; import javax.annotation.Nullable; diff --git a/enigma/src/main/java/cuchaz/enigma/classprovider/ObfuscationFixClassProvider.java b/enigma/src/main/java/org/quiltmc/enigma/classprovider/ObfuscationFixClassProvider.java similarity index 92% rename from enigma/src/main/java/cuchaz/enigma/classprovider/ObfuscationFixClassProvider.java rename to enigma/src/main/java/org/quiltmc/enigma/classprovider/ObfuscationFixClassProvider.java index 3d5d653ec..cfa4e7a45 100644 --- a/enigma/src/main/java/cuchaz/enigma/classprovider/ObfuscationFixClassProvider.java +++ b/enigma/src/main/java/org/quiltmc/enigma/classprovider/ObfuscationFixClassProvider.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.classprovider; +package org.quiltmc.enigma.classprovider; -import cuchaz.enigma.Enigma; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.bytecode.translators.LocalVariableFixVisitor; -import cuchaz.enigma.bytecode.translators.SourceFixVisitor; +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.bytecode.translator.LocalVariableFixVisitor; +import org.quiltmc.enigma.bytecode.translator.SourceFixVisitor; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.AbstractInsnNode; diff --git a/enigma/src/main/java/cuchaz/enigma/config/ConfigContainer.java b/enigma/src/main/java/org/quiltmc/enigma/config/ConfigContainer.java similarity index 98% rename from enigma/src/main/java/cuchaz/enigma/config/ConfigContainer.java rename to enigma/src/main/java/org/quiltmc/enigma/config/ConfigContainer.java index e91980707..a1a7de302 100644 --- a/enigma/src/main/java/cuchaz/enigma/config/ConfigContainer.java +++ b/enigma/src/main/java/org/quiltmc/enigma/config/ConfigContainer.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.config; +package org.quiltmc.enigma.config; import org.tinylog.Logger; diff --git a/enigma/src/main/java/cuchaz/enigma/config/ConfigPaths.java b/enigma/src/main/java/org/quiltmc/enigma/config/ConfigPaths.java similarity index 93% rename from enigma/src/main/java/cuchaz/enigma/config/ConfigPaths.java rename to enigma/src/main/java/org/quiltmc/enigma/config/ConfigPaths.java index a242bbdd1..4f618166a 100644 --- a/enigma/src/main/java/cuchaz/enigma/config/ConfigPaths.java +++ b/enigma/src/main/java/org/quiltmc/enigma/config/ConfigPaths.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.config; +package org.quiltmc.enigma.config; -import cuchaz.enigma.utils.Os; +import org.quiltmc.enigma.util.Os; import java.nio.file.Path; import java.nio.file.Paths; diff --git a/enigma/src/main/java/cuchaz/enigma/config/ConfigSection.java b/enigma/src/main/java/org/quiltmc/enigma/config/ConfigSection.java similarity index 99% rename from enigma/src/main/java/cuchaz/enigma/config/ConfigSection.java rename to enigma/src/main/java/org/quiltmc/enigma/config/ConfigSection.java index 280d8f1da..cbd65a150 100644 --- a/enigma/src/main/java/cuchaz/enigma/config/ConfigSection.java +++ b/enigma/src/main/java/org/quiltmc/enigma/config/ConfigSection.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.config; +package org.quiltmc.enigma.config; import java.awt.Color; import java.util.Arrays; diff --git a/enigma/src/main/java/cuchaz/enigma/config/ConfigSerializer.java b/enigma/src/main/java/org/quiltmc/enigma/config/ConfigSerializer.java similarity index 99% rename from enigma/src/main/java/cuchaz/enigma/config/ConfigSerializer.java rename to enigma/src/main/java/org/quiltmc/enigma/config/ConfigSerializer.java index d42ec544f..6e419e11f 100644 --- a/enigma/src/main/java/cuchaz/enigma/config/ConfigSerializer.java +++ b/enigma/src/main/java/org/quiltmc/enigma/config/ConfigSerializer.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.config; +package org.quiltmc.enigma.config; import java.util.ArrayList; import java.util.Arrays; diff --git a/enigma/src/main/java/cuchaz/enigma/config/ConfigStructureVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/config/ConfigStructureVisitor.java similarity index 81% rename from enigma/src/main/java/cuchaz/enigma/config/ConfigStructureVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/config/ConfigStructureVisitor.java index 537431438..45f24ad2a 100644 --- a/enigma/src/main/java/cuchaz/enigma/config/ConfigStructureVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/config/ConfigStructureVisitor.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.config; +package org.quiltmc.enigma.config; public interface ConfigStructureVisitor { void visitKeyValue(String key, String value); diff --git a/enigma/src/main/java/cuchaz/enigma/events/ClassHandleListener.java b/enigma/src/main/java/org/quiltmc/enigma/event/ClassHandleListener.java similarity index 62% rename from enigma/src/main/java/cuchaz/enigma/events/ClassHandleListener.java rename to enigma/src/main/java/org/quiltmc/enigma/event/ClassHandleListener.java index 22be2e02f..de4d9a810 100644 --- a/enigma/src/main/java/cuchaz/enigma/events/ClassHandleListener.java +++ b/enigma/src/main/java/org/quiltmc/enigma/event/ClassHandleListener.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.events; - -import cuchaz.enigma.classhandle.ClassHandle; -import cuchaz.enigma.classhandle.ClassHandleError; -import cuchaz.enigma.source.DecompiledClassSource; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.utils.Result; +package org.quiltmc.enigma.event; + +import org.quiltmc.enigma.classhandle.ClassHandle; +import org.quiltmc.enigma.classhandle.ClassHandleError; +import org.quiltmc.enigma.source.DecompiledClassSource; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.util.Result; public interface ClassHandleListener { default void onDeobfRefChanged(ClassHandle h, ClassEntry deobfRef) { diff --git a/enigma/src/main/java/cuchaz/enigma/source/DecompiledClassSource.java b/enigma/src/main/java/org/quiltmc/enigma/source/DecompiledClassSource.java similarity index 86% rename from enigma/src/main/java/cuchaz/enigma/source/DecompiledClassSource.java rename to enigma/src/main/java/org/quiltmc/enigma/source/DecompiledClassSource.java index 057efafca..758f7c3cf 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/DecompiledClassSource.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/DecompiledClassSource.java @@ -1,18 +1,18 @@ -package cuchaz.enigma.source; - -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.EnigmaServices; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.api.service.NameProposalService; -import cuchaz.enigma.translation.LocalNameGenerator; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.mapping.ResolutionStrategy; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.LocalVariableDefEntry; +package org.quiltmc.enigma.source; + +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.EnigmaServices; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.api.service.NameProposalService; +import org.quiltmc.enigma.translation.LocalNameGenerator; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.mapping.ResolutionStrategy; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableDefEntry; import javax.annotation.Nullable; import java.util.Collection; diff --git a/enigma/src/main/java/cuchaz/enigma/source/Decompiler.java b/enigma/src/main/java/org/quiltmc/enigma/source/Decompiler.java similarity index 63% rename from enigma/src/main/java/cuchaz/enigma/source/Decompiler.java rename to enigma/src/main/java/org/quiltmc/enigma/source/Decompiler.java index 43eb3ef62..12d3397a4 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/Decompiler.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/Decompiler.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.source; +package org.quiltmc.enigma.source; -import cuchaz.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; import org.checkerframework.checker.nullness.qual.Nullable; public interface Decompiler { diff --git a/enigma/src/main/java/cuchaz/enigma/source/DecompilerService.java b/enigma/src/main/java/org/quiltmc/enigma/source/DecompilerService.java similarity index 52% rename from enigma/src/main/java/cuchaz/enigma/source/DecompilerService.java rename to enigma/src/main/java/org/quiltmc/enigma/source/DecompilerService.java index 00454978c..a8faa0155 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/DecompilerService.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/DecompilerService.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.source; +package org.quiltmc.enigma.source; -import cuchaz.enigma.classprovider.ClassProvider; -import cuchaz.enigma.api.service.EnigmaService; -import cuchaz.enigma.api.service.EnigmaServiceType; +import org.quiltmc.enigma.classprovider.ClassProvider; +import org.quiltmc.enigma.api.service.EnigmaService; +import org.quiltmc.enigma.api.service.EnigmaServiceType; public interface DecompilerService extends EnigmaService { EnigmaServiceType TYPE = EnigmaServiceType.create("decompiler"); diff --git a/enigma/src/main/java/cuchaz/enigma/source/Decompilers.java b/enigma/src/main/java/org/quiltmc/enigma/source/Decompilers.java similarity index 54% rename from enigma/src/main/java/cuchaz/enigma/source/Decompilers.java rename to enigma/src/main/java/org/quiltmc/enigma/source/Decompilers.java index b1c3bccc2..3aca2cd1f 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/Decompilers.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/Decompilers.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.source; +package org.quiltmc.enigma.source; -import cuchaz.enigma.source.bytecode.BytecodeDecompiler; -import cuchaz.enigma.source.cfr.CfrDecompiler; -import cuchaz.enigma.source.procyon.ProcyonDecompiler; -import cuchaz.enigma.source.vineflower.VineflowerDecompiler; +import org.quiltmc.enigma.source.bytecode.BytecodeDecompiler; +import org.quiltmc.enigma.source.cfr.CfrDecompiler; +import org.quiltmc.enigma.source.procyon.ProcyonDecompiler; +import org.quiltmc.enigma.source.vineflower.VineflowerDecompiler; public class Decompilers { public static final DecompilerService VINEFLOWER = VineflowerDecompiler::new; diff --git a/enigma/src/main/java/cuchaz/enigma/source/RenamableTokenType.java b/enigma/src/main/java/org/quiltmc/enigma/source/RenamableTokenType.java similarity index 70% rename from enigma/src/main/java/cuchaz/enigma/source/RenamableTokenType.java rename to enigma/src/main/java/org/quiltmc/enigma/source/RenamableTokenType.java index 9d3099610..b9c7d1786 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/RenamableTokenType.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/RenamableTokenType.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source; +package org.quiltmc.enigma.source; public enum RenamableTokenType { OBFUSCATED, diff --git a/enigma/src/main/java/cuchaz/enigma/source/Source.java b/enigma/src/main/java/org/quiltmc/enigma/source/Source.java similarity index 55% rename from enigma/src/main/java/cuchaz/enigma/source/Source.java rename to enigma/src/main/java/org/quiltmc/enigma/source/Source.java index fe4580554..246a0a834 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/Source.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/Source.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.source; +package org.quiltmc.enigma.source; -import cuchaz.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; public interface Source { String asString(); diff --git a/enigma/src/main/java/cuchaz/enigma/source/SourceIndex.java b/enigma/src/main/java/org/quiltmc/enigma/source/SourceIndex.java similarity index 94% rename from enigma/src/main/java/cuchaz/enigma/source/SourceIndex.java rename to enigma/src/main/java/org/quiltmc/enigma/source/SourceIndex.java index b6ef1aba6..03a4a7139 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/SourceIndex.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/SourceIndex.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.source; +package org.quiltmc.enigma.source; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.mapping.ResolutionStrategy; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.mapping.ResolutionStrategy; +import org.quiltmc.enigma.translation.representation.entry.Entry; import java.util.ArrayList; import java.util.Collection; diff --git a/enigma/src/main/java/cuchaz/enigma/source/SourceRemapper.java b/enigma/src/main/java/org/quiltmc/enigma/source/SourceRemapper.java similarity index 97% rename from enigma/src/main/java/cuchaz/enigma/source/SourceRemapper.java rename to enigma/src/main/java/org/quiltmc/enigma/source/SourceRemapper.java index 300efffb4..8c950c7a8 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/SourceRemapper.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/SourceRemapper.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source; +package org.quiltmc.enigma.source; import java.util.HashMap; import java.util.Map; diff --git a/enigma/src/main/java/cuchaz/enigma/source/SourceSettings.java b/enigma/src/main/java/org/quiltmc/enigma/source/SourceSettings.java similarity index 71% rename from enigma/src/main/java/cuchaz/enigma/source/SourceSettings.java rename to enigma/src/main/java/org/quiltmc/enigma/source/SourceSettings.java index 794f2236b..85cb6e8a4 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/SourceSettings.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/SourceSettings.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source; +package org.quiltmc.enigma.source; public record SourceSettings(boolean removeImports, boolean removeVariableFinal) { } diff --git a/enigma/src/main/java/cuchaz/enigma/source/Token.java b/enigma/src/main/java/org/quiltmc/enigma/source/Token.java similarity index 97% rename from enigma/src/main/java/cuchaz/enigma/source/Token.java rename to enigma/src/main/java/org/quiltmc/enigma/source/Token.java index 661f2351d..e29d557b4 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/Token.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/Token.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source; +package org.quiltmc.enigma.source; public class Token implements Comparable { public int start; diff --git a/enigma/src/main/java/cuchaz/enigma/source/TokenStore.java b/enigma/src/main/java/org/quiltmc/enigma/source/TokenStore.java similarity index 98% rename from enigma/src/main/java/cuchaz/enigma/source/TokenStore.java rename to enigma/src/main/java/org/quiltmc/enigma/source/TokenStore.java index 743bfabd8..dd655d198 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/TokenStore.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/TokenStore.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source; +package org.quiltmc.enigma.source; import java.util.Collections; import java.util.Comparator; diff --git a/enigma/src/main/java/cuchaz/enigma/source/bytecode/BytecodeDecompiler.java b/enigma/src/main/java/org/quiltmc/enigma/source/bytecode/BytecodeDecompiler.java similarity index 75% rename from enigma/src/main/java/cuchaz/enigma/source/bytecode/BytecodeDecompiler.java rename to enigma/src/main/java/org/quiltmc/enigma/source/bytecode/BytecodeDecompiler.java index f84c6d19a..21cf68af2 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/bytecode/BytecodeDecompiler.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/bytecode/BytecodeDecompiler.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.source.bytecode; +package org.quiltmc.enigma.source.bytecode; -import cuchaz.enigma.classprovider.ClassProvider; -import cuchaz.enigma.source.Decompiler; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.source.SourceSettings; -import cuchaz.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.classprovider.ClassProvider; +import org.quiltmc.enigma.source.Decompiler; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.source.SourceSettings; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; import org.checkerframework.checker.nullness.qual.Nullable; import org.objectweb.asm.tree.ClassNode; diff --git a/enigma/src/main/java/cuchaz/enigma/source/bytecode/BytecodeSource.java b/enigma/src/main/java/org/quiltmc/enigma/source/bytecode/BytecodeSource.java similarity index 86% rename from enigma/src/main/java/cuchaz/enigma/source/bytecode/BytecodeSource.java rename to enigma/src/main/java/org/quiltmc/enigma/source/bytecode/BytecodeSource.java index be275a032..6f69488fc 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/bytecode/BytecodeSource.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/bytecode/BytecodeSource.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.source.bytecode; +package org.quiltmc.enigma.source.bytecode; -import cuchaz.enigma.Enigma; -import cuchaz.enigma.bytecode.translators.TranslationClassVisitor; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.bytecode.translator.TranslationClassVisitor; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.util.TraceClassVisitor; diff --git a/enigma/src/main/java/cuchaz/enigma/source/bytecode/EnigmaTextifier.java b/enigma/src/main/java/org/quiltmc/enigma/source/bytecode/EnigmaTextifier.java similarity index 71% rename from enigma/src/main/java/cuchaz/enigma/source/bytecode/EnigmaTextifier.java rename to enigma/src/main/java/org/quiltmc/enigma/source/bytecode/EnigmaTextifier.java index 194649c0b..78c3955a7 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/bytecode/EnigmaTextifier.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/bytecode/EnigmaTextifier.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.source.bytecode; +package org.quiltmc.enigma.source.bytecode; -import cuchaz.enigma.Enigma; -import cuchaz.enigma.source.SourceIndex; +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.source.SourceIndex; import org.objectweb.asm.util.Textifier; public class EnigmaTextifier extends Textifier { diff --git a/enigma/src/main/java/cuchaz/enigma/source/cfr/CfrDecompiler.java b/enigma/src/main/java/org/quiltmc/enigma/source/cfr/CfrDecompiler.java similarity index 85% rename from enigma/src/main/java/cuchaz/enigma/source/cfr/CfrDecompiler.java rename to enigma/src/main/java/org/quiltmc/enigma/source/cfr/CfrDecompiler.java index 5cd5b9ee0..c20b0e972 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/cfr/CfrDecompiler.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/cfr/CfrDecompiler.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.source.cfr; +package org.quiltmc.enigma.source.cfr; -import cuchaz.enigma.classprovider.ClassProvider; -import cuchaz.enigma.source.Decompiler; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.source.SourceSettings; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.utils.AsmUtil; +import org.quiltmc.enigma.classprovider.ClassProvider; +import org.quiltmc.enigma.source.Decompiler; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.source.SourceSettings; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.util.AsmUtil; import org.benf.cfr.reader.apiunreleased.ClassFileSource2; import org.benf.cfr.reader.apiunreleased.JarContent; import org.benf.cfr.reader.bytecode.analysis.parse.utils.Pair; diff --git a/enigma/src/main/java/cuchaz/enigma/source/cfr/CfrSource.java b/enigma/src/main/java/org/quiltmc/enigma/source/cfr/CfrSource.java similarity index 92% rename from enigma/src/main/java/cuchaz/enigma/source/cfr/CfrSource.java rename to enigma/src/main/java/org/quiltmc/enigma/source/cfr/CfrSource.java index 7738b59ed..2c882906d 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/cfr/CfrSource.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/cfr/CfrSource.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.source.cfr; +package org.quiltmc.enigma.source.cfr; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.source.SourceSettings; -import cuchaz.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.SourceSettings; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; import org.benf.cfr.reader.apiunreleased.ClassFileSource2; import org.benf.cfr.reader.entities.ClassFile; import org.benf.cfr.reader.mapping.MappingFactory; diff --git a/enigma/src/main/java/cuchaz/enigma/source/cfr/EnigmaDumper.java b/enigma/src/main/java/org/quiltmc/enigma/source/cfr/EnigmaDumper.java similarity index 93% rename from enigma/src/main/java/cuchaz/enigma/source/cfr/EnigmaDumper.java rename to enigma/src/main/java/org/quiltmc/enigma/source/cfr/EnigmaDumper.java index ee8eceba6..3e7843b2f 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/cfr/EnigmaDumper.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/cfr/EnigmaDumper.java @@ -1,17 +1,17 @@ -package cuchaz.enigma.source.cfr; - -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.source.SourceSettings; -import cuchaz.enigma.source.Token; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.source.cfr; + +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.SourceSettings; +import org.quiltmc.enigma.source.Token; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import org.benf.cfr.reader.bytecode.analysis.loc.HasByteCodeLoc; import org.benf.cfr.reader.bytecode.analysis.types.JavaRefTypeInstance; import org.benf.cfr.reader.bytecode.analysis.types.JavaTypeInstance; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/EntryParser.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/EntryParser.java similarity index 76% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/EntryParser.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/EntryParser.java index ab1804e1b..de4f0df3b 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/EntryParser.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/EntryParser.java @@ -1,17 +1,17 @@ -package cuchaz.enigma.source.procyon; +package org.quiltmc.enigma.source.procyon; import com.strobel.assembler.metadata.FieldDefinition; import com.strobel.assembler.metadata.MethodDefinition; import com.strobel.assembler.metadata.TypeDefinition; import com.strobel.assembler.metadata.TypeReference; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.Signature; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.Signature; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; public class EntryParser { public static FieldDefEntry parse(FieldDefinition definition) { diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/ProcyonDecompiler.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/ProcyonDecompiler.java similarity index 80% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/ProcyonDecompiler.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/ProcyonDecompiler.java index dbe9a5dee..5b21f7817 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/ProcyonDecompiler.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/ProcyonDecompiler.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source.procyon; +package org.quiltmc.enigma.source.procyon; import com.strobel.assembler.metadata.ITypeLoader; import com.strobel.assembler.metadata.MetadataSystem; @@ -11,20 +11,20 @@ import com.strobel.decompiler.languages.java.ast.AstBuilder; import com.strobel.decompiler.languages.java.ast.CompilationUnit; import com.strobel.decompiler.languages.java.ast.InsertParenthesesVisitor; -import cuchaz.enigma.classprovider.ClassProvider; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.source.Decompiler; -import cuchaz.enigma.source.SourceSettings; -import cuchaz.enigma.source.procyon.transformers.AddJavadocsAstTransform; -import cuchaz.enigma.source.procyon.transformers.DropImportAstTransform; -import cuchaz.enigma.source.procyon.transformers.DropVarModifiersAstTransform; -import cuchaz.enigma.source.procyon.transformers.InvalidIdentifierFix; -import cuchaz.enigma.source.procyon.transformers.Java8Generics; -import cuchaz.enigma.source.procyon.transformers.ObfuscatedEnumSwitchRewriterTransform; -import cuchaz.enigma.source.procyon.transformers.RemoveObjectCasts; -import cuchaz.enigma.source.procyon.transformers.VarargsFixer; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.utils.AsmUtil; +import org.quiltmc.enigma.classprovider.ClassProvider; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.source.Decompiler; +import org.quiltmc.enigma.source.SourceSettings; +import org.quiltmc.enigma.source.procyon.transformer.AddJavadocsAstTransform; +import org.quiltmc.enigma.source.procyon.transformer.DropImportAstTransform; +import org.quiltmc.enigma.source.procyon.transformer.DropVarModifiersAstTransform; +import org.quiltmc.enigma.source.procyon.transformer.InvalidIdentifierFix; +import org.quiltmc.enigma.source.procyon.transformer.Java8Generics; +import org.quiltmc.enigma.source.procyon.transformer.ObfuscatedEnumSwitchRewriterTransform; +import org.quiltmc.enigma.source.procyon.transformer.RemoveObjectCasts; +import org.quiltmc.enigma.source.procyon.transformer.VarargsFixer; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.util.AsmUtil; import org.checkerframework.checker.nullness.qual.Nullable; import org.objectweb.asm.tree.ClassNode; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/ProcyonSource.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/ProcyonSource.java similarity index 78% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/ProcyonSource.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/ProcyonSource.java index e4404f995..fb1be7b56 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/ProcyonSource.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/ProcyonSource.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.source.procyon; +package org.quiltmc.enigma.source.procyon; import com.strobel.decompiler.DecompilerSettings; import com.strobel.decompiler.PlainTextOutput; import com.strobel.decompiler.languages.java.JavaOutputVisitor; import com.strobel.decompiler.languages.java.ast.CompilationUnit; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.source.procyon.index.SourceIndexVisitor; -import cuchaz.enigma.source.procyon.transformers.AddJavadocsAstTransform; -import cuchaz.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.procyon.index.SourceIndexVisitor; +import org.quiltmc.enigma.source.procyon.transformer.AddJavadocsAstTransform; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; import java.io.StringWriter; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/index/SourceIndexClassVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/index/SourceIndexClassVisitor.java similarity index 89% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/index/SourceIndexClassVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/index/SourceIndexClassVisitor.java index ad4ea4632..9a1a768ee 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/index/SourceIndexClassVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/index/SourceIndexClassVisitor.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source.procyon.index; +package org.quiltmc.enigma.source.procyon.index; import com.strobel.assembler.metadata.FieldDefinition; import com.strobel.assembler.metadata.MethodDefinition; @@ -14,12 +14,12 @@ import com.strobel.decompiler.languages.java.ast.SimpleType; import com.strobel.decompiler.languages.java.ast.TypeDeclaration; import com.strobel.decompiler.languages.java.ast.VariableInitializer; -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.source.procyon.EntryParser; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.procyon.EntryParser; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; public class SourceIndexClassVisitor extends SourceIndexVisitor { private final ClassDefEntry classEntry; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/index/SourceIndexMethodVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/index/SourceIndexMethodVisitor.java similarity index 93% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/index/SourceIndexMethodVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/index/SourceIndexMethodVisitor.java index 9fe7b5e37..e3cc84d14 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/index/SourceIndexMethodVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/index/SourceIndexMethodVisitor.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source.procyon.index; +package org.quiltmc.enigma.source.procyon.index; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; @@ -26,16 +26,16 @@ import com.strobel.decompiler.languages.java.ast.ThisReferenceExpression; import com.strobel.decompiler.languages.java.ast.VariableDeclarationStatement; import com.strobel.decompiler.languages.java.ast.VariableInitializer; -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.source.procyon.EntryParser; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.procyon.EntryParser; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.util.HashMap; import java.util.Map; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/index/SourceIndexVisitor.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/index/SourceIndexVisitor.java similarity index 81% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/index/SourceIndexVisitor.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/index/SourceIndexVisitor.java index 7971cba5e..2a9c3d0c4 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/index/SourceIndexVisitor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/index/SourceIndexVisitor.java @@ -1,13 +1,13 @@ -package cuchaz.enigma.source.procyon.index; +package org.quiltmc.enigma.source.procyon.index; import com.strobel.assembler.metadata.TypeDefinition; import com.strobel.decompiler.languages.java.ast.AstNode; import com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor; import com.strobel.decompiler.languages.java.ast.Keys; import com.strobel.decompiler.languages.java.ast.TypeDeclaration; -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.source.procyon.EntryParser; -import cuchaz.enigma.translation.representation.entry.ClassDefEntry; +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.procyon.EntryParser; +import org.quiltmc.enigma.translation.representation.entry.ClassDefEntry; public class SourceIndexVisitor extends DepthFirstAstVisitor { @Override diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/index/TokenFactory.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/index/TokenFactory.java similarity index 92% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/index/TokenFactory.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/index/TokenFactory.java index 77fb4c648..1ebe64328 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/index/TokenFactory.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/index/TokenFactory.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.source.procyon.index; +package org.quiltmc.enigma.source.procyon.index; import com.strobel.decompiler.languages.Region; import com.strobel.decompiler.languages.java.ast.AstNode; import com.strobel.decompiler.languages.java.ast.ConstructorDeclaration; import com.strobel.decompiler.languages.java.ast.Identifier; import com.strobel.decompiler.languages.java.ast.TypeDeclaration; -import cuchaz.enigma.source.Token; -import cuchaz.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.Token; +import org.quiltmc.enigma.source.SourceIndex; import org.tinylog.Logger; import java.util.regex.Pattern; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/AddJavadocsAstTransform.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/AddJavadocsAstTransform.java similarity index 91% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/AddJavadocsAstTransform.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/AddJavadocsAstTransform.java index 4fe9fbe03..551de5f45 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/AddJavadocsAstTransform.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/AddJavadocsAstTransform.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source.procyon.transformers; +package org.quiltmc.enigma.source.procyon.transformer; import com.google.common.base.Strings; import com.strobel.assembler.metadata.ParameterDefinition; @@ -15,13 +15,13 @@ import com.strobel.decompiler.languages.java.ast.Roles; import com.strobel.decompiler.languages.java.ast.TypeDeclaration; import com.strobel.decompiler.languages.java.ast.transforms.IAstTransform; -import cuchaz.enigma.source.procyon.EntryParser; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.mapping.ResolutionStrategy; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.LocalVariableDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.source.procyon.EntryParser; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.mapping.ResolutionStrategy; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; import java.util.ArrayList; import java.util.Collections; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/DropImportAstTransform.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/DropImportAstTransform.java similarity index 94% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/DropImportAstTransform.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/DropImportAstTransform.java index 39e599d3d..11ea6a486 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/DropImportAstTransform.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/DropImportAstTransform.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source.procyon.transformers; +package org.quiltmc.enigma.source.procyon.transformer; import com.strobel.decompiler.languages.java.ast.AstNode; import com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/DropVarModifiersAstTransform.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/DropVarModifiersAstTransform.java similarity index 96% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/DropVarModifiersAstTransform.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/DropVarModifiersAstTransform.java index 14b5cc098..68741116a 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/DropVarModifiersAstTransform.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/DropVarModifiersAstTransform.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source.procyon.transformers; +package org.quiltmc.enigma.source.procyon.transformer; import com.strobel.assembler.metadata.Flags; import com.strobel.decompiler.languages.java.ast.AstNode; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/InvalidIdentifierFix.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/InvalidIdentifierFix.java similarity index 94% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/InvalidIdentifierFix.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/InvalidIdentifierFix.java index 5bf8c2db2..11f777d0b 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/InvalidIdentifierFix.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/InvalidIdentifierFix.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source.procyon.transformers; +package org.quiltmc.enigma.source.procyon.transformer; import com.strobel.decompiler.languages.java.ast.AstNode; import com.strobel.decompiler.languages.java.ast.DepthFirstAstVisitor; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/Java8Generics.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/Java8Generics.java similarity index 98% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/Java8Generics.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/Java8Generics.java index 98e92cb62..d78dc2535 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/Java8Generics.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/Java8Generics.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source.procyon.transformers; +package org.quiltmc.enigma.source.procyon.transformer; import com.strobel.assembler.metadata.CommonTypeReferences; import com.strobel.assembler.metadata.IGenericInstance; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/ObfuscatedEnumSwitchRewriterTransform.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/ObfuscatedEnumSwitchRewriterTransform.java similarity index 99% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/ObfuscatedEnumSwitchRewriterTransform.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/ObfuscatedEnumSwitchRewriterTransform.java index 7b137cc3e..7c778739e 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/ObfuscatedEnumSwitchRewriterTransform.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/ObfuscatedEnumSwitchRewriterTransform.java @@ -15,7 +15,7 @@ * You must not remove this notice, or any other, from this software. */ -package cuchaz.enigma.source.procyon.transformers; +package org.quiltmc.enigma.source.procyon.transformer; import com.strobel.assembler.metadata.BuiltinTypes; import com.strobel.assembler.metadata.FieldDefinition; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/RemoveObjectCasts.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/RemoveObjectCasts.java similarity index 95% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/RemoveObjectCasts.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/RemoveObjectCasts.java index 3d1f5e19f..6c5cbcc80 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/RemoveObjectCasts.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/RemoveObjectCasts.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source.procyon.transformers; +package org.quiltmc.enigma.source.procyon.transformer; import com.strobel.assembler.metadata.BuiltinTypes; import com.strobel.decompiler.DecompilerContext; diff --git a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/VarargsFixer.java b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/VarargsFixer.java similarity index 99% rename from enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/VarargsFixer.java rename to enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/VarargsFixer.java index 6f7c0b005..18379e2f0 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/procyon/transformers/VarargsFixer.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/procyon/transformer/VarargsFixer.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source.procyon.transformers; +package org.quiltmc.enigma.source.procyon.transformer; import com.strobel.assembler.metadata.MemberReference; import com.strobel.assembler.metadata.MetadataFilters; diff --git a/enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaContextSource.java b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaContextSource.java similarity index 95% rename from enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaContextSource.java rename to enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaContextSource.java index 6fb282fd7..9924e4112 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaContextSource.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaContextSource.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.source.vineflower; +package org.quiltmc.enigma.source.vineflower; -import cuchaz.enigma.classprovider.ClassProvider; -import cuchaz.enigma.utils.AsmUtil; +import org.quiltmc.enigma.classprovider.ClassProvider; +import org.quiltmc.enigma.util.AsmUtil; import org.jetbrains.java.decompiler.main.extern.IContextSource; import org.jetbrains.java.decompiler.main.extern.IResultSaver; import org.objectweb.asm.tree.ClassNode; diff --git a/enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaFernflowerLogger.java b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaFernflowerLogger.java similarity index 95% rename from enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaFernflowerLogger.java rename to enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaFernflowerLogger.java index a0e797761..d040655cd 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaFernflowerLogger.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaFernflowerLogger.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source.vineflower; +package org.quiltmc.enigma.source.vineflower; import org.jetbrains.java.decompiler.main.extern.IFernflowerLogger; import org.tinylog.Logger; diff --git a/enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaJavadocProvider.java b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaJavadocProvider.java similarity index 86% rename from enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaJavadocProvider.java rename to enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaJavadocProvider.java index 19aefdb46..0e283bb54 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaJavadocProvider.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaJavadocProvider.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.source.vineflower; - -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.source.vineflower; + +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import net.fabricmc.fernflower.api.IFabricJavadocProvider; import org.jetbrains.java.decompiler.struct.StructClass; import org.jetbrains.java.decompiler.struct.StructField; diff --git a/enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaResultSaver.java b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaResultSaver.java similarity index 92% rename from enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaResultSaver.java rename to enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaResultSaver.java index 763d7a76b..aca43b226 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaResultSaver.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaResultSaver.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.source.vineflower; +package org.quiltmc.enigma.source.vineflower; -import cuchaz.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.SourceIndex; import org.jetbrains.java.decompiler.main.extern.IResultSaver; import java.util.jar.Manifest; diff --git a/enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaTextTokenCollector.java b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaTextTokenCollector.java similarity index 91% rename from enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaTextTokenCollector.java rename to enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaTextTokenCollector.java index f7b31400f..bb3194989 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/vineflower/EnigmaTextTokenCollector.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/EnigmaTextTokenCollector.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.source.vineflower; - -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.source.Token; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.source.vineflower; + +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.Token; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import org.jetbrains.java.decompiler.main.extern.TextTokenVisitor; import org.jetbrains.java.decompiler.struct.gen.FieldDescriptor; import org.jetbrains.java.decompiler.struct.gen.MethodDescriptor; diff --git a/enigma/src/main/java/cuchaz/enigma/source/vineflower/VineflowerDecompiler.java b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/VineflowerDecompiler.java similarity index 66% rename from enigma/src/main/java/cuchaz/enigma/source/vineflower/VineflowerDecompiler.java rename to enigma/src/main/java/org/quiltmc/enigma/source/vineflower/VineflowerDecompiler.java index 5c2844bbc..b0c4aba78 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/vineflower/VineflowerDecompiler.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/VineflowerDecompiler.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.source.vineflower; +package org.quiltmc.enigma.source.vineflower; -import cuchaz.enigma.classprovider.ClassProvider; -import cuchaz.enigma.source.Decompiler; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.source.SourceSettings; -import cuchaz.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.classprovider.ClassProvider; +import org.quiltmc.enigma.source.Decompiler; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.source.SourceSettings; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; import org.checkerframework.checker.nullness.qual.Nullable; public class VineflowerDecompiler implements Decompiler { diff --git a/enigma/src/main/java/cuchaz/enigma/source/vineflower/VineflowerPreferences.java b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/VineflowerPreferences.java similarity index 98% rename from enigma/src/main/java/cuchaz/enigma/source/vineflower/VineflowerPreferences.java rename to enigma/src/main/java/org/quiltmc/enigma/source/vineflower/VineflowerPreferences.java index 398bd4105..012e88e19 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/vineflower/VineflowerPreferences.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/VineflowerPreferences.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.source.vineflower; +package org.quiltmc.enigma.source.vineflower; import org.jetbrains.java.decompiler.main.extern.IFernflowerLogger; import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences; diff --git a/enigma/src/main/java/cuchaz/enigma/source/vineflower/VineflowerSource.java b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/VineflowerSource.java similarity index 94% rename from enigma/src/main/java/cuchaz/enigma/source/vineflower/VineflowerSource.java rename to enigma/src/main/java/org/quiltmc/enigma/source/vineflower/VineflowerSource.java index 108106f7c..fa929e99c 100644 --- a/enigma/src/main/java/cuchaz/enigma/source/vineflower/VineflowerSource.java +++ b/enigma/src/main/java/org/quiltmc/enigma/source/vineflower/VineflowerSource.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.source.vineflower; +package org.quiltmc.enigma.source.vineflower; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.source.SourceSettings; -import cuchaz.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.SourceSettings; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; import net.fabricmc.fernflower.api.IFabricJavadocProvider; import org.jetbrains.java.decompiler.main.decompiler.BaseDecompiler; import org.jetbrains.java.decompiler.main.extern.IContextSource; diff --git a/enigma/src/main/java/cuchaz/enigma/stats/ProjectStatsResult.java b/enigma/src/main/java/org/quiltmc/enigma/stats/ProjectStatsResult.java similarity index 97% rename from enigma/src/main/java/cuchaz/enigma/stats/ProjectStatsResult.java rename to enigma/src/main/java/org/quiltmc/enigma/stats/ProjectStatsResult.java index a2b6cf319..ca7e3cc6e 100644 --- a/enigma/src/main/java/cuchaz/enigma/stats/ProjectStatsResult.java +++ b/enigma/src/main/java/org/quiltmc/enigma/stats/ProjectStatsResult.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.stats; +package org.quiltmc.enigma.stats; import com.strobel.core.Triple; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import java.util.ArrayList; import java.util.Collection; diff --git a/enigma/src/main/java/cuchaz/enigma/stats/StatType.java b/enigma/src/main/java/org/quiltmc/enigma/stats/StatType.java similarity index 85% rename from enigma/src/main/java/cuchaz/enigma/stats/StatType.java rename to enigma/src/main/java/org/quiltmc/enigma/stats/StatType.java index 077d54d69..817eb9c57 100644 --- a/enigma/src/main/java/cuchaz/enigma/stats/StatType.java +++ b/enigma/src/main/java/org/quiltmc/enigma/stats/StatType.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.stats; +package org.quiltmc.enigma.stats; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.util.I18n; public enum StatType { CLASSES("type.classes"), diff --git a/enigma/src/main/java/cuchaz/enigma/stats/StatsGenerator.java b/enigma/src/main/java/org/quiltmc/enigma/stats/StatsGenerator.java similarity index 89% rename from enigma/src/main/java/cuchaz/enigma/stats/StatsGenerator.java rename to enigma/src/main/java/org/quiltmc/enigma/stats/StatsGenerator.java index c868b6aa4..b7c335ce7 100644 --- a/enigma/src/main/java/cuchaz/enigma/stats/StatsGenerator.java +++ b/enigma/src/main/java/org/quiltmc/enigma/stats/StatsGenerator.java @@ -1,22 +1,22 @@ -package cuchaz.enigma.stats; +package org.quiltmc.enigma.stats; import com.google.common.base.Preconditions; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.analysis.index.EntryIndex; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.mapping.ResolutionStrategy; -import cuchaz.enigma.translation.representation.ArgumentDescriptor; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldDefEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.translation.representation.entry.ParentedEntry; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.analysis.index.EntryIndex; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.mapping.ResolutionStrategy; +import org.quiltmc.enigma.translation.representation.ArgumentDescriptor; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldDefEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.representation.entry.ParentedEntry; +import org.quiltmc.enigma.util.I18n; import org.tinylog.Logger; import javax.annotation.Nullable; diff --git a/enigma/src/main/java/cuchaz/enigma/stats/StatsProvider.java b/enigma/src/main/java/org/quiltmc/enigma/stats/StatsProvider.java similarity index 98% rename from enigma/src/main/java/cuchaz/enigma/stats/StatsProvider.java rename to enigma/src/main/java/org/quiltmc/enigma/stats/StatsProvider.java index cc49e95e4..6a65b331a 100644 --- a/enigma/src/main/java/cuchaz/enigma/stats/StatsProvider.java +++ b/enigma/src/main/java/org/quiltmc/enigma/stats/StatsProvider.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.stats; +package org.quiltmc.enigma.stats; public interface StatsProvider { /** diff --git a/enigma/src/main/java/cuchaz/enigma/stats/StatsResult.java b/enigma/src/main/java/org/quiltmc/enigma/stats/StatsResult.java similarity index 99% rename from enigma/src/main/java/cuchaz/enigma/stats/StatsResult.java rename to enigma/src/main/java/org/quiltmc/enigma/stats/StatsResult.java index 81fa25b2e..d801499be 100644 --- a/enigma/src/main/java/cuchaz/enigma/stats/StatsResult.java +++ b/enigma/src/main/java/org/quiltmc/enigma/stats/StatsResult.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.stats; +package org.quiltmc.enigma.stats; import java.util.HashMap; import java.util.Map; diff --git a/enigma/src/main/java/cuchaz/enigma/stats/StatsTree.java b/enigma/src/main/java/org/quiltmc/enigma/stats/StatsTree.java similarity index 97% rename from enigma/src/main/java/cuchaz/enigma/stats/StatsTree.java rename to enigma/src/main/java/org/quiltmc/enigma/stats/StatsTree.java index 63d5c61a8..62e5ba583 100644 --- a/enigma/src/main/java/cuchaz/enigma/stats/StatsTree.java +++ b/enigma/src/main/java/org/quiltmc/enigma/stats/StatsTree.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.stats; +package org.quiltmc.enigma.stats; import java.util.ArrayList; import java.util.HashMap; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/LocalNameGenerator.java b/enigma/src/main/java/org/quiltmc/enigma/translation/LocalNameGenerator.java similarity index 89% rename from enigma/src/main/java/cuchaz/enigma/translation/LocalNameGenerator.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/LocalNameGenerator.java index e5d9906c2..e635044be 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/LocalNameGenerator.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/LocalNameGenerator.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.translation; +package org.quiltmc.enigma.translation; -import cuchaz.enigma.translation.mapping.IdentifierValidation; -import cuchaz.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.mapping.IdentifierValidation; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; import org.tinylog.Logger; import java.util.Collection; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/MappingTranslator.java b/enigma/src/main/java/org/quiltmc/enigma/translation/MappingTranslator.java similarity index 74% rename from enigma/src/main/java/cuchaz/enigma/translation/MappingTranslator.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/MappingTranslator.java index a84fc06f5..c08a130ce 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/MappingTranslator.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/MappingTranslator.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.translation; +package org.quiltmc.enigma.translation; -import cuchaz.enigma.translation.mapping.EntryMap; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.mapping.EntryMap; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryResolver; import javax.annotation.Nullable; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/ProposingTranslator.java b/enigma/src/main/java/org/quiltmc/enigma/translation/ProposingTranslator.java similarity index 83% rename from enigma/src/main/java/cuchaz/enigma/translation/ProposingTranslator.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/ProposingTranslator.java index b2bf75641..fed1ef923 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/ProposingTranslator.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/ProposingTranslator.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.translation; +package org.quiltmc.enigma.translation; -import cuchaz.enigma.api.service.NameProposalService; -import cuchaz.enigma.translation.mapping.EntryRemapper; -import cuchaz.enigma.translation.mapping.ResolutionStrategy; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.api.service.NameProposalService; +import org.quiltmc.enigma.translation.mapping.EntryRemapper; +import org.quiltmc.enigma.translation.mapping.ResolutionStrategy; +import org.quiltmc.enigma.translation.representation.entry.Entry; import java.util.Arrays; import java.util.Optional; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/SignatureUpdater.java b/enigma/src/main/java/org/quiltmc/enigma/translation/SignatureUpdater.java similarity index 97% rename from enigma/src/main/java/cuchaz/enigma/translation/SignatureUpdater.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/SignatureUpdater.java index edd22170b..d3ff2a5d1 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/SignatureUpdater.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/SignatureUpdater.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation; +package org.quiltmc.enigma.translation; import java.io.IOException; import java.io.StringReader; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/Translatable.java b/enigma/src/main/java/org/quiltmc/enigma/translation/Translatable.java similarity index 69% rename from enigma/src/main/java/cuchaz/enigma/translation/Translatable.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/Translatable.java index a87307ef4..8f729785b 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/Translatable.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/Translatable.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.translation; +package org.quiltmc.enigma.translation; -import cuchaz.enigma.translation.mapping.EntryMap; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.mapping.EntryMap; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryResolver; import javax.annotation.Nullable; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/TranslateResult.java b/enigma/src/main/java/org/quiltmc/enigma/translation/TranslateResult.java similarity index 95% rename from enigma/src/main/java/cuchaz/enigma/translation/TranslateResult.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/TranslateResult.java index fbeb62a71..366c2b21e 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/TranslateResult.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/TranslateResult.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.translation; +package org.quiltmc.enigma.translation; -import cuchaz.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.source.RenamableTokenType; import java.util.Objects; import java.util.function.Function; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/TranslationDirection.java b/enigma/src/main/java/org/quiltmc/enigma/translation/TranslationDirection.java similarity index 91% rename from enigma/src/main/java/cuchaz/enigma/translation/TranslationDirection.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/TranslationDirection.java index 01a3337b7..74b859693 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/TranslationDirection.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/TranslationDirection.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation; +package org.quiltmc.enigma.translation; public enum TranslationDirection { DEOBFUSCATING { diff --git a/enigma/src/main/java/cuchaz/enigma/translation/Translator.java b/enigma/src/main/java/org/quiltmc/enigma/translation/Translator.java similarity index 97% rename from enigma/src/main/java/cuchaz/enigma/translation/Translator.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/Translator.java index bdb3ef2fa..e10ecb412 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/Translator.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/Translator.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation; +package org.quiltmc.enigma.translation; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/VoidTranslator.java b/enigma/src/main/java/org/quiltmc/enigma/translation/VoidTranslator.java similarity index 84% rename from enigma/src/main/java/cuchaz/enigma/translation/VoidTranslator.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/VoidTranslator.java index 7d4755d0e..68a01c749 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/VoidTranslator.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/VoidTranslator.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation; +package org.quiltmc.enigma.translation; public enum VoidTranslator implements Translator { INSTANCE; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryChange.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryChange.java similarity index 89% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryChange.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryChange.java index 3902327ac..469b16fb5 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryChange.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryChange.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.source.DecompiledClassSource; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.utils.TristateChange; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.source.DecompiledClassSource; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.util.TristateChange; import java.util.Objects; import java.util.Optional; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryMap.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryMap.java similarity index 75% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryMap.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryMap.java index dd7730beb..e91159b0c 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryMap.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryMap.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.Entry; import javax.annotation.Nullable; import java.util.stream.Stream; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryMapping.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryMapping.java similarity index 91% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryMapping.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryMapping.java index 8da582335..2aa4c7be9 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryMapping.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryMapping.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; import javax.annotation.Nullable; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryRemapper.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryRemapper.java similarity index 85% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryRemapper.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryRemapper.java index 604112936..a9323ed84 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryRemapper.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryRemapper.java @@ -1,19 +1,19 @@ -package cuchaz.enigma.translation.mapping; - -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.translation.MappingTranslator; -import cuchaz.enigma.translation.Translatable; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.tree.DeltaTrackingTree; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.validation.Message; -import cuchaz.enigma.utils.validation.ValidationContext; +package org.quiltmc.enigma.translation.mapping; + +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.translation.MappingTranslator; +import org.quiltmc.enigma.translation.Translatable; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.tree.DeltaTrackingTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.validation.Message; +import org.quiltmc.enigma.util.validation.ValidationContext; import java.util.Collection; import java.util.Objects; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryResolver.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryResolver.java similarity index 85% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryResolver.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryResolver.java index 0c0d5acd6..f9e20660d 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryResolver.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryResolver.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; import com.google.common.collect.Streams; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.util.Collection; import java.util.Set; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryUtil.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryUtil.java similarity index 83% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryUtil.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryUtil.java index d53c3a971..5bd0e0ea3 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/EntryUtil.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/EntryUtil.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.utils.validation.ValidationContext; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.util.validation.ValidationContext; import javax.annotation.Nonnull; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/IdentifierValidation.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/IdentifierValidation.java similarity index 91% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/IdentifierValidation.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/IdentifierValidation.java index a34c7242d..adc01dd92 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/IdentifierValidation.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/IdentifierValidation.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; -import cuchaz.enigma.utils.validation.Message; -import cuchaz.enigma.utils.validation.StandardValidation; -import cuchaz.enigma.utils.validation.ValidationContext; +import org.quiltmc.enigma.util.validation.Message; +import org.quiltmc.enigma.util.validation.StandardValidation; +import org.quiltmc.enigma.util.validation.ValidationContext; import java.util.List; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/IndexEntryResolver.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/IndexEntryResolver.java similarity index 91% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/IndexEntryResolver.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/IndexEntryResolver.java index cc6a30463..794715dbc 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/IndexEntryResolver.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/IndexEntryResolver.java @@ -1,17 +1,17 @@ -package cuchaz.enigma.translation.mapping; - -import cuchaz.enigma.analysis.IndexTreeBuilder; -import cuchaz.enigma.analysis.MethodImplementationsTreeNode; -import cuchaz.enigma.analysis.MethodInheritanceTreeNode; -import cuchaz.enigma.analysis.index.BridgeMethodIndex; -import cuchaz.enigma.analysis.index.EntryIndex; -import cuchaz.enigma.analysis.index.InheritanceIndex; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.translation.VoidTranslator; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.translation.mapping; + +import org.quiltmc.enigma.analysis.IndexTreeBuilder; +import org.quiltmc.enigma.analysis.MethodImplementationsTreeNode; +import org.quiltmc.enigma.analysis.MethodInheritanceTreeNode; +import org.quiltmc.enigma.analysis.index.BridgeMethodIndex; +import org.quiltmc.enigma.analysis.index.EntryIndex; +import org.quiltmc.enigma.analysis.index.InheritanceIndex; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.translation.VoidTranslator; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.util.Collection; import java.util.Collections; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingDelta.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingDelta.java similarity index 75% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingDelta.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingDelta.java index 7e9f0c72f..da8238d27 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingDelta.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingDelta.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.translation.mapping; - -import cuchaz.enigma.translation.Translatable; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.EntryTreeNode; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.entry.Entry; +package org.quiltmc.enigma.translation.mapping; + +import org.quiltmc.enigma.translation.Translatable; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTreeNode; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.entry.Entry; import java.util.stream.Stream; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingOperations.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingOperations.java similarity index 76% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingOperations.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingOperations.java index 5c9409152..097ec7900 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingOperations.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingOperations.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.EntryTreeNode; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.MappingTranslator; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTreeNode; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.MappingTranslator; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.util.HashSet; import java.util.Set; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingPair.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingPair.java similarity index 80% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingPair.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingPair.java index 112c9611f..0ad801e38 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingPair.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingPair.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.Entry; import javax.annotation.Nullable; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingValidator.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingValidator.java similarity index 91% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingValidator.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingValidator.java index fa3c3715c..b2bfe0bdf 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingValidator.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingValidator.java @@ -1,15 +1,15 @@ -package cuchaz.enigma.translation.mapping; - -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.translation.representation.entry.ParentedEntry; -import cuchaz.enigma.utils.validation.Message; -import cuchaz.enigma.utils.validation.ValidationContext; +package org.quiltmc.enigma.translation.mapping; + +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.representation.entry.ParentedEntry; +import org.quiltmc.enigma.util.validation.Message; +import org.quiltmc.enigma.util.validation.ValidationContext; import javax.annotation.Nullable; import java.util.AbstractMap; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingsChecker.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingsChecker.java similarity index 85% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingsChecker.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingsChecker.java index 8136395eb..1051acda4 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/MappingsChecker.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/MappingsChecker.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.translation.mapping; - -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.EntryTreeNode; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.translation.mapping; + +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTreeNode; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.util.Collection; import java.util.HashMap; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/ResolutionStrategy.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/ResolutionStrategy.java similarity index 58% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/ResolutionStrategy.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/ResolutionStrategy.java index 1c28e0289..6bd64f75b 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/ResolutionStrategy.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/ResolutionStrategy.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; public enum ResolutionStrategy { RESOLVE_ROOT, diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/VoidEntryResolver.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/VoidEntryResolver.java similarity index 75% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/VoidEntryResolver.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/VoidEntryResolver.java index 2eab55fd3..da1ebe3d5 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/VoidEntryResolver.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/VoidEntryResolver.java @@ -1,7 +1,7 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.util.Collection; import java.util.Collections; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/LfPrintWriter.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/LfPrintWriter.java similarity index 82% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/LfPrintWriter.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/LfPrintWriter.java index 3f4146237..76cdbf653 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/LfPrintWriter.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/LfPrintWriter.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation.mapping.serde; +package org.quiltmc.enigma.translation.mapping.serde; import java.io.PrintWriter; import java.io.Writer; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingFileNameFormat.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingFileNameFormat.java similarity index 75% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingFileNameFormat.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingFileNameFormat.java index 9bc013c4e..9301fd3c9 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingFileNameFormat.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingFileNameFormat.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation.mapping.serde; +package org.quiltmc.enigma.translation.mapping.serde; import com.google.gson.annotations.SerializedName; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingFormat.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingFormat.java similarity index 83% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingFormat.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingFormat.java index fa5cba879..c78d91f7b 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingFormat.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingFormat.java @@ -1,18 +1,18 @@ -package cuchaz.enigma.translation.mapping.serde; +package org.quiltmc.enigma.translation.mapping.serde; import com.google.common.io.MoreFiles; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.MappingDelta; -import cuchaz.enigma.translation.mapping.serde.enigma.EnigmaMappingsReader; -import cuchaz.enigma.translation.mapping.serde.enigma.EnigmaMappingsWriter; -import cuchaz.enigma.translation.mapping.serde.proguard.ProguardMappingsReader; -import cuchaz.enigma.translation.mapping.serde.recaf.RecafMappingsReader; -import cuchaz.enigma.translation.mapping.serde.recaf.RecafMappingsWriter; -import cuchaz.enigma.translation.mapping.serde.srg.SrgMappingsWriter; -import cuchaz.enigma.translation.mapping.serde.tinyv2.TinyV2Reader; -import cuchaz.enigma.translation.mapping.serde.tinyv2.TinyV2Writer; -import cuchaz.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.MappingDelta; +import org.quiltmc.enigma.translation.mapping.serde.enigma.EnigmaMappingsReader; +import org.quiltmc.enigma.translation.mapping.serde.enigma.EnigmaMappingsWriter; +import org.quiltmc.enigma.translation.mapping.serde.proguard.ProguardMappingsReader; +import org.quiltmc.enigma.translation.mapping.serde.recaf.RecafMappingsReader; +import org.quiltmc.enigma.translation.mapping.serde.recaf.RecafMappingsWriter; +import org.quiltmc.enigma.translation.mapping.serde.srg.SrgMappingsWriter; +import org.quiltmc.enigma.translation.mapping.serde.tinyv2.TinyV2Reader; +import org.quiltmc.enigma.translation.mapping.serde.tinyv2.TinyV2Writer; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; import javax.annotation.Nullable; import java.io.IOException; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingHelper.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingHelper.java similarity index 95% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingHelper.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingHelper.java index a936e5ecf..c94c94e88 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingHelper.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingHelper.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation.mapping.serde; +package org.quiltmc.enigma.translation.mapping.serde; public final class MappingHelper { private static final String TO_ESCAPE = "\\\n\r\0\t"; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingParseException.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingParseException.java similarity index 93% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingParseException.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingParseException.java index 81d71a68a..2df33e7fc 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingParseException.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingParseException.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation.mapping.serde; +package org.quiltmc.enigma.translation.mapping.serde; import java.io.File; import java.nio.file.Path; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingSaveParameters.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingSaveParameters.java similarity index 82% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingSaveParameters.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingSaveParameters.java index 03d2c7c66..e2d59ed40 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingSaveParameters.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingSaveParameters.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation.mapping.serde; +package org.quiltmc.enigma.translation.mapping.serde; import com.google.gson.annotations.SerializedName; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingsReader.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingsReader.java similarity index 61% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingsReader.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingsReader.java index 35d927891..8ee3a5ff9 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingsReader.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingsReader.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.translation.mapping.serde; +package org.quiltmc.enigma.translation.mapping.serde; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; import java.io.IOException; import java.nio.file.Path; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingsWriter.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingsWriter.java similarity index 70% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingsWriter.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingsWriter.java index 49c0c4ba2..1f9680709 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/MappingsWriter.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/MappingsWriter.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.translation.mapping.serde; +package org.quiltmc.enigma.translation.mapping.serde; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.MappingDelta; -import cuchaz.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.MappingDelta; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; import java.nio.file.Path; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/RawEntryMapping.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/RawEntryMapping.java similarity index 83% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/RawEntryMapping.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/RawEntryMapping.java index 35e954816..2294558ec 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/RawEntryMapping.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/RawEntryMapping.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.translation.mapping.serde; +package org.quiltmc.enigma.translation.mapping.serde; -import cuchaz.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryMapping; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/enigma/EnigmaFormat.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/enigma/EnigmaFormat.java similarity index 81% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/enigma/EnigmaFormat.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/enigma/EnigmaFormat.java index 210d328e8..16565aa06 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/enigma/EnigmaFormat.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/enigma/EnigmaFormat.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation.mapping.serde.enigma; +package org.quiltmc.enigma.translation.mapping.serde.enigma; public class EnigmaFormat { public static final String COMMENT = "COMMENT"; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/enigma/EnigmaMappingsReader.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/enigma/EnigmaMappingsReader.java similarity index 87% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/enigma/EnigmaMappingsReader.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/enigma/EnigmaMappingsReader.java index d0c470af5..33d2e9240 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/enigma/EnigmaMappingsReader.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/enigma/EnigmaMappingsReader.java @@ -1,22 +1,22 @@ -package cuchaz.enigma.translation.mapping.serde.enigma; - -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.MappingPair; -import cuchaz.enigma.translation.mapping.serde.MappingHelper; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.serde.MappingsReader; -import cuchaz.enigma.translation.mapping.serde.RawEntryMapping; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.I18n; +package org.quiltmc.enigma.translation.mapping.serde.enigma; + +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.MappingPair; +import org.quiltmc.enigma.translation.mapping.serde.MappingHelper; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.serde.MappingsReader; +import org.quiltmc.enigma.translation.mapping.serde.RawEntryMapping; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.I18n; import javax.annotation.Nullable; import java.io.IOException; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/enigma/EnigmaMappingsWriter.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/enigma/EnigmaMappingsWriter.java similarity index 88% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/enigma/EnigmaMappingsWriter.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/enigma/EnigmaMappingsWriter.java index 2b1e8e43e..3ec2ab6df 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/enigma/EnigmaMappingsWriter.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/enigma/EnigmaMappingsWriter.java @@ -1,24 +1,24 @@ -package cuchaz.enigma.translation.mapping.serde.enigma; - -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.MappingTranslator; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.MappingDelta; -import cuchaz.enigma.translation.mapping.VoidEntryResolver; -import cuchaz.enigma.translation.mapping.serde.LfPrintWriter; -import cuchaz.enigma.translation.mapping.serde.MappingFileNameFormat; -import cuchaz.enigma.translation.mapping.serde.MappingHelper; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.serde.MappingsWriter; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.EntryTreeNode; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.I18n; +package org.quiltmc.enigma.translation.mapping.serde.enigma; + +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.MappingTranslator; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.MappingDelta; +import org.quiltmc.enigma.translation.mapping.VoidEntryResolver; +import org.quiltmc.enigma.translation.mapping.serde.LfPrintWriter; +import org.quiltmc.enigma.translation.mapping.serde.MappingFileNameFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingHelper; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.serde.MappingsWriter; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTreeNode; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.I18n; import org.tinylog.Logger; import java.io.IOException; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/proguard/ProguardMappingsReader.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/proguard/ProguardMappingsReader.java similarity index 82% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/proguard/ProguardMappingsReader.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/proguard/ProguardMappingsReader.java index 86b85d7cc..38dda9209 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/proguard/ProguardMappingsReader.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/proguard/ProguardMappingsReader.java @@ -1,17 +1,17 @@ -package cuchaz.enigma.translation.mapping.serde.proguard; - -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.MappingOperations; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.serde.MappingsReader; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.translation.mapping.serde.proguard; + +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.MappingOperations; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.serde.MappingsReader; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/recaf/RecafMappingsReader.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/recaf/RecafMappingsReader.java similarity index 69% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/recaf/RecafMappingsReader.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/recaf/RecafMappingsReader.java index c0112d28e..91776e164 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/recaf/RecafMappingsReader.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/recaf/RecafMappingsReader.java @@ -1,16 +1,16 @@ -package cuchaz.enigma.translation.mapping.serde.recaf; - -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.serde.MappingsReader; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.translation.mapping.serde.recaf; + +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.serde.MappingsReader; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.io.IOException; import java.nio.file.Files; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/recaf/RecafMappingsWriter.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/recaf/RecafMappingsWriter.java similarity index 73% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/recaf/RecafMappingsWriter.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/recaf/RecafMappingsWriter.java index 1e06683d6..12dfdbcce 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/recaf/RecafMappingsWriter.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/recaf/RecafMappingsWriter.java @@ -1,17 +1,17 @@ -package cuchaz.enigma.translation.mapping.serde.recaf; +package org.quiltmc.enigma.translation.mapping.serde.recaf; import com.google.common.collect.Lists; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.MappingDelta; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.serde.MappingsWriter; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.EntryTreeNode; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.MappingDelta; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.serde.MappingsWriter; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTreeNode; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import org.tinylog.Logger; import java.io.BufferedWriter; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/srg/SrgMappingsWriter.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/srg/SrgMappingsWriter.java similarity index 78% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/srg/SrgMappingsWriter.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/srg/SrgMappingsWriter.java index 91dfdd38a..125800832 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/srg/SrgMappingsWriter.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/srg/SrgMappingsWriter.java @@ -1,22 +1,22 @@ -package cuchaz.enigma.translation.mapping.serde.srg; +package org.quiltmc.enigma.translation.mapping.serde.srg; import com.google.common.collect.Lists; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.MappingTranslator; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.MappingDelta; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.VoidEntryResolver; -import cuchaz.enigma.translation.mapping.serde.LfPrintWriter; -import cuchaz.enigma.translation.mapping.serde.MappingsWriter; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.EntryTreeNode; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.MappingTranslator; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.MappingDelta; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.VoidEntryResolver; +import org.quiltmc.enigma.translation.mapping.serde.LfPrintWriter; +import org.quiltmc.enigma.translation.mapping.serde.MappingsWriter; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTreeNode; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.I18n; import org.tinylog.Logger; import java.io.IOException; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/tinyv2/TinyV2Reader.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/tinyv2/TinyV2Reader.java similarity index 88% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/tinyv2/TinyV2Reader.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/tinyv2/TinyV2Reader.java index aea4bf6ca..59965caf0 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/tinyv2/TinyV2Reader.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/tinyv2/TinyV2Reader.java @@ -1,21 +1,21 @@ -package cuchaz.enigma.translation.mapping.serde.tinyv2; - -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.serde.MappingHelper; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.MappingPair; -import cuchaz.enigma.translation.mapping.serde.MappingsReader; -import cuchaz.enigma.translation.mapping.serde.RawEntryMapping; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma.translation.mapping.serde.tinyv2; + +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.serde.MappingHelper; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.MappingPair; +import org.quiltmc.enigma.translation.mapping.serde.MappingsReader; +import org.quiltmc.enigma.translation.mapping.serde.RawEntryMapping; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/tinyv2/TinyV2Writer.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/tinyv2/TinyV2Writer.java similarity index 82% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/tinyv2/TinyV2Writer.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/tinyv2/TinyV2Writer.java index 7191eb7ec..a12583f01 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/serde/tinyv2/TinyV2Writer.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/serde/tinyv2/TinyV2Writer.java @@ -1,21 +1,21 @@ -package cuchaz.enigma.translation.mapping.serde.tinyv2; +package org.quiltmc.enigma.translation.mapping.serde.tinyv2; import com.google.common.base.Strings; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.EntryMap; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.MappingDelta; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.serde.LfPrintWriter; -import cuchaz.enigma.translation.mapping.serde.MappingHelper; -import cuchaz.enigma.translation.mapping.serde.MappingsWriter; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.EntryTreeNode; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.LocalVariableEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.EntryMap; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.MappingDelta; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.serde.LfPrintWriter; +import org.quiltmc.enigma.translation.mapping.serde.MappingHelper; +import org.quiltmc.enigma.translation.mapping.serde.MappingsWriter; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.EntryTreeNode; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.LocalVariableEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import org.tinylog.Logger; import java.io.IOException; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/DeltaTrackingTree.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/DeltaTrackingTree.java similarity index 85% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/DeltaTrackingTree.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/DeltaTrackingTree.java index 638b56854..3e18663ee 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/DeltaTrackingTree.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/DeltaTrackingTree.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.translation.mapping.tree; - -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMap; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.mapping.MappingDelta; -import cuchaz.enigma.translation.representation.entry.Entry; +package org.quiltmc.enigma.translation.mapping.tree; + +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMap; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.mapping.MappingDelta; +import org.quiltmc.enigma.translation.representation.entry.Entry; import javax.annotation.Nullable; import java.util.Collection; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/EntryTree.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/EntryTree.java similarity index 62% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/EntryTree.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/EntryTree.java index 4d3c1bdb2..3c758986d 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/EntryTree.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/EntryTree.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.translation.mapping.tree; - -import cuchaz.enigma.translation.Translatable; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMap; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.representation.entry.Entry; +package org.quiltmc.enigma.translation.mapping.tree; + +import org.quiltmc.enigma.translation.Translatable; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMap; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.representation.entry.Entry; import java.util.Collection; import java.util.stream.Stream; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/EntryTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/EntryTreeNode.java similarity index 87% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/EntryTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/EntryTreeNode.java index c56ce8ec8..0ce0bef87 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/EntryTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/EntryTreeNode.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.translation.mapping.tree; +package org.quiltmc.enigma.translation.mapping.tree; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.Entry; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/HashEntryTree.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/HashEntryTree.java similarity index 93% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/HashEntryTree.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/HashEntryTree.java index 63d61c338..2e4541950 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/HashEntryTree.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/HashEntryTree.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.translation.mapping.tree; +package org.quiltmc.enigma.translation.mapping.tree; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMap; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMap; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.representation.entry.Entry; import javax.annotation.Nonnull; import javax.annotation.Nullable; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/HashTreeNode.java b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/HashTreeNode.java similarity index 92% rename from enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/HashTreeNode.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/HashTreeNode.java index b35ba3d47..61bfeefce 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/mapping/tree/HashTreeNode.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/mapping/tree/HashTreeNode.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.translation.mapping.tree; +package org.quiltmc.enigma.translation.mapping.tree; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.Entry; import javax.annotation.Nonnull; import javax.annotation.Nullable; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/AccessFlags.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/AccessFlags.java similarity index 96% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/AccessFlags.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/AccessFlags.java index 2afe1d60a..bad508c86 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/AccessFlags.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/AccessFlags.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.translation.representation; +package org.quiltmc.enigma.translation.representation; -import cuchaz.enigma.analysis.Access; +import org.quiltmc.enigma.analysis.Access; import org.objectweb.asm.Opcodes; import java.lang.reflect.Modifier; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/ArgumentDescriptor.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/ArgumentDescriptor.java similarity index 90% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/ArgumentDescriptor.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/ArgumentDescriptor.java index 64d7fd4c3..a30a8046a 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/ArgumentDescriptor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/ArgumentDescriptor.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation.representation; +package org.quiltmc.enigma.translation.representation; import java.util.function.UnaryOperator; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/Lambda.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/Lambda.java similarity index 77% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/Lambda.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/Lambda.java index 43ce0cd7d..cbe25bc08 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/Lambda.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/Lambda.java @@ -1,16 +1,16 @@ -package cuchaz.enigma.translation.representation; +package org.quiltmc.enigma.translation.representation; -import cuchaz.enigma.source.RenamableTokenType; -import cuchaz.enigma.translation.Translatable; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMap; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.mapping.ResolutionStrategy; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.translation.representation.entry.ParentedEntry; +import org.quiltmc.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.translation.Translatable; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMap; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.mapping.ResolutionStrategy; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.translation.representation.entry.ParentedEntry; import java.util.Objects; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/MethodDescriptor.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/MethodDescriptor.java similarity index 88% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/MethodDescriptor.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/MethodDescriptor.java index 4df0653ed..8ac2b9fb5 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/MethodDescriptor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/MethodDescriptor.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.translation.representation; - -import cuchaz.enigma.translation.Translatable; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMap; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +package org.quiltmc.enigma.translation.representation; + +import org.quiltmc.enigma.translation.Translatable; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMap; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import java.util.ArrayList; import java.util.List; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/ParameterAccessFlags.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/ParameterAccessFlags.java similarity index 88% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/ParameterAccessFlags.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/ParameterAccessFlags.java index 46b1d218c..91171a085 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/ParameterAccessFlags.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/ParameterAccessFlags.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.translation.representation; +package org.quiltmc.enigma.translation.representation; import org.objectweb.asm.Opcodes; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/Signature.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/Signature.java similarity index 82% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/Signature.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/Signature.java index 3ec3cf0f5..7c6b26c36 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/Signature.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/Signature.java @@ -1,13 +1,13 @@ -package cuchaz.enigma.translation.representation; - -import cuchaz.enigma.bytecode.translators.TranslationSignatureVisitor; -import cuchaz.enigma.translation.Translatable; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMap; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +package org.quiltmc.enigma.translation.representation; + +import org.quiltmc.enigma.bytecode.translator.TranslationSignatureVisitor; +import org.quiltmc.enigma.translation.Translatable; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMap; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import org.objectweb.asm.signature.SignatureReader; import org.objectweb.asm.signature.SignatureVisitor; import org.objectweb.asm.signature.SignatureWriter; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/TypeDescriptor.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/TypeDescriptor.java similarity index 92% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/TypeDescriptor.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/TypeDescriptor.java index 983a8f0c5..ffd431215 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/TypeDescriptor.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/TypeDescriptor.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.translation.representation; +package org.quiltmc.enigma.translation.representation; import com.google.common.base.Preconditions; import com.google.common.collect.Maps; -import cuchaz.enigma.translation.Translatable; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMap; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.Translatable; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMap; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import java.util.Map; import java.util.function.UnaryOperator; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/ClassDefEntry.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/ClassDefEntry.java similarity index 89% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/entry/ClassDefEntry.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/ClassDefEntry.java index 00a46eede..09fea7af7 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/ClassDefEntry.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/ClassDefEntry.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.translation.representation.entry; +package org.quiltmc.enigma.translation.representation.entry; import com.google.common.base.Preconditions; -import cuchaz.enigma.source.RenamableTokenType; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.Signature; +import org.quiltmc.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.Signature; import java.util.Arrays; import javax.annotation.Nonnull; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/ClassEntry.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/ClassEntry.java similarity index 92% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/entry/ClassEntry.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/ClassEntry.java index 6756b3ed5..6f3ddbfe9 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/ClassEntry.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/ClassEntry.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.translation.representation.entry; - -import cuchaz.enigma.source.RenamableTokenType; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.IdentifierValidation; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.utils.validation.ValidationContext; +package org.quiltmc.enigma.translation.representation.entry; + +import org.quiltmc.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.IdentifierValidation; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.util.validation.ValidationContext; import javax.annotation.Nonnull; import javax.annotation.Nullable; diff --git a/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/DefEntry.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/DefEntry.java new file mode 100644 index 000000000..b36d2e5c1 --- /dev/null +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/DefEntry.java @@ -0,0 +1,7 @@ +package org.quiltmc.enigma.translation.representation.entry; + +import org.quiltmc.enigma.translation.representation.AccessFlags; + +public interface DefEntry

> extends Entry

{ + AccessFlags getAccess(); +} diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/Entry.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/Entry.java similarity index 95% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/entry/Entry.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/Entry.java index 6bb3c66c6..24e4bdb43 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/Entry.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/Entry.java @@ -1,8 +1,8 @@ -package cuchaz.enigma.translation.representation.entry; +package org.quiltmc.enigma.translation.representation.entry; -import cuchaz.enigma.translation.Translatable; -import cuchaz.enigma.translation.mapping.IdentifierValidation; -import cuchaz.enigma.utils.validation.ValidationContext; +import org.quiltmc.enigma.translation.Translatable; +import org.quiltmc.enigma.translation.mapping.IdentifierValidation; +import org.quiltmc.enigma.util.validation.ValidationContext; import java.util.ArrayList; import java.util.List; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/FieldDefEntry.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/FieldDefEntry.java similarity index 81% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/entry/FieldDefEntry.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/FieldDefEntry.java index c65c0afd8..ac5712799 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/FieldDefEntry.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/FieldDefEntry.java @@ -1,13 +1,13 @@ -package cuchaz.enigma.translation.representation.entry; +package org.quiltmc.enigma.translation.representation.entry; import com.google.common.base.Preconditions; -import cuchaz.enigma.source.RenamableTokenType; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.Signature; -import cuchaz.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.Signature; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; import javax.annotation.Nonnull; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/FieldEntry.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/FieldEntry.java similarity index 87% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/entry/FieldEntry.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/FieldEntry.java index 67ca62e3d..717ae826f 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/FieldEntry.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/FieldEntry.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.translation.representation.entry; +package org.quiltmc.enigma.translation.representation.entry; import com.google.common.base.Preconditions; -import cuchaz.enigma.source.RenamableTokenType; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; import java.util.Objects; import javax.annotation.Nonnull; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/LocalVariableDefEntry.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/LocalVariableDefEntry.java similarity index 82% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/entry/LocalVariableDefEntry.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/LocalVariableDefEntry.java index 14189c2d4..bb1213ee8 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/LocalVariableDefEntry.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/LocalVariableDefEntry.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.translation.representation.entry; +package org.quiltmc.enigma.translation.representation.entry; import com.google.common.base.Preconditions; -import cuchaz.enigma.source.RenamableTokenType; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; import javax.annotation.Nonnull; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/LocalVariableEntry.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/LocalVariableEntry.java similarity index 90% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/entry/LocalVariableEntry.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/LocalVariableEntry.java index 2afb4a09b..9f493692b 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/LocalVariableEntry.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/LocalVariableEntry.java @@ -1,10 +1,10 @@ -package cuchaz.enigma.translation.representation.entry; +package org.quiltmc.enigma.translation.representation.entry; import com.google.common.base.Preconditions; -import cuchaz.enigma.source.RenamableTokenType; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; import java.util.Objects; import javax.annotation.Nonnull; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/MethodDefEntry.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/MethodDefEntry.java similarity index 82% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/entry/MethodDefEntry.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/MethodDefEntry.java index 051b7ca3e..3a96caaa2 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/MethodDefEntry.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/MethodDefEntry.java @@ -1,13 +1,13 @@ -package cuchaz.enigma.translation.representation.entry; +package org.quiltmc.enigma.translation.representation.entry; import com.google.common.base.Preconditions; -import cuchaz.enigma.source.RenamableTokenType; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.Signature; +import org.quiltmc.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.Signature; import javax.annotation.Nonnull; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/MethodEntry.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/MethodEntry.java similarity index 88% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/entry/MethodEntry.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/MethodEntry.java index 69dcc328b..2a5768d93 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/MethodEntry.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/MethodEntry.java @@ -1,14 +1,14 @@ -package cuchaz.enigma.translation.representation.entry; +package org.quiltmc.enigma.translation.representation.entry; import com.google.common.base.Preconditions; -import cuchaz.enigma.analysis.index.EntryIndex; -import cuchaz.enigma.source.RenamableTokenType; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.ArgumentDescriptor; -import cuchaz.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.analysis.index.EntryIndex; +import org.quiltmc.enigma.source.RenamableTokenType; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.ArgumentDescriptor; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; import java.util.ArrayList; import java.util.Iterator; diff --git a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/ParentedEntry.java b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/ParentedEntry.java similarity index 83% rename from enigma/src/main/java/cuchaz/enigma/translation/representation/entry/ParentedEntry.java rename to enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/ParentedEntry.java index 0f9ed5ee4..f04495768 100644 --- a/enigma/src/main/java/cuchaz/enigma/translation/representation/entry/ParentedEntry.java +++ b/enigma/src/main/java/org/quiltmc/enigma/translation/representation/entry/ParentedEntry.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.translation.representation.entry; +package org.quiltmc.enigma.translation.representation.entry; import com.google.common.base.Preconditions; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMap; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.mapping.ResolutionStrategy; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMap; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.mapping.ResolutionStrategy; import javax.annotation.Nonnull; import javax.annotation.Nullable; diff --git a/enigma/src/main/java/cuchaz/enigma/utils/AsmUtil.java b/enigma/src/main/java/org/quiltmc/enigma/util/AsmUtil.java similarity index 93% rename from enigma/src/main/java/cuchaz/enigma/utils/AsmUtil.java rename to enigma/src/main/java/org/quiltmc/enigma/util/AsmUtil.java index 6732a59bb..501bf1381 100644 --- a/enigma/src/main/java/cuchaz/enigma/utils/AsmUtil.java +++ b/enigma/src/main/java/org/quiltmc/enigma/util/AsmUtil.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.utils; +package org.quiltmc.enigma.util; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassWriter; diff --git a/enigma/src/main/java/cuchaz/enigma/utils/I18n.java b/enigma/src/main/java/org/quiltmc/enigma/util/I18n.java similarity index 99% rename from enigma/src/main/java/cuchaz/enigma/utils/I18n.java rename to enigma/src/main/java/org/quiltmc/enigma/util/I18n.java index 73b2aaaf8..53edcff14 100644 --- a/enigma/src/main/java/cuchaz/enigma/utils/I18n.java +++ b/enigma/src/main/java/org/quiltmc/enigma/util/I18n.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.utils; +package org.quiltmc.enigma.util; import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; diff --git a/enigma/src/main/java/cuchaz/enigma/utils/Os.java b/enigma/src/main/java/org/quiltmc/enigma/util/Os.java similarity index 94% rename from enigma/src/main/java/cuchaz/enigma/utils/Os.java rename to enigma/src/main/java/org/quiltmc/enigma/util/Os.java index bc97480a0..e6c3eb7d9 100644 --- a/enigma/src/main/java/cuchaz/enigma/utils/Os.java +++ b/enigma/src/main/java/org/quiltmc/enigma/util/Os.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.utils; +package org.quiltmc.enigma.util; import java.util.Locale; diff --git a/enigma/src/main/java/cuchaz/enigma/utils/Pair.java b/enigma/src/main/java/org/quiltmc/enigma/util/Pair.java similarity index 88% rename from enigma/src/main/java/cuchaz/enigma/utils/Pair.java rename to enigma/src/main/java/org/quiltmc/enigma/util/Pair.java index 1a4911195..cb23af929 100644 --- a/enigma/src/main/java/cuchaz/enigma/utils/Pair.java +++ b/enigma/src/main/java/org/quiltmc/enigma/util/Pair.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.utils; +package org.quiltmc.enigma.util; import java.util.Objects; diff --git a/enigma/src/main/java/cuchaz/enigma/utils/Result.java b/enigma/src/main/java/org/quiltmc/enigma/util/Result.java similarity index 98% rename from enigma/src/main/java/cuchaz/enigma/utils/Result.java rename to enigma/src/main/java/org/quiltmc/enigma/util/Result.java index 768ccc576..0ba5f177a 100644 --- a/enigma/src/main/java/cuchaz/enigma/utils/Result.java +++ b/enigma/src/main/java/org/quiltmc/enigma/util/Result.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.utils; +package org.quiltmc.enigma.util; import java.util.Objects; import java.util.Optional; diff --git a/enigma/src/main/java/cuchaz/enigma/utils/TristateChange.java b/enigma/src/main/java/org/quiltmc/enigma/util/TristateChange.java similarity index 98% rename from enigma/src/main/java/cuchaz/enigma/utils/TristateChange.java rename to enigma/src/main/java/org/quiltmc/enigma/util/TristateChange.java index bd367a166..b5909dc06 100644 --- a/enigma/src/main/java/cuchaz/enigma/utils/TristateChange.java +++ b/enigma/src/main/java/org/quiltmc/enigma/util/TristateChange.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.utils; +package org.quiltmc.enigma.util; import java.util.Objects; diff --git a/enigma/src/main/java/cuchaz/enigma/utils/Utils.java b/enigma/src/main/java/org/quiltmc/enigma/util/Utils.java similarity index 98% rename from enigma/src/main/java/cuchaz/enigma/utils/Utils.java rename to enigma/src/main/java/org/quiltmc/enigma/util/Utils.java index a83a7f0b2..a36c1a2b4 100644 --- a/enigma/src/main/java/cuchaz/enigma/utils/Utils.java +++ b/enigma/src/main/java/org/quiltmc/enigma/util/Utils.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.utils; +package org.quiltmc.enigma.util; import com.google.common.io.CharStreams; diff --git a/enigma/src/main/java/cuchaz/enigma/utils/validation/Message.java b/enigma/src/main/java/org/quiltmc/enigma/util/validation/Message.java similarity index 97% rename from enigma/src/main/java/cuchaz/enigma/utils/validation/Message.java rename to enigma/src/main/java/org/quiltmc/enigma/util/validation/Message.java index f78facbb2..418605afe 100644 --- a/enigma/src/main/java/cuchaz/enigma/utils/validation/Message.java +++ b/enigma/src/main/java/org/quiltmc/enigma/util/validation/Message.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.utils.validation; +package org.quiltmc.enigma.util.validation; -import cuchaz.enigma.utils.I18n; +import org.quiltmc.enigma.util.I18n; public class Message { public static final Message EMPTY_FIELD = create(Type.ERROR, "empty_field"); diff --git a/enigma/src/main/java/cuchaz/enigma/utils/validation/ParameterizedMessage.java b/enigma/src/main/java/org/quiltmc/enigma/util/validation/ParameterizedMessage.java similarity index 94% rename from enigma/src/main/java/cuchaz/enigma/utils/validation/ParameterizedMessage.java rename to enigma/src/main/java/org/quiltmc/enigma/util/validation/ParameterizedMessage.java index a137e02cd..3e74f3a14 100644 --- a/enigma/src/main/java/cuchaz/enigma/utils/validation/ParameterizedMessage.java +++ b/enigma/src/main/java/org/quiltmc/enigma/util/validation/ParameterizedMessage.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.utils.validation; +package org.quiltmc.enigma.util.validation; import java.io.File; diff --git a/enigma/src/main/java/cuchaz/enigma/utils/validation/PrintNotifier.java b/enigma/src/main/java/org/quiltmc/enigma/util/validation/PrintNotifier.java similarity index 95% rename from enigma/src/main/java/cuchaz/enigma/utils/validation/PrintNotifier.java rename to enigma/src/main/java/org/quiltmc/enigma/util/validation/PrintNotifier.java index 93b476052..ba0f7b9e6 100644 --- a/enigma/src/main/java/cuchaz/enigma/utils/validation/PrintNotifier.java +++ b/enigma/src/main/java/org/quiltmc/enigma/util/validation/PrintNotifier.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.utils.validation; +package org.quiltmc.enigma.util.validation; import org.tinylog.Logger; diff --git a/enigma/src/main/java/cuchaz/enigma/utils/validation/StandardValidation.java b/enigma/src/main/java/org/quiltmc/enigma/util/validation/StandardValidation.java similarity index 94% rename from enigma/src/main/java/cuchaz/enigma/utils/validation/StandardValidation.java rename to enigma/src/main/java/org/quiltmc/enigma/util/validation/StandardValidation.java index 01809481f..36a2518c9 100644 --- a/enigma/src/main/java/cuchaz/enigma/utils/validation/StandardValidation.java +++ b/enigma/src/main/java/org/quiltmc/enigma/util/validation/StandardValidation.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.utils.validation; +package org.quiltmc.enigma.util.validation; public class StandardValidation { public static boolean notBlank(ValidationContext vc, String value) { diff --git a/enigma/src/main/java/cuchaz/enigma/utils/validation/ValidationContext.java b/enigma/src/main/java/org/quiltmc/enigma/util/validation/ValidationContext.java similarity index 95% rename from enigma/src/main/java/cuchaz/enigma/utils/validation/ValidationContext.java rename to enigma/src/main/java/org/quiltmc/enigma/util/validation/ValidationContext.java index 1f7491621..3438d13fe 100644 --- a/enigma/src/main/java/cuchaz/enigma/utils/validation/ValidationContext.java +++ b/enigma/src/main/java/org/quiltmc/enigma/util/validation/ValidationContext.java @@ -1,6 +1,4 @@ -package cuchaz.enigma.utils.validation; - -import cuchaz.enigma.utils.validation.Message.Type; +package org.quiltmc.enigma.util.validation; import java.util.ArrayList; import java.util.Collections; @@ -58,7 +56,7 @@ public boolean canProceed() { List messagesCopy = new ArrayList<>(this.messages); for (ParameterizedMessage m : messagesCopy) { - if (m.getType() == Type.WARNING) { + if (m.getType() == Message.Type.WARNING) { this.messages.remove(m); if (!this.notifier.verifyWarning(m)) { return false; @@ -66,7 +64,7 @@ public boolean canProceed() { } } - return this.messages.stream().noneMatch(m -> m.message().getType() == Type.ERROR); + return this.messages.stream().noneMatch(m -> m.message().getType() == Message.Type.ERROR); } /** diff --git a/enigma/src/main/resources/META-INF/services/cuchaz.enigma.api.EnigmaPlugin b/enigma/src/main/resources/META-INF/services/cuchaz.enigma.api.EnigmaPlugin deleted file mode 100644 index 136a3e78d..000000000 --- a/enigma/src/main/resources/META-INF/services/cuchaz.enigma.api.EnigmaPlugin +++ /dev/null @@ -1 +0,0 @@ -cuchaz.enigma.analysis.BuiltinPlugin diff --git a/enigma/src/main/resources/META-INF/services/org.quiltmc.enigma.api.EnigmaPlugin b/enigma/src/main/resources/META-INF/services/org.quiltmc.enigma.api.EnigmaPlugin new file mode 100644 index 000000000..10078420d --- /dev/null +++ b/enigma/src/main/resources/META-INF/services/org.quiltmc.enigma.api.EnigmaPlugin @@ -0,0 +1 @@ +org.quiltmc.enigma.analysis.BuiltinPlugin diff --git a/enigma/src/test/java/cuchaz/enigma/TestJarIndexBridgeMethods.java b/enigma/src/test/java/cuchaz/enigma/TestJarIndexBridgeMethods.java deleted file mode 100644 index 61e9faa48..000000000 --- a/enigma/src/test/java/cuchaz/enigma/TestJarIndexBridgeMethods.java +++ /dev/null @@ -1,168 +0,0 @@ -package cuchaz.enigma; - -import cuchaz.enigma.analysis.index.BridgeMethodIndex; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.classprovider.CachingClassProvider; -import cuchaz.enigma.classprovider.JarClassProvider; -import cuchaz.enigma.classprovider.ObfuscationFixClassProvider; -import cuchaz.enigma.source.DecompilerService; -import cuchaz.enigma.source.Decompilers; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import org.junit.jupiter.api.Test; - -import java.nio.file.Path; -import java.util.HashMap; -import java.util.Map; - -import static cuchaz.enigma.TestEntryFactory.*; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; - -/** - * Tests to reproduce issue #9 - */ -public class TestJarIndexBridgeMethods { - public static final Path JAR = TestUtil.obfJar("bridge"); - - private final CachingClassProvider classProvider; - private final JarIndex index; - private final Map tokenCheckers = new HashMap<>(); - - private final ClassEntry baseClass = newClass("a"); - private final ClassEntry otherClass = newClass("b"); - private final ClassEntry subClass = newClass("c"); - private final ClassEntry innerSubClass = newClass("c$a"); - - public TestJarIndexBridgeMethods() throws Exception { - JarClassProvider jcp = new JarClassProvider(JAR); - this.classProvider = new CachingClassProvider(jcp); - this.index = JarIndex.empty(); - this.index.indexJar(jcp.getClassNames(), this.classProvider, ProgressListener.none()); - } - - @Test - public void obfEntries() { - assertThat(this.index.getEntryIndex().getClasses(), containsInAnyOrder(newClass("cuchaz/enigma/inputs/Keep"), this.baseClass, - this.otherClass, this.subClass, this.innerSubClass)); - } - - @Test - public void testBase() { - BridgeMethodIndex index = this.index.getBridgeMethodIndex(); - - assertThat(index.isBridgeMethod(newMethod(this.baseClass, "a", "()I")), is(false)); - assertThat(index.getBridgeFromSpecialized(newMethod(this.baseClass, "a", "()La;")), nullValue()); - assertThat(index.isSpecializedMethod(newMethod(this.baseClass, "b", "(II)La;")), is(false)); - assertThat(index.getSpecializedFromBridge(newMethod(this.baseClass, "c", "(I)La;")), nullValue()); - } - - @Test - public void testSub() { - BridgeMethodIndex index = this.index.getBridgeMethodIndex(); - - assertThat(index.isBridgeMethod(newMethod(this.subClass, "f", "()Lc;")), is(false)); - assertThat(index.isBridgeMethod(newMethod(this.subClass, "d", "()La;")), is(true)); - assertThat(index.getSpecializedFromBridge(newMethod(this.subClass, "b", "(II)La;")), - is(newMethod(this.subClass, "d", "(II)Lc;"))); - assertThat(index.isSpecializedMethod(newMethod(this.subClass, "f", "(I)Lc;")), is(true)); - assertThat(index.isSpecializedMethod(newMethod(this.subClass, "c", "(I)La;")), is(false)); - assertThat(index.getBridgeFromSpecialized(newMethod(this.subClass, "e", "(I)Lc;")), - is(newMethod(this.subClass, "b", "(I)La;"))); - assertThat(index.getBridgeFromSpecialized(newMethod(this.subClass, "g", "()Lc;")), - is(newMethod(this.subClass, "e", "()La;"))); - } - - @Test - public void testInnerSub() { - BridgeMethodIndex index = this.index.getBridgeMethodIndex(); - - assertThat(index.isBridgeMethod(newMethod(this.innerSubClass, "d", "()La;")), is(true)); - assertThat(index.getSpecializedFromBridge(newMethod(this.innerSubClass, "a", "(I)La;")), - is(newMethod(this.subClass, "d", "(I)Lc;"))); - assertThat(index.getSpecializedFromBridge(newMethod(this.innerSubClass, "e", "()La;")), - is(newMethod(this.subClass, "g", "()Lc;"))); - assertThat(index.isSpecializedMethod(newMethod(this.innerSubClass, "b", "(I)La;")), is(false)); - assertThat(index.getBridgeFromSpecialized(newMethod(this.innerSubClass, "c", "(I)La;")), nullValue()); - assertThat(index.getBridgeFromSpecialized(newMethod(this.innerSubClass, "b", "(II)La;")), nullValue()); - } - - @Test - public void testOther() { - BridgeMethodIndex index = this.index.getBridgeMethodIndex(); - - assertThat(index.getBridgeFromSpecialized(newMethod(this.otherClass, "a", "()Ljava/lang/Integer;")), - is(newMethod(this.otherClass, "get", "()Ljava/lang/Object;"))); - assertThat(index.getSpecializedFromBridge(newMethod(this.otherClass, "a", "(Ljava/lang/String;)Ljava/lang/Integer;")), nullValue()); - assertThat(index.getBridgeFromSpecialized(newMethod(this.otherClass, "get", "()Ljava/lang/Object;")), nullValue()); - assertThat(index.getSpecializedFromBridge(newMethod(this.otherClass, "apply", "(Ljava/lang/Object;)Ljava/lang/Object;")), - is(newMethod(this.otherClass, "a", "(Ljava/lang/String;)Ljava/lang/Integer;"))); - } - - @Test - public void testTokensBase() { - this.testTokensBase(Decompilers.VINEFLOWER); - this.testTokensBase(Decompilers.CFR); - this.testTokensBase(Decompilers.PROCYON); - } - - private void testTokensBase(DecompilerService decompiler) { - TokenChecker checker = this.getTokenChecker(decompiler); - assertThat(checker.getDeclarationToken(newMethod(this.baseClass, "d", "()La;")), is("d")); - assertThat(checker.getDeclarationToken(newMethod(this.baseClass, "a", "(I)La;")), is("a")); - assertThat(checker.getDeclarationToken(newMethod(this.baseClass, "b", "(II)La;")), is("b")); - } - - @Test - public void testTokensSub() { - this.testTokensSub(Decompilers.VINEFLOWER); - this.testTokensSub(Decompilers.CFR); - this.testTokensSub(Decompilers.PROCYON); - } - - private void testTokensSub(DecompilerService decompiler) { - TokenChecker checker = this.getTokenChecker(decompiler); - assertThat(checker.getDeclarationToken(newMethod(this.subClass, "d", "()La;")), is(emptyOrNullString())); - assertThat(checker.getDeclarationToken(newMethod(this.subClass, "f", "()Lc;")), is("f")); - assertThat(checker.getDeclarationToken(newMethod(this.subClass, "a", "(I)La;")), is(emptyOrNullString())); - assertThat(checker.getDeclarationToken(newMethod(this.subClass, "d", "(I)Lc;")), is("d")); - assertThat(checker.getDeclarationToken(newMethod(this.subClass, "b", "(II)La;")), is(emptyOrNullString())); - assertThat(checker.getDeclarationToken(newMethod(this.subClass, "d", "(II)Lc;")), is("d")); - } - - @Test - public void testTokensInnerSub() { - this.testTokensInnerSub(Decompilers.VINEFLOWER); - this.testTokensInnerSub(Decompilers.CFR); - this.testTokensInnerSub(Decompilers.PROCYON); - } - - private void testTokensInnerSub(DecompilerService decompiler) { - TokenChecker checker = this.getTokenChecker(decompiler); - assertThat(checker.getDeclarationToken(newMethod(this.innerSubClass, "d", "()La;")), is(emptyOrNullString())); - assertThat(checker.getDeclarationToken(newMethod(this.innerSubClass, "f", "()Lc;")), is(emptyOrNullString())); - assertThat(checker.getDeclarationToken(newMethod(this.innerSubClass, "a", "(I)La;")), is(emptyOrNullString())); - assertThat(checker.getDeclarationToken(newMethod(this.innerSubClass, "d", "(I)Lc;")), is(emptyOrNullString())); - assertThat(checker.getDeclarationToken(newMethod(this.innerSubClass, "b", "(II)La;")), is(emptyOrNullString())); - assertThat(checker.getDeclarationToken(newMethod(this.innerSubClass, "d", "(II)Lc;")), is(emptyOrNullString())); - } - - @Test - public void testTokensOther() { - this.testTokensOther(Decompilers.VINEFLOWER); - this.testTokensOther(Decompilers.CFR); - this.testTokensOther(Decompilers.PROCYON); - } - - private void testTokensOther(DecompilerService decompiler) { - TokenChecker checker = this.getTokenChecker(decompiler); - assertThat(checker.getDeclarationToken(newMethod(this.otherClass, "a", "()Ljava/lang/Integer;")), is("a")); - assertThat(checker.getDeclarationToken(newMethod(this.otherClass, "get", "()Ljava/lang/Object;")), is(emptyOrNullString())); - assertThat(checker.getDeclarationToken(newMethod(this.otherClass, "a", "(Ljava/lang/String;)Ljava/lang/Integer;")), is("a")); - assertThat(checker.getDeclarationToken(newMethod(this.otherClass, "apply", "(Ljava/lang/Object;)Ljava/lang/Object;")), is(emptyOrNullString())); - } - - private TokenChecker getTokenChecker(DecompilerService decompiler) { - return this.tokenCheckers.computeIfAbsent(decompiler, d -> - new TokenChecker(JAR, d, new ObfuscationFixClassProvider(this.classProvider, this.index))); - } -} diff --git a/enigma/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java b/enigma/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java deleted file mode 100644 index f67b4e8ac..000000000 --- a/enigma/src/test/java/cuchaz/enigma/TestJarIndexConstructorReferences.java +++ /dev/null @@ -1,109 +0,0 @@ -package cuchaz.enigma; - -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.classprovider.CachingClassProvider; -import cuchaz.enigma.classprovider.JarClassProvider; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import org.junit.jupiter.api.Test; - -import java.nio.file.Path; -import java.util.Collection; - -import static cuchaz.enigma.TestEntryFactory.*; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; - -public class TestJarIndexConstructorReferences { - public static final Path JAR = TestUtil.obfJar("constructors"); - - private static final ClassEntry BASE_CLASS = newClass("a"); - private static final ClassEntry SUB_CLASS = newClass("d"); - private static final ClassEntry SUBSUB_CLASS = newClass("e"); - private static final ClassEntry DEFAULT_CLASS = newClass("c"); - private static final ClassEntry CALLER_CLASS = newClass("b"); - - private final JarIndex index; - - public TestJarIndexConstructorReferences() throws Exception { - JarClassProvider jcp = new JarClassProvider(JAR); - this.index = JarIndex.empty(); - this.index.indexJar(jcp.getClassNames(), new CachingClassProvider(jcp), ProgressListener.none()); - } - - @Test - public void obfEntries() { - assertThat(this.index.getEntryIndex().getClasses(), containsInAnyOrder(newClass("cuchaz/enigma/inputs/Keep"), BASE_CLASS, - SUB_CLASS, SUBSUB_CLASS, DEFAULT_CLASS, CALLER_CLASS)); - } - - @Test - public void baseDefault() { - MethodEntry source = newMethod(BASE_CLASS, "", "()V"); - Collection> references = this.index.getReferenceIndex().getReferencesToMethod(source); - assertThat(references, containsInAnyOrder( - newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "a", "()V"), - newBehaviorReferenceByMethod(source, SUB_CLASS.getName(), "", "()V"), - newBehaviorReferenceByMethod(source, SUB_CLASS.getName(), "", "(III)V") - )); - } - - @Test - public void baseInt() { - MethodEntry source = newMethod(BASE_CLASS, "", "(I)V"); - assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), containsInAnyOrder( - newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "b", "()V") - )); - } - - @Test - public void subDefault() { - MethodEntry source = newMethod(SUB_CLASS, "", "()V"); - assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), containsInAnyOrder( - newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "c", "()V"), - newBehaviorReferenceByMethod(source, SUB_CLASS.getName(), "", "(I)V") - )); - } - - @Test - public void subInt() { - MethodEntry source = newMethod(SUB_CLASS, "", "(I)V"); - assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), containsInAnyOrder( - newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "d", "()V"), - newBehaviorReferenceByMethod(source, SUB_CLASS.getName(), "", "(II)V"), - newBehaviorReferenceByMethod(source, SUBSUB_CLASS.getName(), "", "(I)V") - )); - } - - @Test - public void subIntInt() { - MethodEntry source = newMethod(SUB_CLASS, "", "(II)V"); - assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), containsInAnyOrder( - newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "e", "()V") - )); - } - - @Test - public void subIntIntInt() { - MethodEntry source = newMethod(SUB_CLASS, "", "(III)V"); - assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), is(empty())); - } - - @Test - public void subsubInt() { - MethodEntry source = newMethod(SUBSUB_CLASS, "", "(I)V"); - assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), containsInAnyOrder( - newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "f", "()V") - )); - } - - @Test - public void defaultConstructable() { - MethodEntry source = newMethod(DEFAULT_CLASS, "", "()V"); - assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), containsInAnyOrder( - newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "g", "()V") - )); - } -} diff --git a/enigma/src/test/java/cuchaz/enigma/TestJarIndexInheritanceTree.java b/enigma/src/test/java/cuchaz/enigma/TestJarIndexInheritanceTree.java deleted file mode 100644 index c0b906303..000000000 --- a/enigma/src/test/java/cuchaz/enigma/TestJarIndexInheritanceTree.java +++ /dev/null @@ -1,212 +0,0 @@ -package cuchaz.enigma; - -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.analysis.index.EntryIndex; -import cuchaz.enigma.analysis.index.InheritanceIndex; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.classprovider.CachingClassProvider; -import cuchaz.enigma.classprovider.JarClassProvider; -import cuchaz.enigma.translation.mapping.EntryResolver; -import cuchaz.enigma.translation.mapping.IndexEntryResolver; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import org.junit.jupiter.api.Test; -import org.objectweb.asm.Opcodes; - -import java.nio.file.Path; -import java.util.Collection; - -import static cuchaz.enigma.TestEntryFactory.*; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; - -public class TestJarIndexInheritanceTree { - public static final Path JAR = TestUtil.obfJar("inheritanceTree"); - - private static final ClassEntry BASE_CLASS = newClass("a"); - private static final ClassEntry SUB_CLASS_A = newClass("b"); - private static final ClassEntry SUB_CLASS_AA = newClass("d"); - private static final ClassEntry SUB_CLASS_B = newClass("c"); - private static final FieldEntry NAME_FIELD = newField(BASE_CLASS, "a", "Ljava/lang/String;"); - private static final FieldEntry NUM_THINGS_FIELD = newField(SUB_CLASS_B, "a", "I"); - - private final JarIndex index; - - public TestJarIndexInheritanceTree() throws Exception { - JarClassProvider jcp = new JarClassProvider(JAR); - this.index = JarIndex.empty(); - this.index.indexJar(jcp.getClassNames(), new CachingClassProvider(jcp), ProgressListener.none()); - } - - @Test - public void obfEntries() { - assertThat(this.index.getEntryIndex().getClasses(), containsInAnyOrder( - newClass("cuchaz/enigma/inputs/Keep"), BASE_CLASS, SUB_CLASS_A, SUB_CLASS_AA, SUB_CLASS_B - )); - } - - @Test - public void translationIndex() { - InheritanceIndex index = this.index.getInheritanceIndex(); - - // base class - assertThat(index.getParents(BASE_CLASS), is(empty())); - assertThat(index.getAncestors(BASE_CLASS), is(empty())); - assertThat(index.getChildren(BASE_CLASS), containsInAnyOrder(SUB_CLASS_A, SUB_CLASS_B - )); - - // subclass a - assertThat(index.getParents(SUB_CLASS_A), contains(BASE_CLASS)); - assertThat(index.getAncestors(SUB_CLASS_A), containsInAnyOrder(BASE_CLASS)); - assertThat(index.getChildren(SUB_CLASS_A), contains(SUB_CLASS_AA)); - - // subclass aa - assertThat(index.getParents(SUB_CLASS_AA), contains(SUB_CLASS_A)); - assertThat(index.getAncestors(SUB_CLASS_AA), containsInAnyOrder(SUB_CLASS_A, BASE_CLASS)); - assertThat(index.getChildren(SUB_CLASS_AA), is(empty())); - - // subclass b - assertThat(index.getParents(SUB_CLASS_B), contains(BASE_CLASS)); - assertThat(index.getAncestors(SUB_CLASS_B), containsInAnyOrder(BASE_CLASS)); - assertThat(index.getChildren(SUB_CLASS_B), is(empty())); - } - - @Test - public void access() { - assertThat(this.index.getEntryIndex().getFieldAccess(NAME_FIELD), is(new AccessFlags(Opcodes.ACC_PRIVATE))); - assertThat(this.index.getEntryIndex().getFieldAccess(NUM_THINGS_FIELD), is(new AccessFlags(Opcodes.ACC_PRIVATE))); - } - - @Test - public void relatedMethodImplementations() { - Collection entries; - - EntryResolver resolver = new IndexEntryResolver(this.index); - // getName() - entries = resolver.resolveEquivalentMethods(newMethod(BASE_CLASS, "a", "()Ljava/lang/String;")); - assertThat(entries, containsInAnyOrder( - newMethod(BASE_CLASS, "a", "()Ljava/lang/String;"), - newMethod(SUB_CLASS_AA, "a", "()Ljava/lang/String;") - )); - entries = resolver.resolveEquivalentMethods(newMethod(SUB_CLASS_AA, "a", "()Ljava/lang/String;")); - assertThat(entries, containsInAnyOrder( - newMethod(BASE_CLASS, "a", "()Ljava/lang/String;"), - newMethod(SUB_CLASS_AA, "a", "()Ljava/lang/String;") - )); - - // doBaseThings() - entries = resolver.resolveEquivalentMethods(newMethod(BASE_CLASS, "a", "()V")); - assertThat(entries, containsInAnyOrder( - newMethod(BASE_CLASS, "a", "()V"), - newMethod(SUB_CLASS_AA, "a", "()V"), - newMethod(SUB_CLASS_B, "a", "()V") - )); - entries = resolver.resolveEquivalentMethods(newMethod(SUB_CLASS_AA, "a", "()V")); - assertThat(entries, containsInAnyOrder( - newMethod(BASE_CLASS, "a", "()V"), - newMethod(SUB_CLASS_AA, "a", "()V"), - newMethod(SUB_CLASS_B, "a", "()V") - )); - entries = resolver.resolveEquivalentMethods(newMethod(SUB_CLASS_B, "a", "()V")); - assertThat(entries, containsInAnyOrder( - newMethod(BASE_CLASS, "a", "()V"), - newMethod(SUB_CLASS_AA, "a", "()V"), - newMethod(SUB_CLASS_B, "a", "()V") - )); - - // doBThings - entries = resolver.resolveEquivalentMethods(newMethod(SUB_CLASS_B, "b", "()V")); - assertThat(entries, containsInAnyOrder(newMethod(SUB_CLASS_B, "b", "()V"))); - } - - @Test - public void fieldReferences() { - Collection> references; - - // name - references = this.index.getReferenceIndex().getReferencesToField(NAME_FIELD); - assertThat(references, containsInAnyOrder( - newFieldReferenceByMethod(NAME_FIELD, BASE_CLASS.getName(), "", "(Ljava/lang/String;)V"), - newFieldReferenceByMethod(NAME_FIELD, BASE_CLASS.getName(), "a", "()Ljava/lang/String;") - )); - - // numThings - references = this.index.getReferenceIndex().getReferencesToField(NUM_THINGS_FIELD); - assertThat(references, containsInAnyOrder( - newFieldReferenceByMethod(NUM_THINGS_FIELD, SUB_CLASS_B.getName(), "", "()V"), - newFieldReferenceByMethod(NUM_THINGS_FIELD, SUB_CLASS_B.getName(), "b", "()V") - )); - } - - @Test - public void behaviorReferences() { - MethodEntry source; - Collection> references; - - // baseClass constructor - source = newMethod(BASE_CLASS, "", "(Ljava/lang/String;)V"); - references = this.index.getReferenceIndex().getReferencesToMethod(source); - assertThat(references, containsInAnyOrder( - newBehaviorReferenceByMethod(source, SUB_CLASS_A.getName(), "", "(Ljava/lang/String;)V"), - newBehaviorReferenceByMethod(source, SUB_CLASS_B.getName(), "", "()V") - )); - - // subClassA constructor - source = newMethod(SUB_CLASS_A, "", "(Ljava/lang/String;)V"); - references = this.index.getReferenceIndex().getReferencesToMethod(source); - assertThat(references, containsInAnyOrder( - newBehaviorReferenceByMethod(source, SUB_CLASS_AA.getName(), "", "()V") - )); - - // baseClass.getName() - source = newMethod(BASE_CLASS, "a", "()Ljava/lang/String;"); - references = this.index.getReferenceIndex().getReferencesToMethod(source); - assertThat(references, containsInAnyOrder( - newBehaviorReferenceByMethod(source, SUB_CLASS_AA.getName(), "a", "()Ljava/lang/String;"), - newBehaviorReferenceByMethod(source, SUB_CLASS_B.getName(), "a", "()V") - )); - - // subclassAA.getName() - source = newMethod(SUB_CLASS_AA, "a", "()Ljava/lang/String;"); - references = this.index.getReferenceIndex().getReferencesToMethod(source); - assertThat(references, containsInAnyOrder( - newBehaviorReferenceByMethod(source, SUB_CLASS_AA.getName(), "a", "()V") - )); - } - - @Test - public void containsEntries() { - EntryIndex entryIndex = this.index.getEntryIndex(); - // classes - assertThat(entryIndex.hasClass(BASE_CLASS), is(true)); - assertThat(entryIndex.hasClass(SUB_CLASS_A), is(true)); - assertThat(entryIndex.hasClass(SUB_CLASS_AA), is(true)); - assertThat(entryIndex.hasClass(SUB_CLASS_B), is(true)); - - // fields - assertThat(entryIndex.hasField(NAME_FIELD), is(true)); - assertThat(entryIndex.hasField(NUM_THINGS_FIELD), is(true)); - - // methods - // getName() - assertThat(entryIndex.hasMethod(newMethod(BASE_CLASS, "a", "()Ljava/lang/String;")), is(true)); - assertThat(entryIndex.hasMethod(newMethod(SUB_CLASS_A, "a", "()Ljava/lang/String;")), is(false)); - assertThat(entryIndex.hasMethod(newMethod(SUB_CLASS_AA, "a", "()Ljava/lang/String;")), is(true)); - assertThat(entryIndex.hasMethod(newMethod(SUB_CLASS_B, "a", "()Ljava/lang/String;")), is(false)); - - // doBaseThings() - assertThat(entryIndex.hasMethod(newMethod(BASE_CLASS, "a", "()V")), is(true)); - assertThat(entryIndex.hasMethod(newMethod(SUB_CLASS_A, "a", "()V")), is(false)); - assertThat(entryIndex.hasMethod(newMethod(SUB_CLASS_AA, "a", "()V")), is(true)); - assertThat(entryIndex.hasMethod(newMethod(SUB_CLASS_B, "a", "()V")), is(true)); - - // doBThings() - assertThat(entryIndex.hasMethod(newMethod(BASE_CLASS, "b", "()V")), is(false)); - assertThat(entryIndex.hasMethod(newMethod(SUB_CLASS_A, "b", "()V")), is(false)); - assertThat(entryIndex.hasMethod(newMethod(SUB_CLASS_AA, "b", "()V")), is(false)); - assertThat(entryIndex.hasMethod(newMethod(SUB_CLASS_B, "b", "()V")), is(true)); - } -} diff --git a/enigma/src/test/java/cuchaz/enigma/TestJarIndexLoneClass.java b/enigma/src/test/java/cuchaz/enigma/TestJarIndexLoneClass.java deleted file mode 100644 index 78abd3460..000000000 --- a/enigma/src/test/java/cuchaz/enigma/TestJarIndexLoneClass.java +++ /dev/null @@ -1,153 +0,0 @@ -package cuchaz.enigma; - -import cuchaz.enigma.analysis.ClassImplementationsTreeNode; -import cuchaz.enigma.analysis.ClassInheritanceTreeNode; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.analysis.IndexTreeBuilder; -import cuchaz.enigma.analysis.MethodImplementationsTreeNode; -import cuchaz.enigma.analysis.MethodInheritanceTreeNode; -import cuchaz.enigma.analysis.index.EntryIndex; -import cuchaz.enigma.analysis.index.InheritanceIndex; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.classprovider.CachingClassProvider; -import cuchaz.enigma.classprovider.JarClassProvider; -import cuchaz.enigma.translation.VoidTranslator; -import cuchaz.enigma.translation.representation.AccessFlags; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodDefEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import org.junit.jupiter.api.Test; - -import java.nio.file.Path; -import java.util.Collection; -import java.util.List; - -import static cuchaz.enigma.TestEntryFactory.*; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; - -public class TestJarIndexLoneClass { - public static final Path JAR = TestUtil.obfJar("loneClass"); - private final JarIndex index; - - public TestJarIndexLoneClass() throws Exception { - JarClassProvider jcp = new JarClassProvider(JAR); - this.index = JarIndex.empty(); - this.index.indexJar(jcp.getClassNames(), new CachingClassProvider(jcp), ProgressListener.none()); - } - - @Test - public void obfEntries() { - assertThat(this.index.getEntryIndex().getClasses(), containsInAnyOrder( - newClass("cuchaz/enigma/inputs/Keep"), - newClass("a") - )); - } - - @Test - public void translationIndex() { - InheritanceIndex inheritanceIndex = this.index.getInheritanceIndex(); - assertThat(inheritanceIndex.getParents(new ClassEntry("a")), is(empty())); - assertThat(inheritanceIndex.getParents(new ClassEntry("cuchaz/enigma/inputs/Keep")), is(empty())); - assertThat(inheritanceIndex.getAncestors(new ClassEntry("a")), is(empty())); - assertThat(inheritanceIndex.getAncestors(new ClassEntry("cuchaz/enigma/inputs/Keep")), is(empty())); - assertThat(inheritanceIndex.getChildren(new ClassEntry("a")), is(empty())); - assertThat(inheritanceIndex.getChildren(new ClassEntry("cuchaz/enigma/inputs/Keep")), is(empty())); - } - - @Test - public void access() { - EntryIndex entryIndex = this.index.getEntryIndex(); - assertThat(entryIndex.getFieldAccess(newField("a", "a", "Ljava/lang/String;")), is(AccessFlags.PRIVATE)); - assertThat(entryIndex.getMethodAccess(newMethod("a", "a", "()Ljava/lang/String;")), is(AccessFlags.PUBLIC)); - assertThat(entryIndex.getFieldAccess(newField("a", "b", "Ljava/lang/String;")), is(nullValue())); - assertThat(entryIndex.getFieldAccess(newField("a", "a", "LFoo;")), is(nullValue())); - } - - @Test - public void classInheritance() { - IndexTreeBuilder treeBuilder = new IndexTreeBuilder(this.index); - ClassInheritanceTreeNode node = treeBuilder.buildClassInheritance(VoidTranslator.INSTANCE, newClass("a")); - assertThat(node, is(not(nullValue()))); - assertThat(node.getClassName(), is("a")); - assertThat(node.getChildCount(), is(0)); - } - - @Test - public void methodInheritance() { - IndexTreeBuilder treeBuilder = new IndexTreeBuilder(this.index); - MethodEntry source = newMethod("a", "a", "()Ljava/lang/String;"); - MethodInheritanceTreeNode node = treeBuilder.buildMethodInheritance(VoidTranslator.INSTANCE, source); - assertThat(node, is(not(nullValue()))); - assertThat(node.getMethodEntry(), is(source)); - assertThat(node.getChildCount(), is(0)); - } - - @Test - public void classImplementations() { - IndexTreeBuilder treeBuilder = new IndexTreeBuilder(this.index); - ClassImplementationsTreeNode node = treeBuilder.buildClassImplementations(VoidTranslator.INSTANCE, newClass("a")); - assertThat(node, is(nullValue())); - } - - @Test - public void methodImplementations() { - IndexTreeBuilder treeBuilder = new IndexTreeBuilder(this.index); - MethodEntry source = newMethod("a", "a", "()Ljava/lang/String;"); - - List nodes = treeBuilder.buildMethodImplementations(VoidTranslator.INSTANCE, source); - assertThat(nodes, hasSize(1)); - assertThat(nodes.get(0).getMethodEntry(), is(source)); - } - - @Test - public void relatedMethodImplementations() { - Collection entries = this.index.getEntryResolver().resolveEquivalentMethods(newMethod("a", "a", "()Ljava/lang/String;")); - assertThat(entries, containsInAnyOrder( - newMethod("a", "a", "()Ljava/lang/String;") - )); - } - - @Test - public void fieldReferences() { - FieldEntry source = newField("a", "a", "Ljava/lang/String;"); - Collection> references = this.index.getReferenceIndex().getReferencesToField(source); - assertThat(references, containsInAnyOrder( - newFieldReferenceByMethod(source, "a", "", "(Ljava/lang/String;)V"), - newFieldReferenceByMethod(source, "a", "a", "()Ljava/lang/String;") - )); - } - - @Test - public void behaviorReferences() { - assertThat(this.index.getReferenceIndex().getReferencesToMethod(newMethod("a", "a", "()Ljava/lang/String;")), is(empty())); - } - - @Test - public void interfaces() { - assertThat(this.index.getInheritanceIndex().getParents(new ClassEntry("a")), is(empty())); - } - - @Test - public void implementingClasses() { - assertThat(this.index.getInheritanceIndex().getChildren(new ClassEntry("a")), is(empty())); - } - - @Test - public void isInterface() { - assertThat(this.index.getInheritanceIndex().isParent(new ClassEntry("a")), is(false)); - } - - @Test - public void testContains() { - EntryIndex entryIndex = this.index.getEntryIndex(); - assertThat(entryIndex.hasClass(newClass("a")), is(true)); - assertThat(entryIndex.hasClass(newClass("b")), is(false)); - assertThat(entryIndex.hasField(newField("a", "a", "Ljava/lang/String;")), is(true)); - assertThat(entryIndex.hasField(newField("a", "b", "Ljava/lang/String;")), is(false)); - assertThat(entryIndex.hasField(newField("a", "a", "LFoo;")), is(false)); - assertThat(entryIndex.hasMethod(newMethod("a", "a", "()Ljava/lang/String;")), is(true)); - assertThat(entryIndex.hasMethod(newMethod("a", "b", "()Ljava/lang/String;")), is(false)); - } -} diff --git a/enigma/src/test/java/cuchaz/enigma/TestTokensConstructors.java b/enigma/src/test/java/cuchaz/enigma/TestTokensConstructors.java deleted file mode 100644 index 62f90da91..000000000 --- a/enigma/src/test/java/cuchaz/enigma/TestTokensConstructors.java +++ /dev/null @@ -1,127 +0,0 @@ -package cuchaz.enigma; - -import cuchaz.enigma.source.Decompilers; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import org.junit.jupiter.api.Test; - -import java.nio.file.Path; - -import static cuchaz.enigma.TestEntryFactory.newBehaviorReferenceByMethod; -import static cuchaz.enigma.TestEntryFactory.newMethod; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; - -public class TestTokensConstructors extends TokenChecker { - private static final Path JAR = TestUtil.obfJar("constructors"); - - public TestTokensConstructors() throws Exception { - super(JAR, Decompilers.PROCYON); // Procyon is the only one that indexes constructor invocations - } - - @Test - public void baseDeclarations() { - assertThat(getDeclarationToken(newMethod("a", "", "()V")), is("a")); - assertThat(getDeclarationToken(newMethod("a", "", "(I)V")), is("a")); - } - - @Test - public void subDeclarations() { - assertThat(getDeclarationToken(newMethod("d", "", "()V")), is("d")); - assertThat(getDeclarationToken(newMethod("d", "", "(I)V")), is("d")); - assertThat(getDeclarationToken(newMethod("d", "", "(II)V")), is("d")); - assertThat(getDeclarationToken(newMethod("d", "", "(III)V")), is("d")); - } - - @Test - public void subsubDeclarations() { - assertThat(getDeclarationToken(newMethod("e", "", "(I)V")), is("e")); - } - - @Test - public void defaultDeclarations() { - assertThat(getDeclarationToken(newMethod("c", "", "()V")), nullValue()); - } - - @Test - public void baseDefaultReferences() { - MethodEntry source = newMethod("a", "", "()V"); - assertThat( - getReferenceTokens(newBehaviorReferenceByMethod(source, "b", "a", "()V")), - containsInAnyOrder("a") - ); - assertThat( - getReferenceTokens(newBehaviorReferenceByMethod(source, "d", "", "()V")), - is(empty()) // implicit call, not decompiled to token - ); - assertThat( - getReferenceTokens(newBehaviorReferenceByMethod(source, "d", "", "(III)V")), - is(empty()) // implicit call, not decompiled to token - ); - } - - @Test - public void baseIntReferences() { - MethodEntry source = newMethod("a", "", "(I)V"); - assertThat( - getReferenceTokens(newBehaviorReferenceByMethod(source, "b", "b", "()V")), - containsInAnyOrder("a") - ); - } - - @Test - public void subDefaultReferences() { - MethodEntry source = newMethod("d", "", "()V"); - assertThat( - getReferenceTokens(newBehaviorReferenceByMethod(source, "b", "c", "()V")), - containsInAnyOrder("d") - ); - assertThat( - getReferenceTokens(newBehaviorReferenceByMethod(source, "d", "", "(I)V")), - containsInAnyOrder("this") - ); - } - - @Test - public void subIntReferences() { - MethodEntry source = newMethod("d", "", "(I)V"); - assertThat(getReferenceTokens( - newBehaviorReferenceByMethod(source, "b", "d", "()V")), - containsInAnyOrder("d") - ); - assertThat(getReferenceTokens( - newBehaviorReferenceByMethod(source, "d", "", "(II)V")), - containsInAnyOrder("this") - ); - assertThat(getReferenceTokens( - newBehaviorReferenceByMethod(source, "e", "", "(I)V")), - containsInAnyOrder("super") - ); - } - - @Test - public void subIntIntReferences() { - MethodEntry source = newMethod("d", "", "(II)V"); - assertThat( - getReferenceTokens(newBehaviorReferenceByMethod(source, "b", "e", "()V")), - containsInAnyOrder("d") - ); - } - - @Test - public void subsubIntReferences() { - MethodEntry source = newMethod("e", "", "(I)V"); - assertThat( - getReferenceTokens(newBehaviorReferenceByMethod(source, "b", "f", "()V")), - containsInAnyOrder("e") - ); - } - - @Test - public void defaultConstructableReferences() { - MethodEntry source = newMethod("c", "", "()V"); - assertThat( - getReferenceTokens(newBehaviorReferenceByMethod(source, "b", "g", "()V")), - containsInAnyOrder("c") - ); - } -} diff --git a/enigma/src/test/java/cuchaz/enigma/TestTranslator.java b/enigma/src/test/java/cuchaz/enigma/TestTranslator.java deleted file mode 100644 index 1301b05a5..000000000 --- a/enigma/src/test/java/cuchaz/enigma/TestTranslator.java +++ /dev/null @@ -1,152 +0,0 @@ -package cuchaz.enigma; - -import cuchaz.enigma.classprovider.ClasspathClassProvider; -import cuchaz.enigma.translation.TranslateResult; -import cuchaz.enigma.translation.Translator; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.representation.entry.Entry; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; - -import java.nio.file.Path; - -import static cuchaz.enigma.TestEntryFactory.*; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; - -public class TestTranslator { - public static final Path JAR = TestUtil.obfJar("translation"); - - private static Enigma enigma; - private static EnigmaProject project; - private static EntryTree mappings; - private static Translator deobfuscator; - - @BeforeAll - public static void beforeClass() throws Exception { - enigma = Enigma.create(); - project = enigma.openJar(JAR, new ClasspathClassProvider(), ProgressListener.none()); - mappings = MappingFormat.ENIGMA_FILE.read( - TestUtil.getResource("/translation.mappings"), - ProgressListener.none()); - project.setMappings(mappings); - deobfuscator = project.getMapper().getDeobfuscator(); - } - - @Test - public void basicClasses() { - this.assertMapping(newClass("a"), newClass("deobf/A_Basic")); - this.assertMapping(newClass("b"), newClass("deobf/B_BaseClass")); - this.assertMapping(newClass("c"), newClass("deobf/C_SubClass")); - } - - @Test - public void basicFields() { - this.assertMapping(newField("a", "a", "I"), newField("deobf/A_Basic", "f1", "I")); - this.assertMapping(newField("a", "a", "F"), newField("deobf/A_Basic", "f2", "F")); - this.assertMapping(newField("a", "a", "Ljava/lang/String;"), newField("deobf/A_Basic", "f3", "Ljava/lang/String;")); - } - - @Test - public void basicMethods() { - this.assertMapping(newMethod("a", "a", "()V"), newMethod("deobf/A_Basic", "m1", "()V")); - this.assertMapping(newMethod("a", "a", "()I"), newMethod("deobf/A_Basic", "m2", "()I")); - this.assertMapping(newMethod("a", "a", "(I)V"), newMethod("deobf/A_Basic", "m3", "(I)V")); - this.assertMapping(newMethod("a", "a", "(I)I"), newMethod("deobf/A_Basic", "m4", "(I)I")); - } - - // TODO: basic constructors - - @Test - public void inheritanceFields() { - this.assertMapping(newField("b", "a", "I"), newField("deobf/B_BaseClass", "f1", "I")); - this.assertMapping(newField("b", "a", "C"), newField("deobf/B_BaseClass", "f2", "C")); - this.assertMapping(newField("c", "b", "I"), newField("deobf/C_SubClass", "f3", "I")); - this.assertMapping(newField("c", "c", "I"), newField("deobf/C_SubClass", "f4", "I")); - } - - @Test - public void inheritanceFieldsShadowing() { - this.assertMapping(newField("c", "b", "C"), newField("deobf/C_SubClass", "f2", "C")); - } - - @Test - public void inheritanceFieldsBySubClass() { - this.assertMapping(newField("c", "a", "I"), newField("deobf/C_SubClass", "f1", "I")); - // NOTE: can't reference b.C by subclass since it's shadowed - } - - @Test - public void inheritanceMethods() { - this.assertMapping(newMethod("b", "a", "()I"), newMethod("deobf/B_BaseClass", "m1", "()I")); - this.assertMapping(newMethod("b", "b", "()I"), newMethod("deobf/B_BaseClass", "m2", "()I")); - this.assertMapping(newMethod("c", "c", "()I"), newMethod("deobf/C_SubClass", "m3", "()I")); - } - - @Test - public void inheritanceMethodsOverrides() { - this.assertMapping(newMethod("c", "a", "()I"), newMethod("deobf/C_SubClass", "m1", "()I")); - } - - @Test - public void inheritanceMethodsBySubClass() { - this.assertMapping(newMethod("c", "b", "()I"), newMethod("deobf/C_SubClass", "m2", "()I")); - } - - @Test - public void innerClasses() { - // classes - this.assertMapping(newClass("g"), newClass("deobf/G_OuterClass")); - this.assertMapping(newClass("g$a"), newClass("deobf/G_OuterClass$A_InnerClass")); - this.assertMapping(newClass("g$a$a"), newClass("deobf/G_OuterClass$A_InnerClass$A_InnerInnerClass")); - this.assertMapping(newClass("g$b"), newClass("deobf/G_OuterClass$b")); - this.assertMapping(newClass("g$b$a"), newClass("deobf/G_OuterClass$b$A_NamedInnerClass")); - - // fields - this.assertMapping(newField("g$a", "a", "I"), newField("deobf/G_OuterClass$A_InnerClass", "f1", "I")); - this.assertMapping(newField("g$a", "a", "Ljava/lang/String;"), newField("deobf/G_OuterClass$A_InnerClass", "f2", "Ljava/lang/String;")); - this.assertMapping(newField("g$a$a", "a", "I"), newField("deobf/G_OuterClass$A_InnerClass$A_InnerInnerClass", "f3", "I")); - this.assertMapping(newField("g$b$a", "a", "I"), newField("deobf/G_OuterClass$b$A_NamedInnerClass", "f4", "I")); - - // methods - this.assertMapping(newMethod("g$a", "a", "()V"), newMethod("deobf/G_OuterClass$A_InnerClass", "m1", "()V")); - this.assertMapping(newMethod("g$a$a", "a", "()V"), newMethod("deobf/G_OuterClass$A_InnerClass$A_InnerInnerClass", "m2", "()V")); - } - - @Test - public void namelessClass() { - this.assertMapping(newClass("h"), newClass("h")); - } - - @Test - public void testGenerics() { - // classes - this.assertMapping(newClass("i"), newClass("deobf/I_Generics")); - this.assertMapping(newClass("i$a"), newClass("deobf/I_Generics$A_Type")); - this.assertMapping(newClass("i$b"), newClass("deobf/I_Generics$B_Generic")); - - // fields - this.assertMapping(newField("i", "a", "Ljava/util/List;"), newField("deobf/I_Generics", "f1", "Ljava/util/List;")); - this.assertMapping(newField("i", "b", "Ljava/util/List;"), newField("deobf/I_Generics", "f2", "Ljava/util/List;")); - this.assertMapping(newField("i", "a", "Ljava/util/Map;"), newField("deobf/I_Generics", "f3", "Ljava/util/Map;")); - this.assertMapping(newField("i$b", "a", "Ljava/lang/Object;"), newField("deobf/I_Generics$B_Generic", "f4", "Ljava/lang/Object;")); - this.assertMapping(newField("i", "a", "Li$b;"), newField("deobf/I_Generics", "f5", "Ldeobf/I_Generics$B_Generic;")); - this.assertMapping(newField("i", "b", "Li$b;"), newField("deobf/I_Generics", "f6", "Ldeobf/I_Generics$B_Generic;")); - - // methods - this.assertMapping(newMethod("i$b", "a", "()Ljava/lang/Object;"), newMethod("deobf/I_Generics$B_Generic", "m1", "()Ljava/lang/Object;")); - } - - private void assertMapping(Entry obf, Entry deobf) { - TranslateResult> result = deobfuscator.extendedTranslate(obf); - assertThat(result, is(notNullValue())); - assertThat(result.getValue(), is(deobf)); - - String deobfName = result.getValue().getName(); - if (deobfName != null) { - assertThat(deobfName, is(deobf.getName())); - } - } -} diff --git a/enigma/src/test/java/cuchaz/enigma/ConfigTest.java b/enigma/src/test/java/org/quiltmc/enigma/ConfigTest.java similarity index 97% rename from enigma/src/test/java/cuchaz/enigma/ConfigTest.java rename to enigma/src/test/java/org/quiltmc/enigma/ConfigTest.java index 66925962a..8e9630201 100644 --- a/enigma/src/test/java/cuchaz/enigma/ConfigTest.java +++ b/enigma/src/test/java/org/quiltmc/enigma/ConfigTest.java @@ -1,6 +1,6 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.config.ConfigContainer; +import org.quiltmc.enigma.config.ConfigContainer; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/enigma/src/test/java/cuchaz/enigma/DecompilationTest.java b/enigma/src/test/java/org/quiltmc/enigma/DecompilationTest.java similarity index 65% rename from enigma/src/test/java/cuchaz/enigma/DecompilationTest.java rename to enigma/src/test/java/org/quiltmc/enigma/DecompilationTest.java index ed3f5bf38..0010da1c9 100644 --- a/enigma/src/test/java/cuchaz/enigma/DecompilationTest.java +++ b/enigma/src/test/java/org/quiltmc/enigma/DecompilationTest.java @@ -1,12 +1,12 @@ -package cuchaz.enigma; - -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.classprovider.CachingClassProvider; -import cuchaz.enigma.classprovider.ClassProvider; -import cuchaz.enigma.classprovider.JarClassProvider; -import cuchaz.enigma.source.DecompilerService; -import cuchaz.enigma.source.Decompilers; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma; + +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.classprovider.CachingClassProvider; +import org.quiltmc.enigma.classprovider.ClassProvider; +import org.quiltmc.enigma.classprovider.JarClassProvider; +import org.quiltmc.enigma.source.DecompilerService; +import org.quiltmc.enigma.source.Decompilers; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -15,7 +15,6 @@ import java.util.Map; import java.util.stream.Stream; -import static cuchaz.enigma.TestEntryFactory.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; @@ -40,12 +39,12 @@ private static Stream provideDecompilers() { @MethodSource("provideDecompilers") public void testVarargsDecompile(DecompilerService decompiler) { TokenChecker checker = this.getTokenChecker(decompiler); - MethodEntry method = newMethod("a", "a", "()V"); + MethodEntry method = TestEntryFactory.newMethod("a", "a", "()V"); assertThat(checker.getReferenceTokens( - new EntryReference<>(newMethod("cuchaz/enigma/inputs/Keep", "a", "([Ljava/lang/String;)V"), "", method) + new EntryReference<>(TestEntryFactory.newMethod("org/quiltmc/enigma/input/Keep", "a", "([Ljava/lang/String;)V"), "", method) ), contains("a")); assertThat(checker.getReferenceTokens( - new EntryReference<>(newClass("java/lang/String"), "", method) + new EntryReference<>(TestEntryFactory.newClass("java/lang/String"), "", method) ), is(empty())); } diff --git a/enigma/src/test/java/cuchaz/enigma/MappingFormatDetectionTest.java b/enigma/src/test/java/org/quiltmc/enigma/MappingFormatDetectionTest.java similarity index 87% rename from enigma/src/test/java/cuchaz/enigma/MappingFormatDetectionTest.java rename to enigma/src/test/java/org/quiltmc/enigma/MappingFormatDetectionTest.java index 2621b3da1..3f8b9df23 100644 --- a/enigma/src/test/java/cuchaz/enigma/MappingFormatDetectionTest.java +++ b/enigma/src/test/java/org/quiltmc/enigma/MappingFormatDetectionTest.java @@ -1,6 +1,6 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/enigma/src/test/java/cuchaz/enigma/PackageVisibilityIndexTest.java b/enigma/src/test/java/org/quiltmc/enigma/PackageVisibilityIndexTest.java similarity index 54% rename from enigma/src/test/java/cuchaz/enigma/PackageVisibilityIndexTest.java rename to enigma/src/test/java/org/quiltmc/enigma/PackageVisibilityIndexTest.java index 61df51287..4ea7cf144 100644 --- a/enigma/src/test/java/cuchaz/enigma/PackageVisibilityIndexTest.java +++ b/enigma/src/test/java/org/quiltmc/enigma/PackageVisibilityIndexTest.java @@ -1,26 +1,25 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.analysis.index.PackageVisibilityIndex; -import cuchaz.enigma.classprovider.JarClassProvider; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.analysis.index.PackageVisibilityIndex; +import org.quiltmc.enigma.classprovider.JarClassProvider; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import org.junit.jupiter.api.Test; import java.nio.file.Path; -import static cuchaz.enigma.TestEntryFactory.newClass; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; public class PackageVisibilityIndexTest { - public static final Path JAR = TestUtil.obfJar("packageAccess"); - private static final ClassEntry KEEP = newClass("cuchaz/enigma/inputs/Keep"); - private static final ClassEntry BASE = newClass("a"); - private static final ClassEntry SAME_PACKAGE_CHILD = newClass("b"); - private static final ClassEntry SAME_PACKAGE_CHILD_INNER = newClass("b$a"); - private static final ClassEntry OTHER_PACKAGE_CHILD = newClass("c"); - private static final ClassEntry OTHER_PACKAGE_CHILD_INNER = newClass("c$a"); + public static final Path JAR = TestUtil.obfJar("package_access"); + private static final ClassEntry KEEP = TestEntryFactory.newClass("org/quiltmc/enigma/input/Keep"); + private static final ClassEntry BASE = TestEntryFactory.newClass("a"); + private static final ClassEntry SAME_PACKAGE_CHILD = TestEntryFactory.newClass("b"); + private static final ClassEntry SAME_PACKAGE_CHILD_INNER = TestEntryFactory.newClass("b$a"); + private static final ClassEntry OTHER_PACKAGE_CHILD = TestEntryFactory.newClass("c"); + private static final ClassEntry OTHER_PACKAGE_CHILD_INNER = TestEntryFactory.newClass("c$a"); private final JarIndex jarIndex; public PackageVisibilityIndexTest() throws Exception { diff --git a/enigma/src/test/java/cuchaz/enigma/SourceTestUtil.java b/enigma/src/test/java/org/quiltmc/enigma/SourceTestUtil.java similarity index 78% rename from enigma/src/test/java/cuchaz/enigma/SourceTestUtil.java rename to enigma/src/test/java/org/quiltmc/enigma/SourceTestUtil.java index 77154f190..c580fba3e 100644 --- a/enigma/src/test/java/cuchaz/enigma/SourceTestUtil.java +++ b/enigma/src/test/java/org/quiltmc/enigma/SourceTestUtil.java @@ -1,11 +1,11 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.source.SourceRemapper; -import cuchaz.enigma.source.Token; -import cuchaz.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.SourceRemapper; +import org.quiltmc.enigma.source.Token; +import org.quiltmc.enigma.translation.representation.entry.Entry; public class SourceTestUtil { /** diff --git a/enigma/src/test/java/cuchaz/enigma/TestDeobfed.java b/enigma/src/test/java/org/quiltmc/enigma/TestDeobfed.java similarity index 61% rename from enigma/src/test/java/cuchaz/enigma/TestDeobfed.java rename to enigma/src/test/java/org/quiltmc/enigma/TestDeobfed.java index 3279c46d9..a76dae74b 100644 --- a/enigma/src/test/java/cuchaz/enigma/TestDeobfed.java +++ b/enigma/src/test/java/org/quiltmc/enigma/TestDeobfed.java @@ -1,18 +1,17 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.classprovider.ClasspathClassProvider; -import cuchaz.enigma.source.Decompiler; -import cuchaz.enigma.source.Decompilers; -import cuchaz.enigma.source.SourceSettings; +import org.quiltmc.enigma.classprovider.ClasspathClassProvider; +import org.quiltmc.enigma.source.Decompiler; +import org.quiltmc.enigma.source.Decompilers; +import org.quiltmc.enigma.source.SourceSettings; +import org.hamcrest.Matchers; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import java.nio.file.Files; import java.nio.file.Path; -import static cuchaz.enigma.TestEntryFactory.newClass; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.containsInAnyOrder; public class TestDeobfed { public static final Path OBF = TestUtil.obfJar("translation"); @@ -32,30 +31,30 @@ public static void beforeClass() throws Exception { @Test public void obfEntries() { - assertThat(deobfProject.getJarIndex().getEntryIndex().getClasses(), containsInAnyOrder( - newClass("cuchaz/enigma/inputs/Keep"), - newClass("a"), - newClass("b"), - newClass("c"), - newClass("d"), - newClass("d$1"), - newClass("e"), - newClass("f"), - newClass("g"), - newClass("g$a"), - newClass("g$a$a"), - newClass("g$b"), - newClass("g$b$a"), - newClass("h"), - newClass("h$a"), - newClass("h$a$a"), - newClass("h$b"), - newClass("h$b$a"), - newClass("h$b$a$a"), - newClass("h$b$a$b"), - newClass("i"), - newClass("i$a"), - newClass("i$b") + assertThat(deobfProject.getJarIndex().getEntryIndex().getClasses(), Matchers.containsInAnyOrder( + TestEntryFactory.newClass("org/quiltmc/enigma/input/Keep"), + TestEntryFactory.newClass("a"), + TestEntryFactory.newClass("b"), + TestEntryFactory.newClass("c"), + TestEntryFactory.newClass("d"), + TestEntryFactory.newClass("d$1"), + TestEntryFactory.newClass("e"), + TestEntryFactory.newClass("f"), + TestEntryFactory.newClass("g"), + TestEntryFactory.newClass("g$a"), + TestEntryFactory.newClass("g$a$a"), + TestEntryFactory.newClass("g$b"), + TestEntryFactory.newClass("g$b$a"), + TestEntryFactory.newClass("h"), + TestEntryFactory.newClass("h$a"), + TestEntryFactory.newClass("h$a$a"), + TestEntryFactory.newClass("h$b"), + TestEntryFactory.newClass("h$b$a"), + TestEntryFactory.newClass("h$b$a$a"), + TestEntryFactory.newClass("h$b$a$b"), + TestEntryFactory.newClass("i"), + TestEntryFactory.newClass("i$a"), + TestEntryFactory.newClass("i$b") )); } diff --git a/enigma/src/test/java/cuchaz/enigma/TestDeobfuscator.java b/enigma/src/test/java/org/quiltmc/enigma/TestDeobfuscator.java similarity index 68% rename from enigma/src/test/java/cuchaz/enigma/TestDeobfuscator.java rename to enigma/src/test/java/org/quiltmc/enigma/TestDeobfuscator.java index 5b6426b84..240374c2b 100644 --- a/enigma/src/test/java/cuchaz/enigma/TestDeobfuscator.java +++ b/enigma/src/test/java/org/quiltmc/enigma/TestDeobfuscator.java @@ -1,16 +1,16 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.classprovider.ClasspathClassProvider; -import cuchaz.enigma.source.Decompiler; -import cuchaz.enigma.source.Decompilers; -import cuchaz.enigma.source.SourceSettings; +import org.quiltmc.enigma.classprovider.ClasspathClassProvider; +import org.quiltmc.enigma.source.Decompiler; +import org.quiltmc.enigma.source.Decompilers; +import org.quiltmc.enigma.source.SourceSettings; import org.junit.jupiter.api.Test; import java.io.IOException; import java.nio.file.Path; public class TestDeobfuscator { - private static final Path JAR = TestUtil.obfJar("loneClass"); + private static final Path JAR = TestUtil.obfJar("lone_class"); private EnigmaProject openProject() throws IOException { Enigma enigma = Enigma.create(); diff --git a/enigma/src/test/java/cuchaz/enigma/TestInnerClassParameterStats.java b/enigma/src/test/java/org/quiltmc/enigma/TestInnerClassParameterStats.java similarity index 79% rename from enigma/src/test/java/cuchaz/enigma/TestInnerClassParameterStats.java rename to enigma/src/test/java/org/quiltmc/enigma/TestInnerClassParameterStats.java index 183149dbe..5e71094b8 100644 --- a/enigma/src/test/java/cuchaz/enigma/TestInnerClassParameterStats.java +++ b/enigma/src/test/java/org/quiltmc/enigma/TestInnerClassParameterStats.java @@ -1,9 +1,9 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.classprovider.JarClassProvider; -import cuchaz.enigma.stats.ProjectStatsResult; -import cuchaz.enigma.stats.StatType; -import cuchaz.enigma.stats.StatsGenerator; +import org.quiltmc.enigma.classprovider.JarClassProvider; +import org.quiltmc.enigma.stats.ProjectStatsResult; +import org.quiltmc.enigma.stats.StatType; +import org.quiltmc.enigma.stats.StatsGenerator; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -14,7 +14,7 @@ import static org.hamcrest.Matchers.equalTo; public class TestInnerClassParameterStats { - private static final Path JAR = TestUtil.obfJar("innerClasses"); + private static final Path JAR = TestUtil.obfJar("inner_classes"); @Test public void testInnerClassParameterStats() { diff --git a/enigma/src/test/java/cuchaz/enigma/TestInnerClasses.java b/enigma/src/test/java/org/quiltmc/enigma/TestInnerClasses.java similarity index 59% rename from enigma/src/test/java/cuchaz/enigma/TestInnerClasses.java rename to enigma/src/test/java/org/quiltmc/enigma/TestInnerClasses.java index 924df5c42..2e7818517 100644 --- a/enigma/src/test/java/cuchaz/enigma/TestInnerClasses.java +++ b/enigma/src/test/java/org/quiltmc/enigma/TestInnerClasses.java @@ -1,30 +1,29 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.analysis.index.JarIndex; -import cuchaz.enigma.classprovider.CachingClassProvider; -import cuchaz.enigma.classprovider.JarClassProvider; -import cuchaz.enigma.source.Decompiler; -import cuchaz.enigma.source.Decompilers; -import cuchaz.enigma.source.SourceSettings; -import cuchaz.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.classprovider.CachingClassProvider; +import org.quiltmc.enigma.classprovider.JarClassProvider; +import org.quiltmc.enigma.source.Decompiler; +import org.quiltmc.enigma.source.Decompilers; +import org.quiltmc.enigma.source.SourceSettings; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; import org.junit.jupiter.api.Test; import java.nio.file.Path; -import static cuchaz.enigma.TestEntryFactory.newClass; import static org.junit.jupiter.api.Assertions.assertTrue; public class TestInnerClasses { - private static final ClassEntry SIMPLE_OUTER = newClass("d"); - private static final ClassEntry SIMPLE_INNER = newClass("d$a"); - private static final ClassEntry CONSTRUCTOR_ARGS_OUTER = newClass("c"); - private static final ClassEntry CONSTRUCTOR_ARGS_INNER = newClass("c$a"); - private static final ClassEntry CLASS_TREE_ROOT = newClass("f"); - private static final ClassEntry CLASS_TREE_LEVEL_1 = newClass("f$a"); - private static final ClassEntry CLASS_TREE_LEVEL_2 = newClass("f$a$a"); - private static final ClassEntry CLASS_TREE_LEVEL_3 = newClass("f$a$a$a"); + private static final ClassEntry SIMPLE_OUTER = TestEntryFactory.newClass("d"); + private static final ClassEntry SIMPLE_INNER = TestEntryFactory.newClass("d$a"); + private static final ClassEntry CONSTRUCTOR_ARGS_OUTER = TestEntryFactory.newClass("c"); + private static final ClassEntry CONSTRUCTOR_ARGS_INNER = TestEntryFactory.newClass("c$a"); + private static final ClassEntry CLASS_TREE_ROOT = TestEntryFactory.newClass("f"); + private static final ClassEntry CLASS_TREE_LEVEL_1 = TestEntryFactory.newClass("f$a"); + private static final ClassEntry CLASS_TREE_LEVEL_2 = TestEntryFactory.newClass("f$a$a"); + private static final ClassEntry CLASS_TREE_LEVEL_3 = TestEntryFactory.newClass("f$a$a$a"); - public static final Path JAR = TestUtil.obfJar("innerClasses"); + public static final Path JAR = TestUtil.obfJar("inner_classes"); private final JarIndex index; private final Decompiler decompiler; diff --git a/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexBridgeMethods.java b/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexBridgeMethods.java new file mode 100644 index 000000000..1fd99be5f --- /dev/null +++ b/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexBridgeMethods.java @@ -0,0 +1,168 @@ +package org.quiltmc.enigma; + +import org.quiltmc.enigma.analysis.index.BridgeMethodIndex; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.classprovider.CachingClassProvider; +import org.quiltmc.enigma.classprovider.JarClassProvider; +import org.quiltmc.enigma.classprovider.ObfuscationFixClassProvider; +import org.quiltmc.enigma.source.DecompilerService; +import org.quiltmc.enigma.source.Decompilers; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; + +import java.nio.file.Path; +import java.util.HashMap; +import java.util.Map; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.*; + +/** + * Tests to reproduce issue #9 + */ +public class TestJarIndexBridgeMethods { + public static final Path JAR = TestUtil.obfJar("bridge"); + + private final CachingClassProvider classProvider; + private final JarIndex index; + private final Map tokenCheckers = new HashMap<>(); + + private final ClassEntry baseClass = TestEntryFactory.newClass("a"); + private final ClassEntry otherClass = TestEntryFactory.newClass("b"); + private final ClassEntry subClass = TestEntryFactory.newClass("c"); + private final ClassEntry innerSubClass = TestEntryFactory.newClass("c$a"); + + public TestJarIndexBridgeMethods() throws Exception { + JarClassProvider jcp = new JarClassProvider(JAR); + this.classProvider = new CachingClassProvider(jcp); + this.index = JarIndex.empty(); + this.index.indexJar(jcp.getClassNames(), this.classProvider, ProgressListener.none()); + } + + @Test + public void obfEntries() { + assertThat(this.index.getEntryIndex().getClasses(), Matchers.containsInAnyOrder(TestEntryFactory.newClass("org/quiltmc/enigma/input/Keep"), this.baseClass, + this.otherClass, this.subClass, this.innerSubClass)); + } + + @Test + public void testBase() { + BridgeMethodIndex index = this.index.getBridgeMethodIndex(); + + assertThat(index.isBridgeMethod(TestEntryFactory.newMethod(this.baseClass, "a", "()I")), is(false)); + assertThat(index.getBridgeFromSpecialized(TestEntryFactory.newMethod(this.baseClass, "a", "()La;")), nullValue()); + assertThat(index.isSpecializedMethod(TestEntryFactory.newMethod(this.baseClass, "b", "(II)La;")), is(false)); + assertThat(index.getSpecializedFromBridge(TestEntryFactory.newMethod(this.baseClass, "c", "(I)La;")), nullValue()); + } + + @Test + public void testSub() { + BridgeMethodIndex index = this.index.getBridgeMethodIndex(); + + assertThat(index.isBridgeMethod(TestEntryFactory.newMethod(this.subClass, "f", "()Lc;")), is(false)); + assertThat(index.isBridgeMethod(TestEntryFactory.newMethod(this.subClass, "d", "()La;")), is(true)); + assertThat(index.getSpecializedFromBridge(TestEntryFactory.newMethod(this.subClass, "b", "(II)La;")), + Matchers.is(TestEntryFactory.newMethod(this.subClass, "d", "(II)Lc;"))); + assertThat(index.isSpecializedMethod(TestEntryFactory.newMethod(this.subClass, "f", "(I)Lc;")), is(true)); + assertThat(index.isSpecializedMethod(TestEntryFactory.newMethod(this.subClass, "c", "(I)La;")), is(false)); + assertThat(index.getBridgeFromSpecialized(TestEntryFactory.newMethod(this.subClass, "e", "(I)Lc;")), + Matchers.is(TestEntryFactory.newMethod(this.subClass, "b", "(I)La;"))); + assertThat(index.getBridgeFromSpecialized(TestEntryFactory.newMethod(this.subClass, "g", "()Lc;")), + Matchers.is(TestEntryFactory.newMethod(this.subClass, "e", "()La;"))); + } + + @Test + public void testInnerSub() { + BridgeMethodIndex index = this.index.getBridgeMethodIndex(); + + assertThat(index.isBridgeMethod(TestEntryFactory.newMethod(this.innerSubClass, "d", "()La;")), is(true)); + assertThat(index.getSpecializedFromBridge(TestEntryFactory.newMethod(this.innerSubClass, "a", "(I)La;")), + Matchers.is(TestEntryFactory.newMethod(this.subClass, "d", "(I)Lc;"))); + assertThat(index.getSpecializedFromBridge(TestEntryFactory.newMethod(this.innerSubClass, "e", "()La;")), + Matchers.is(TestEntryFactory.newMethod(this.subClass, "g", "()Lc;"))); + assertThat(index.isSpecializedMethod(TestEntryFactory.newMethod(this.innerSubClass, "b", "(I)La;")), is(false)); + assertThat(index.getBridgeFromSpecialized(TestEntryFactory.newMethod(this.innerSubClass, "c", "(I)La;")), nullValue()); + assertThat(index.getBridgeFromSpecialized(TestEntryFactory.newMethod(this.innerSubClass, "b", "(II)La;")), nullValue()); + } + + @Test + public void testOther() { + BridgeMethodIndex index = this.index.getBridgeMethodIndex(); + + assertThat(index.getBridgeFromSpecialized(TestEntryFactory.newMethod(this.otherClass, "a", "()Ljava/lang/Integer;")), + Matchers.is(TestEntryFactory.newMethod(this.otherClass, "get", "()Ljava/lang/Object;"))); + assertThat(index.getSpecializedFromBridge(TestEntryFactory.newMethod(this.otherClass, "a", "(Ljava/lang/String;)Ljava/lang/Integer;")), nullValue()); + assertThat(index.getBridgeFromSpecialized(TestEntryFactory.newMethod(this.otherClass, "get", "()Ljava/lang/Object;")), nullValue()); + assertThat(index.getSpecializedFromBridge(TestEntryFactory.newMethod(this.otherClass, "apply", "(Ljava/lang/Object;)Ljava/lang/Object;")), + Matchers.is(TestEntryFactory.newMethod(this.otherClass, "a", "(Ljava/lang/String;)Ljava/lang/Integer;"))); + } + + @Test + public void testTokensBase() { + this.testTokensBase(Decompilers.VINEFLOWER); + this.testTokensBase(Decompilers.CFR); + this.testTokensBase(Decompilers.PROCYON); + } + + private void testTokensBase(DecompilerService decompiler) { + TokenChecker checker = this.getTokenChecker(decompiler); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.baseClass, "d", "()La;")), is("d")); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.baseClass, "a", "(I)La;")), is("a")); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.baseClass, "b", "(II)La;")), is("b")); + } + + @Test + public void testTokensSub() { + this.testTokensSub(Decompilers.VINEFLOWER); + this.testTokensSub(Decompilers.CFR); + this.testTokensSub(Decompilers.PROCYON); + } + + private void testTokensSub(DecompilerService decompiler) { + TokenChecker checker = this.getTokenChecker(decompiler); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.subClass, "d", "()La;")), is(emptyOrNullString())); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.subClass, "f", "()Lc;")), is("f")); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.subClass, "a", "(I)La;")), is(emptyOrNullString())); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.subClass, "d", "(I)Lc;")), is("d")); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.subClass, "b", "(II)La;")), is(emptyOrNullString())); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.subClass, "d", "(II)Lc;")), is("d")); + } + + @Test + public void testTokensInnerSub() { + this.testTokensInnerSub(Decompilers.VINEFLOWER); + this.testTokensInnerSub(Decompilers.CFR); + this.testTokensInnerSub(Decompilers.PROCYON); + } + + private void testTokensInnerSub(DecompilerService decompiler) { + TokenChecker checker = this.getTokenChecker(decompiler); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.innerSubClass, "d", "()La;")), is(emptyOrNullString())); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.innerSubClass, "f", "()Lc;")), is(emptyOrNullString())); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.innerSubClass, "a", "(I)La;")), is(emptyOrNullString())); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.innerSubClass, "d", "(I)Lc;")), is(emptyOrNullString())); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.innerSubClass, "b", "(II)La;")), is(emptyOrNullString())); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.innerSubClass, "d", "(II)Lc;")), is(emptyOrNullString())); + } + + @Test + public void testTokensOther() { + this.testTokensOther(Decompilers.VINEFLOWER); + this.testTokensOther(Decompilers.CFR); + this.testTokensOther(Decompilers.PROCYON); + } + + private void testTokensOther(DecompilerService decompiler) { + TokenChecker checker = this.getTokenChecker(decompiler); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.otherClass, "a", "()Ljava/lang/Integer;")), is("a")); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.otherClass, "get", "()Ljava/lang/Object;")), is(emptyOrNullString())); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.otherClass, "a", "(Ljava/lang/String;)Ljava/lang/Integer;")), is("a")); + assertThat(checker.getDeclarationToken(TestEntryFactory.newMethod(this.otherClass, "apply", "(Ljava/lang/Object;)Ljava/lang/Object;")), is(emptyOrNullString())); + } + + private TokenChecker getTokenChecker(DecompilerService decompiler) { + return this.tokenCheckers.computeIfAbsent(decompiler, d -> + new TokenChecker(JAR, d, new ObfuscationFixClassProvider(this.classProvider, this.index))); + } +} diff --git a/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexConstructorReferences.java b/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexConstructorReferences.java new file mode 100644 index 000000000..27451056b --- /dev/null +++ b/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexConstructorReferences.java @@ -0,0 +1,109 @@ +package org.quiltmc.enigma; + +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.classprovider.CachingClassProvider; +import org.quiltmc.enigma.classprovider.JarClassProvider; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; + +import java.nio.file.Path; +import java.util.Collection; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.*; + +public class TestJarIndexConstructorReferences { + public static final Path JAR = TestUtil.obfJar("constructors"); + + private static final ClassEntry BASE_CLASS = TestEntryFactory.newClass("a"); + private static final ClassEntry SUB_CLASS = TestEntryFactory.newClass("d"); + private static final ClassEntry SUBSUB_CLASS = TestEntryFactory.newClass("e"); + private static final ClassEntry DEFAULT_CLASS = TestEntryFactory.newClass("c"); + private static final ClassEntry CALLER_CLASS = TestEntryFactory.newClass("b"); + + private final JarIndex index; + + public TestJarIndexConstructorReferences() throws Exception { + JarClassProvider jcp = new JarClassProvider(JAR); + this.index = JarIndex.empty(); + this.index.indexJar(jcp.getClassNames(), new CachingClassProvider(jcp), ProgressListener.none()); + } + + @Test + public void obfEntries() { + assertThat(this.index.getEntryIndex().getClasses(), Matchers.containsInAnyOrder(TestEntryFactory.newClass("org/quiltmc/enigma/input/Keep"), BASE_CLASS, + SUB_CLASS, SUBSUB_CLASS, DEFAULT_CLASS, CALLER_CLASS)); + } + + @Test + public void baseDefault() { + MethodEntry source = TestEntryFactory.newMethod(BASE_CLASS, "", "()V"); + Collection> references = this.index.getReferenceIndex().getReferencesToMethod(source); + assertThat(references, Matchers.containsInAnyOrder( + TestEntryFactory.newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "a", "()V"), + TestEntryFactory.newBehaviorReferenceByMethod(source, SUB_CLASS.getName(), "", "()V"), + TestEntryFactory.newBehaviorReferenceByMethod(source, SUB_CLASS.getName(), "", "(III)V") + )); + } + + @Test + public void baseInt() { + MethodEntry source = TestEntryFactory.newMethod(BASE_CLASS, "", "(I)V"); + assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), containsInAnyOrder( + TestEntryFactory.newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "b", "()V") + )); + } + + @Test + public void subDefault() { + MethodEntry source = TestEntryFactory.newMethod(SUB_CLASS, "", "()V"); + assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), Matchers.containsInAnyOrder( + TestEntryFactory.newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "c", "()V"), + TestEntryFactory.newBehaviorReferenceByMethod(source, SUB_CLASS.getName(), "", "(I)V") + )); + } + + @Test + public void subInt() { + MethodEntry source = TestEntryFactory.newMethod(SUB_CLASS, "", "(I)V"); + assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), Matchers.containsInAnyOrder( + TestEntryFactory.newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "d", "()V"), + TestEntryFactory.newBehaviorReferenceByMethod(source, SUB_CLASS.getName(), "", "(II)V"), + TestEntryFactory.newBehaviorReferenceByMethod(source, SUBSUB_CLASS.getName(), "", "(I)V") + )); + } + + @Test + public void subIntInt() { + MethodEntry source = TestEntryFactory.newMethod(SUB_CLASS, "", "(II)V"); + assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), containsInAnyOrder( + TestEntryFactory.newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "e", "()V") + )); + } + + @Test + public void subIntIntInt() { + MethodEntry source = TestEntryFactory.newMethod(SUB_CLASS, "", "(III)V"); + assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), is(empty())); + } + + @Test + public void subsubInt() { + MethodEntry source = TestEntryFactory.newMethod(SUBSUB_CLASS, "", "(I)V"); + assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), containsInAnyOrder( + TestEntryFactory.newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "f", "()V") + )); + } + + @Test + public void defaultConstructable() { + MethodEntry source = TestEntryFactory.newMethod(DEFAULT_CLASS, "", "()V"); + assertThat(this.index.getReferenceIndex().getReferencesToMethod(source), containsInAnyOrder( + TestEntryFactory.newBehaviorReferenceByMethod(source, CALLER_CLASS.getName(), "g", "()V") + )); + } +} diff --git a/enigma/src/test/java/cuchaz/enigma/TestJarIndexEnums.java b/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexEnums.java similarity index 84% rename from enigma/src/test/java/cuchaz/enigma/TestJarIndexEnums.java rename to enigma/src/test/java/org/quiltmc/enigma/TestJarIndexEnums.java index dabd3ab0f..40880c119 100644 --- a/enigma/src/test/java/cuchaz/enigma/TestJarIndexEnums.java +++ b/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexEnums.java @@ -1,10 +1,10 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.stats.ProjectStatsResult; +import org.quiltmc.enigma.stats.ProjectStatsResult; import org.junit.jupiter.api.Test; -import cuchaz.enigma.classprovider.ClasspathClassProvider; -import cuchaz.enigma.stats.StatType; -import cuchaz.enigma.stats.StatsGenerator; +import org.quiltmc.enigma.classprovider.ClasspathClassProvider; +import org.quiltmc.enigma.stats.StatType; +import org.quiltmc.enigma.stats.StatsGenerator; import java.io.IOException; import java.nio.file.Path; diff --git a/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexInheritanceTree.java b/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexInheritanceTree.java new file mode 100644 index 000000000..6a9500b03 --- /dev/null +++ b/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexInheritanceTree.java @@ -0,0 +1,212 @@ +package org.quiltmc.enigma; + +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.analysis.index.EntryIndex; +import org.quiltmc.enigma.analysis.index.InheritanceIndex; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.classprovider.CachingClassProvider; +import org.quiltmc.enigma.classprovider.JarClassProvider; +import org.quiltmc.enigma.translation.mapping.EntryResolver; +import org.quiltmc.enigma.translation.mapping.IndexEntryResolver; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; +import org.objectweb.asm.Opcodes; + +import java.nio.file.Path; +import java.util.Collection; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.*; + +public class TestJarIndexInheritanceTree { + public static final Path JAR = TestUtil.obfJar("inheritance_tree"); + + private static final ClassEntry BASE_CLASS = TestEntryFactory.newClass("a"); + private static final ClassEntry SUB_CLASS_A = TestEntryFactory.newClass("b"); + private static final ClassEntry SUB_CLASS_AA = TestEntryFactory.newClass("d"); + private static final ClassEntry SUB_CLASS_B = TestEntryFactory.newClass("c"); + private static final FieldEntry NAME_FIELD = TestEntryFactory.newField(BASE_CLASS, "a", "Ljava/lang/String;"); + private static final FieldEntry NUM_THINGS_FIELD = TestEntryFactory.newField(SUB_CLASS_B, "a", "I"); + + private final JarIndex index; + + public TestJarIndexInheritanceTree() throws Exception { + JarClassProvider jcp = new JarClassProvider(JAR); + this.index = JarIndex.empty(); + this.index.indexJar(jcp.getClassNames(), new CachingClassProvider(jcp), ProgressListener.none()); + } + + @Test + public void obfEntries() { + assertThat(this.index.getEntryIndex().getClasses(), Matchers.containsInAnyOrder( + TestEntryFactory.newClass("org/quiltmc/enigma/input/Keep"), BASE_CLASS, SUB_CLASS_A, SUB_CLASS_AA, SUB_CLASS_B + )); + } + + @Test + public void translationIndex() { + InheritanceIndex index = this.index.getInheritanceIndex(); + + // base class + assertThat(index.getParents(BASE_CLASS), is(empty())); + assertThat(index.getAncestors(BASE_CLASS), is(empty())); + assertThat(index.getChildren(BASE_CLASS), containsInAnyOrder(SUB_CLASS_A, SUB_CLASS_B + )); + + // subclass a + assertThat(index.getParents(SUB_CLASS_A), contains(BASE_CLASS)); + assertThat(index.getAncestors(SUB_CLASS_A), containsInAnyOrder(BASE_CLASS)); + assertThat(index.getChildren(SUB_CLASS_A), contains(SUB_CLASS_AA)); + + // subclass aa + assertThat(index.getParents(SUB_CLASS_AA), contains(SUB_CLASS_A)); + assertThat(index.getAncestors(SUB_CLASS_AA), containsInAnyOrder(SUB_CLASS_A, BASE_CLASS)); + assertThat(index.getChildren(SUB_CLASS_AA), is(empty())); + + // subclass b + assertThat(index.getParents(SUB_CLASS_B), contains(BASE_CLASS)); + assertThat(index.getAncestors(SUB_CLASS_B), containsInAnyOrder(BASE_CLASS)); + assertThat(index.getChildren(SUB_CLASS_B), is(empty())); + } + + @Test + public void access() { + assertThat(this.index.getEntryIndex().getFieldAccess(NAME_FIELD), is(new AccessFlags(Opcodes.ACC_PRIVATE))); + assertThat(this.index.getEntryIndex().getFieldAccess(NUM_THINGS_FIELD), is(new AccessFlags(Opcodes.ACC_PRIVATE))); + } + + @Test + public void relatedMethodImplementations() { + Collection entries; + + EntryResolver resolver = new IndexEntryResolver(this.index); + // getName() + entries = resolver.resolveEquivalentMethods(TestEntryFactory.newMethod(BASE_CLASS, "a", "()Ljava/lang/String;")); + assertThat(entries, Matchers.containsInAnyOrder( + TestEntryFactory.newMethod(BASE_CLASS, "a", "()Ljava/lang/String;"), + TestEntryFactory.newMethod(SUB_CLASS_AA, "a", "()Ljava/lang/String;") + )); + entries = resolver.resolveEquivalentMethods(TestEntryFactory.newMethod(SUB_CLASS_AA, "a", "()Ljava/lang/String;")); + assertThat(entries, Matchers.containsInAnyOrder( + TestEntryFactory.newMethod(BASE_CLASS, "a", "()Ljava/lang/String;"), + TestEntryFactory.newMethod(SUB_CLASS_AA, "a", "()Ljava/lang/String;") + )); + + // doBaseThings() + entries = resolver.resolveEquivalentMethods(TestEntryFactory.newMethod(BASE_CLASS, "a", "()V")); + assertThat(entries, Matchers.containsInAnyOrder( + TestEntryFactory.newMethod(BASE_CLASS, "a", "()V"), + TestEntryFactory.newMethod(SUB_CLASS_AA, "a", "()V"), + TestEntryFactory.newMethod(SUB_CLASS_B, "a", "()V") + )); + entries = resolver.resolveEquivalentMethods(TestEntryFactory.newMethod(SUB_CLASS_AA, "a", "()V")); + assertThat(entries, Matchers.containsInAnyOrder( + TestEntryFactory.newMethod(BASE_CLASS, "a", "()V"), + TestEntryFactory.newMethod(SUB_CLASS_AA, "a", "()V"), + TestEntryFactory.newMethod(SUB_CLASS_B, "a", "()V") + )); + entries = resolver.resolveEquivalentMethods(TestEntryFactory.newMethod(SUB_CLASS_B, "a", "()V")); + assertThat(entries, Matchers.containsInAnyOrder( + TestEntryFactory.newMethod(BASE_CLASS, "a", "()V"), + TestEntryFactory.newMethod(SUB_CLASS_AA, "a", "()V"), + TestEntryFactory.newMethod(SUB_CLASS_B, "a", "()V") + )); + + // doBThings + entries = resolver.resolveEquivalentMethods(TestEntryFactory.newMethod(SUB_CLASS_B, "b", "()V")); + assertThat(entries, containsInAnyOrder(TestEntryFactory.newMethod(SUB_CLASS_B, "b", "()V"))); + } + + @Test + public void fieldReferences() { + Collection> references; + + // name + references = this.index.getReferenceIndex().getReferencesToField(NAME_FIELD); + assertThat(references, Matchers.containsInAnyOrder( + TestEntryFactory.newFieldReferenceByMethod(NAME_FIELD, BASE_CLASS.getName(), "", "(Ljava/lang/String;)V"), + TestEntryFactory.newFieldReferenceByMethod(NAME_FIELD, BASE_CLASS.getName(), "a", "()Ljava/lang/String;") + )); + + // numThings + references = this.index.getReferenceIndex().getReferencesToField(NUM_THINGS_FIELD); + assertThat(references, Matchers.containsInAnyOrder( + TestEntryFactory.newFieldReferenceByMethod(NUM_THINGS_FIELD, SUB_CLASS_B.getName(), "", "()V"), + TestEntryFactory.newFieldReferenceByMethod(NUM_THINGS_FIELD, SUB_CLASS_B.getName(), "b", "()V") + )); + } + + @Test + public void behaviorReferences() { + MethodEntry source; + Collection> references; + + // baseClass constructor + source = TestEntryFactory.newMethod(BASE_CLASS, "", "(Ljava/lang/String;)V"); + references = this.index.getReferenceIndex().getReferencesToMethod(source); + assertThat(references, Matchers.containsInAnyOrder( + TestEntryFactory.newBehaviorReferenceByMethod(source, SUB_CLASS_A.getName(), "", "(Ljava/lang/String;)V"), + TestEntryFactory.newBehaviorReferenceByMethod(source, SUB_CLASS_B.getName(), "", "()V") + )); + + // subClassA constructor + source = TestEntryFactory.newMethod(SUB_CLASS_A, "", "(Ljava/lang/String;)V"); + references = this.index.getReferenceIndex().getReferencesToMethod(source); + assertThat(references, containsInAnyOrder( + TestEntryFactory.newBehaviorReferenceByMethod(source, SUB_CLASS_AA.getName(), "", "()V") + )); + + // baseClass.getName() + source = TestEntryFactory.newMethod(BASE_CLASS, "a", "()Ljava/lang/String;"); + references = this.index.getReferenceIndex().getReferencesToMethod(source); + assertThat(references, Matchers.containsInAnyOrder( + TestEntryFactory.newBehaviorReferenceByMethod(source, SUB_CLASS_AA.getName(), "a", "()Ljava/lang/String;"), + TestEntryFactory.newBehaviorReferenceByMethod(source, SUB_CLASS_B.getName(), "a", "()V") + )); + + // subclassAA.getName() + source = TestEntryFactory.newMethod(SUB_CLASS_AA, "a", "()Ljava/lang/String;"); + references = this.index.getReferenceIndex().getReferencesToMethod(source); + assertThat(references, containsInAnyOrder( + TestEntryFactory.newBehaviorReferenceByMethod(source, SUB_CLASS_AA.getName(), "a", "()V") + )); + } + + @Test + public void containsEntries() { + EntryIndex entryIndex = this.index.getEntryIndex(); + // classes + assertThat(entryIndex.hasClass(BASE_CLASS), is(true)); + assertThat(entryIndex.hasClass(SUB_CLASS_A), is(true)); + assertThat(entryIndex.hasClass(SUB_CLASS_AA), is(true)); + assertThat(entryIndex.hasClass(SUB_CLASS_B), is(true)); + + // fields + assertThat(entryIndex.hasField(NAME_FIELD), is(true)); + assertThat(entryIndex.hasField(NUM_THINGS_FIELD), is(true)); + + // methods + // getName() + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod(BASE_CLASS, "a", "()Ljava/lang/String;")), is(true)); + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod(SUB_CLASS_A, "a", "()Ljava/lang/String;")), is(false)); + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod(SUB_CLASS_AA, "a", "()Ljava/lang/String;")), is(true)); + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod(SUB_CLASS_B, "a", "()Ljava/lang/String;")), is(false)); + + // doBaseThings() + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod(BASE_CLASS, "a", "()V")), is(true)); + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod(SUB_CLASS_A, "a", "()V")), is(false)); + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod(SUB_CLASS_AA, "a", "()V")), is(true)); + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod(SUB_CLASS_B, "a", "()V")), is(true)); + + // doBThings() + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod(BASE_CLASS, "b", "()V")), is(false)); + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod(SUB_CLASS_A, "b", "()V")), is(false)); + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod(SUB_CLASS_AA, "b", "()V")), is(false)); + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod(SUB_CLASS_B, "b", "()V")), is(true)); + } +} diff --git a/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexLoneClass.java b/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexLoneClass.java new file mode 100644 index 000000000..be2d6cf09 --- /dev/null +++ b/enigma/src/test/java/org/quiltmc/enigma/TestJarIndexLoneClass.java @@ -0,0 +1,153 @@ +package org.quiltmc.enigma; + +import org.quiltmc.enigma.analysis.ClassImplementationsTreeNode; +import org.quiltmc.enigma.analysis.ClassInheritanceTreeNode; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.analysis.IndexTreeBuilder; +import org.quiltmc.enigma.analysis.MethodImplementationsTreeNode; +import org.quiltmc.enigma.analysis.MethodInheritanceTreeNode; +import org.quiltmc.enigma.analysis.index.EntryIndex; +import org.quiltmc.enigma.analysis.index.InheritanceIndex; +import org.quiltmc.enigma.analysis.index.JarIndex; +import org.quiltmc.enigma.classprovider.CachingClassProvider; +import org.quiltmc.enigma.classprovider.JarClassProvider; +import org.quiltmc.enigma.translation.VoidTranslator; +import org.quiltmc.enigma.translation.representation.AccessFlags; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodDefEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; + +import java.nio.file.Path; +import java.util.Collection; +import java.util.List; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.*; + +public class TestJarIndexLoneClass { + public static final Path JAR = TestUtil.obfJar("lone_class"); + private final JarIndex index; + + public TestJarIndexLoneClass() throws Exception { + JarClassProvider jcp = new JarClassProvider(JAR); + this.index = JarIndex.empty(); + this.index.indexJar(jcp.getClassNames(), new CachingClassProvider(jcp), ProgressListener.none()); + } + + @Test + public void obfEntries() { + assertThat(this.index.getEntryIndex().getClasses(), Matchers.containsInAnyOrder( + TestEntryFactory.newClass("org/quiltmc/enigma/input/Keep"), + TestEntryFactory.newClass("a") + )); + } + + @Test + public void translationIndex() { + InheritanceIndex inheritanceIndex = this.index.getInheritanceIndex(); + assertThat(inheritanceIndex.getParents(new ClassEntry("a")), is(empty())); + assertThat(inheritanceIndex.getParents(new ClassEntry("org/quiltmc/enigma/input/Keep")), is(empty())); + assertThat(inheritanceIndex.getAncestors(new ClassEntry("a")), is(empty())); + assertThat(inheritanceIndex.getAncestors(new ClassEntry("org/quiltmc/enigma/input/Keep")), is(empty())); + assertThat(inheritanceIndex.getChildren(new ClassEntry("a")), is(empty())); + assertThat(inheritanceIndex.getChildren(new ClassEntry("org/quiltmc/enigma/input/Keep")), is(empty())); + } + + @Test + public void access() { + EntryIndex entryIndex = this.index.getEntryIndex(); + assertThat(entryIndex.getFieldAccess(TestEntryFactory.newField("a", "a", "Ljava/lang/String;")), is(AccessFlags.PRIVATE)); + assertThat(entryIndex.getMethodAccess(TestEntryFactory.newMethod("a", "a", "()Ljava/lang/String;")), is(AccessFlags.PUBLIC)); + assertThat(entryIndex.getFieldAccess(TestEntryFactory.newField("a", "b", "Ljava/lang/String;")), is(nullValue())); + assertThat(entryIndex.getFieldAccess(TestEntryFactory.newField("a", "a", "LFoo;")), is(nullValue())); + } + + @Test + public void classInheritance() { + IndexTreeBuilder treeBuilder = new IndexTreeBuilder(this.index); + ClassInheritanceTreeNode node = treeBuilder.buildClassInheritance(VoidTranslator.INSTANCE, TestEntryFactory.newClass("a")); + assertThat(node, is(not(nullValue()))); + assertThat(node.getClassName(), is("a")); + assertThat(node.getChildCount(), is(0)); + } + + @Test + public void methodInheritance() { + IndexTreeBuilder treeBuilder = new IndexTreeBuilder(this.index); + MethodEntry source = TestEntryFactory.newMethod("a", "a", "()Ljava/lang/String;"); + MethodInheritanceTreeNode node = treeBuilder.buildMethodInheritance(VoidTranslator.INSTANCE, source); + assertThat(node, is(not(nullValue()))); + assertThat(node.getMethodEntry(), is(source)); + assertThat(node.getChildCount(), is(0)); + } + + @Test + public void classImplementations() { + IndexTreeBuilder treeBuilder = new IndexTreeBuilder(this.index); + ClassImplementationsTreeNode node = treeBuilder.buildClassImplementations(VoidTranslator.INSTANCE, TestEntryFactory.newClass("a")); + assertThat(node, is(nullValue())); + } + + @Test + public void methodImplementations() { + IndexTreeBuilder treeBuilder = new IndexTreeBuilder(this.index); + MethodEntry source = TestEntryFactory.newMethod("a", "a", "()Ljava/lang/String;"); + + List nodes = treeBuilder.buildMethodImplementations(VoidTranslator.INSTANCE, source); + assertThat(nodes, hasSize(1)); + assertThat(nodes.get(0).getMethodEntry(), is(source)); + } + + @Test + public void relatedMethodImplementations() { + Collection entries = this.index.getEntryResolver().resolveEquivalentMethods(TestEntryFactory.newMethod("a", "a", "()Ljava/lang/String;")); + assertThat(entries, containsInAnyOrder( + TestEntryFactory.newMethod("a", "a", "()Ljava/lang/String;") + )); + } + + @Test + public void fieldReferences() { + FieldEntry source = TestEntryFactory.newField("a", "a", "Ljava/lang/String;"); + Collection> references = this.index.getReferenceIndex().getReferencesToField(source); + assertThat(references, Matchers.containsInAnyOrder( + TestEntryFactory.newFieldReferenceByMethod(source, "a", "", "(Ljava/lang/String;)V"), + TestEntryFactory.newFieldReferenceByMethod(source, "a", "a", "()Ljava/lang/String;") + )); + } + + @Test + public void behaviorReferences() { + assertThat(this.index.getReferenceIndex().getReferencesToMethod(TestEntryFactory.newMethod("a", "a", "()Ljava/lang/String;")), is(empty())); + } + + @Test + public void interfaces() { + assertThat(this.index.getInheritanceIndex().getParents(new ClassEntry("a")), is(empty())); + } + + @Test + public void implementingClasses() { + assertThat(this.index.getInheritanceIndex().getChildren(new ClassEntry("a")), is(empty())); + } + + @Test + public void isInterface() { + assertThat(this.index.getInheritanceIndex().isParent(new ClassEntry("a")), is(false)); + } + + @Test + public void testContains() { + EntryIndex entryIndex = this.index.getEntryIndex(); + assertThat(entryIndex.hasClass(TestEntryFactory.newClass("a")), is(true)); + assertThat(entryIndex.hasClass(TestEntryFactory.newClass("b")), is(false)); + assertThat(entryIndex.hasField(TestEntryFactory.newField("a", "a", "Ljava/lang/String;")), is(true)); + assertThat(entryIndex.hasField(TestEntryFactory.newField("a", "b", "Ljava/lang/String;")), is(false)); + assertThat(entryIndex.hasField(TestEntryFactory.newField("a", "a", "LFoo;")), is(false)); + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod("a", "a", "()Ljava/lang/String;")), is(true)); + assertThat(entryIndex.hasMethod(TestEntryFactory.newMethod("a", "b", "()Ljava/lang/String;")), is(false)); + } +} diff --git a/enigma/src/test/java/cuchaz/enigma/TestMethodDescriptor.java b/enigma/src/test/java/org/quiltmc/enigma/TestMethodDescriptor.java similarity index 97% rename from enigma/src/test/java/cuchaz/enigma/TestMethodDescriptor.java rename to enigma/src/test/java/org/quiltmc/enigma/TestMethodDescriptor.java index 331480b7d..0f1e765df 100644 --- a/enigma/src/test/java/cuchaz/enigma/TestMethodDescriptor.java +++ b/enigma/src/test/java/org/quiltmc/enigma/TestMethodDescriptor.java @@ -1,7 +1,7 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; import org.junit.jupiter.api.Test; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/enigma/src/test/java/cuchaz/enigma/TestStatsGeneration.java b/enigma/src/test/java/org/quiltmc/enigma/TestStatsGeneration.java similarity index 84% rename from enigma/src/test/java/cuchaz/enigma/TestStatsGeneration.java rename to enigma/src/test/java/org/quiltmc/enigma/TestStatsGeneration.java index 5cf95b834..2b6fa580e 100644 --- a/enigma/src/test/java/cuchaz/enigma/TestStatsGeneration.java +++ b/enigma/src/test/java/org/quiltmc/enigma/TestStatsGeneration.java @@ -1,14 +1,14 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.classprovider.JarClassProvider; -import cuchaz.enigma.stats.ProjectStatsResult; -import cuchaz.enigma.stats.StatType; -import cuchaz.enigma.stats.StatsGenerator; -import cuchaz.enigma.translation.mapping.EntryChange; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.EntryUtil; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.utils.validation.ValidationContext; +import org.quiltmc.enigma.classprovider.JarClassProvider; +import org.quiltmc.enigma.stats.ProjectStatsResult; +import org.quiltmc.enigma.stats.StatType; +import org.quiltmc.enigma.stats.StatsGenerator; +import org.quiltmc.enigma.translation.mapping.EntryChange; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.EntryUtil; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.util.validation.ValidationContext; import org.junit.jupiter.api.Test; import java.io.IOException; diff --git a/enigma/src/test/java/org/quiltmc/enigma/TestTokensConstructors.java b/enigma/src/test/java/org/quiltmc/enigma/TestTokensConstructors.java new file mode 100644 index 000000000..3135a537a --- /dev/null +++ b/enigma/src/test/java/org/quiltmc/enigma/TestTokensConstructors.java @@ -0,0 +1,125 @@ +package org.quiltmc.enigma; + +import org.quiltmc.enigma.source.Decompilers; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.junit.jupiter.api.Test; + +import java.nio.file.Path; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.*; + +public class TestTokensConstructors extends TokenChecker { + private static final Path JAR = TestUtil.obfJar("constructors"); + + public TestTokensConstructors() throws Exception { + super(JAR, Decompilers.PROCYON); // Procyon is the only one that indexes constructor invocations + } + + @Test + public void baseDeclarations() { + assertThat(getDeclarationToken(TestEntryFactory.newMethod("a", "", "()V")), is("a")); + assertThat(getDeclarationToken(TestEntryFactory.newMethod("a", "", "(I)V")), is("a")); + } + + @Test + public void subDeclarations() { + assertThat(getDeclarationToken(TestEntryFactory.newMethod("d", "", "()V")), is("d")); + assertThat(getDeclarationToken(TestEntryFactory.newMethod("d", "", "(I)V")), is("d")); + assertThat(getDeclarationToken(TestEntryFactory.newMethod("d", "", "(II)V")), is("d")); + assertThat(getDeclarationToken(TestEntryFactory.newMethod("d", "", "(III)V")), is("d")); + } + + @Test + public void subsubDeclarations() { + assertThat(getDeclarationToken(TestEntryFactory.newMethod("e", "", "(I)V")), is("e")); + } + + @Test + public void defaultDeclarations() { + assertThat(getDeclarationToken(TestEntryFactory.newMethod("c", "", "()V")), nullValue()); + } + + @Test + public void baseDefaultReferences() { + MethodEntry source = TestEntryFactory.newMethod("a", "", "()V"); + assertThat( + getReferenceTokens(TestEntryFactory.newBehaviorReferenceByMethod(source, "b", "a", "()V")), + containsInAnyOrder("a") + ); + assertThat( + getReferenceTokens(TestEntryFactory.newBehaviorReferenceByMethod(source, "d", "", "()V")), + is(empty()) // implicit call, not decompiled to token + ); + assertThat( + getReferenceTokens(TestEntryFactory.newBehaviorReferenceByMethod(source, "d", "", "(III)V")), + is(empty()) // implicit call, not decompiled to token + ); + } + + @Test + public void baseIntReferences() { + MethodEntry source = TestEntryFactory.newMethod("a", "", "(I)V"); + assertThat( + getReferenceTokens(TestEntryFactory.newBehaviorReferenceByMethod(source, "b", "b", "()V")), + containsInAnyOrder("a") + ); + } + + @Test + public void subDefaultReferences() { + MethodEntry source = TestEntryFactory.newMethod("d", "", "()V"); + assertThat( + getReferenceTokens(TestEntryFactory.newBehaviorReferenceByMethod(source, "b", "c", "()V")), + containsInAnyOrder("d") + ); + assertThat( + getReferenceTokens(TestEntryFactory.newBehaviorReferenceByMethod(source, "d", "", "(I)V")), + containsInAnyOrder("this") + ); + } + + @Test + public void subIntReferences() { + MethodEntry source = TestEntryFactory.newMethod("d", "", "(I)V"); + assertThat(getReferenceTokens( + TestEntryFactory.newBehaviorReferenceByMethod(source, "b", "d", "()V")), + containsInAnyOrder("d") + ); + assertThat(getReferenceTokens( + TestEntryFactory.newBehaviorReferenceByMethod(source, "d", "", "(II)V")), + containsInAnyOrder("this") + ); + assertThat(getReferenceTokens( + TestEntryFactory.newBehaviorReferenceByMethod(source, "e", "", "(I)V")), + containsInAnyOrder("super") + ); + } + + @Test + public void subIntIntReferences() { + MethodEntry source = TestEntryFactory.newMethod("d", "", "(II)V"); + assertThat( + getReferenceTokens(TestEntryFactory.newBehaviorReferenceByMethod(source, "b", "e", "()V")), + containsInAnyOrder("d") + ); + } + + @Test + public void subsubIntReferences() { + MethodEntry source = TestEntryFactory.newMethod("e", "", "(I)V"); + assertThat( + getReferenceTokens(TestEntryFactory.newBehaviorReferenceByMethod(source, "b", "f", "()V")), + containsInAnyOrder("e") + ); + } + + @Test + public void defaultConstructableReferences() { + MethodEntry source = TestEntryFactory.newMethod("c", "", "()V"); + assertThat( + getReferenceTokens(TestEntryFactory.newBehaviorReferenceByMethod(source, "b", "g", "()V")), + containsInAnyOrder("c") + ); + } +} diff --git a/enigma/src/test/java/org/quiltmc/enigma/TestTranslator.java b/enigma/src/test/java/org/quiltmc/enigma/TestTranslator.java new file mode 100644 index 000000000..e60f892de --- /dev/null +++ b/enigma/src/test/java/org/quiltmc/enigma/TestTranslator.java @@ -0,0 +1,151 @@ +package org.quiltmc.enigma; + +import org.quiltmc.enigma.classprovider.ClasspathClassProvider; +import org.quiltmc.enigma.translation.TranslateResult; +import org.quiltmc.enigma.translation.Translator; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import java.nio.file.Path; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.*; + +public class TestTranslator { + public static final Path JAR = TestUtil.obfJar("translation"); + + private static Enigma enigma; + private static EnigmaProject project; + private static EntryTree mappings; + private static Translator deobfuscator; + + @BeforeAll + public static void beforeClass() throws Exception { + enigma = Enigma.create(); + project = enigma.openJar(JAR, new ClasspathClassProvider(), ProgressListener.none()); + mappings = MappingFormat.ENIGMA_FILE.read( + TestUtil.getResource("/translation.mappings"), + ProgressListener.none()); + project.setMappings(mappings); + deobfuscator = project.getMapper().getDeobfuscator(); + } + + @Test + public void basicClasses() { + this.assertMapping(TestEntryFactory.newClass("a"), TestEntryFactory.newClass("deobf/A_Basic")); + this.assertMapping(TestEntryFactory.newClass("b"), TestEntryFactory.newClass("deobf/B_BaseClass")); + this.assertMapping(TestEntryFactory.newClass("c"), TestEntryFactory.newClass("deobf/C_SubClass")); + } + + @Test + public void basicFields() { + this.assertMapping(TestEntryFactory.newField("a", "a", "I"), TestEntryFactory.newField("deobf/A_Basic", "f1", "I")); + this.assertMapping(TestEntryFactory.newField("a", "a", "F"), TestEntryFactory.newField("deobf/A_Basic", "f2", "F")); + this.assertMapping(TestEntryFactory.newField("a", "a", "Ljava/lang/String;"), TestEntryFactory.newField("deobf/A_Basic", "f3", "Ljava/lang/String;")); + } + + @Test + public void basicMethods() { + this.assertMapping(TestEntryFactory.newMethod("a", "a", "()V"), TestEntryFactory.newMethod("deobf/A_Basic", "m1", "()V")); + this.assertMapping(TestEntryFactory.newMethod("a", "a", "()I"), TestEntryFactory.newMethod("deobf/A_Basic", "m2", "()I")); + this.assertMapping(TestEntryFactory.newMethod("a", "a", "(I)V"), TestEntryFactory.newMethod("deobf/A_Basic", "m3", "(I)V")); + this.assertMapping(TestEntryFactory.newMethod("a", "a", "(I)I"), TestEntryFactory.newMethod("deobf/A_Basic", "m4", "(I)I")); + } + + // TODO: basic constructors + + @Test + public void inheritanceFields() { + this.assertMapping(TestEntryFactory.newField("b", "a", "I"), TestEntryFactory.newField("deobf/B_BaseClass", "f1", "I")); + this.assertMapping(TestEntryFactory.newField("b", "a", "C"), TestEntryFactory.newField("deobf/B_BaseClass", "f2", "C")); + this.assertMapping(TestEntryFactory.newField("c", "b", "I"), TestEntryFactory.newField("deobf/C_SubClass", "f3", "I")); + this.assertMapping(TestEntryFactory.newField("c", "c", "I"), TestEntryFactory.newField("deobf/C_SubClass", "f4", "I")); + } + + @Test + public void inheritanceFieldsShadowing() { + this.assertMapping(TestEntryFactory.newField("c", "b", "C"), TestEntryFactory.newField("deobf/C_SubClass", "f2", "C")); + } + + @Test + public void inheritanceFieldsBySubClass() { + this.assertMapping(TestEntryFactory.newField("c", "a", "I"), TestEntryFactory.newField("deobf/C_SubClass", "f1", "I")); + // NOTE: can't reference b.C by subclass since it's shadowed + } + + @Test + public void inheritanceMethods() { + this.assertMapping(TestEntryFactory.newMethod("b", "a", "()I"), TestEntryFactory.newMethod("deobf/B_BaseClass", "m1", "()I")); + this.assertMapping(TestEntryFactory.newMethod("b", "b", "()I"), TestEntryFactory.newMethod("deobf/B_BaseClass", "m2", "()I")); + this.assertMapping(TestEntryFactory.newMethod("c", "c", "()I"), TestEntryFactory.newMethod("deobf/C_SubClass", "m3", "()I")); + } + + @Test + public void inheritanceMethodsOverrides() { + this.assertMapping(TestEntryFactory.newMethod("c", "a", "()I"), TestEntryFactory.newMethod("deobf/C_SubClass", "m1", "()I")); + } + + @Test + public void inheritanceMethodsBySubClass() { + this.assertMapping(TestEntryFactory.newMethod("c", "b", "()I"), TestEntryFactory.newMethod("deobf/C_SubClass", "m2", "()I")); + } + + @Test + public void innerClasses() { + // classes + this.assertMapping(TestEntryFactory.newClass("g"), TestEntryFactory.newClass("deobf/G_OuterClass")); + this.assertMapping(TestEntryFactory.newClass("g$a"), TestEntryFactory.newClass("deobf/G_OuterClass$A_InnerClass")); + this.assertMapping(TestEntryFactory.newClass("g$a$a"), TestEntryFactory.newClass("deobf/G_OuterClass$A_InnerClass$A_InnerInnerClass")); + this.assertMapping(TestEntryFactory.newClass("g$b"), TestEntryFactory.newClass("deobf/G_OuterClass$b")); + this.assertMapping(TestEntryFactory.newClass("g$b$a"), TestEntryFactory.newClass("deobf/G_OuterClass$b$A_NamedInnerClass")); + + // fields + this.assertMapping(TestEntryFactory.newField("g$a", "a", "I"), TestEntryFactory.newField("deobf/G_OuterClass$A_InnerClass", "f1", "I")); + this.assertMapping(TestEntryFactory.newField("g$a", "a", "Ljava/lang/String;"), TestEntryFactory.newField("deobf/G_OuterClass$A_InnerClass", "f2", "Ljava/lang/String;")); + this.assertMapping(TestEntryFactory.newField("g$a$a", "a", "I"), TestEntryFactory.newField("deobf/G_OuterClass$A_InnerClass$A_InnerInnerClass", "f3", "I")); + this.assertMapping(TestEntryFactory.newField("g$b$a", "a", "I"), TestEntryFactory.newField("deobf/G_OuterClass$b$A_NamedInnerClass", "f4", "I")); + + // methods + this.assertMapping(TestEntryFactory.newMethod("g$a", "a", "()V"), TestEntryFactory.newMethod("deobf/G_OuterClass$A_InnerClass", "m1", "()V")); + this.assertMapping(TestEntryFactory.newMethod("g$a$a", "a", "()V"), TestEntryFactory.newMethod("deobf/G_OuterClass$A_InnerClass$A_InnerInnerClass", "m2", "()V")); + } + + @Test + public void namelessClass() { + this.assertMapping(TestEntryFactory.newClass("h"), TestEntryFactory.newClass("h")); + } + + @Test + public void testGenerics() { + // classes + this.assertMapping(TestEntryFactory.newClass("i"), TestEntryFactory.newClass("deobf/I_Generics")); + this.assertMapping(TestEntryFactory.newClass("i$a"), TestEntryFactory.newClass("deobf/I_Generics$A_Type")); + this.assertMapping(TestEntryFactory.newClass("i$b"), TestEntryFactory.newClass("deobf/I_Generics$B_Generic")); + + // fields + this.assertMapping(TestEntryFactory.newField("i", "a", "Ljava/util/List;"), TestEntryFactory.newField("deobf/I_Generics", "f1", "Ljava/util/List;")); + this.assertMapping(TestEntryFactory.newField("i", "b", "Ljava/util/List;"), TestEntryFactory.newField("deobf/I_Generics", "f2", "Ljava/util/List;")); + this.assertMapping(TestEntryFactory.newField("i", "a", "Ljava/util/Map;"), TestEntryFactory.newField("deobf/I_Generics", "f3", "Ljava/util/Map;")); + this.assertMapping(TestEntryFactory.newField("i$b", "a", "Ljava/lang/Object;"), TestEntryFactory.newField("deobf/I_Generics$B_Generic", "f4", "Ljava/lang/Object;")); + this.assertMapping(TestEntryFactory.newField("i", "a", "Li$b;"), TestEntryFactory.newField("deobf/I_Generics", "f5", "Ldeobf/I_Generics$B_Generic;")); + this.assertMapping(TestEntryFactory.newField("i", "b", "Li$b;"), TestEntryFactory.newField("deobf/I_Generics", "f6", "Ldeobf/I_Generics$B_Generic;")); + + // methods + this.assertMapping(TestEntryFactory.newMethod("i$b", "a", "()Ljava/lang/Object;"), TestEntryFactory.newMethod("deobf/I_Generics$B_Generic", "m1", "()Ljava/lang/Object;")); + } + + private void assertMapping(Entry obf, Entry deobf) { + TranslateResult> result = deobfuscator.extendedTranslate(obf); + assertThat(result, is(notNullValue())); + assertThat(result.getValue(), is(deobf)); + + String deobfName = result.getValue().getName(); + if (deobfName != null) { + assertThat(deobfName, is(deobf.getName())); + } + } +} diff --git a/enigma/src/test/java/cuchaz/enigma/TestTypeDescriptor.java b/enigma/src/test/java/org/quiltmc/enigma/TestTypeDescriptor.java similarity index 95% rename from enigma/src/test/java/cuchaz/enigma/TestTypeDescriptor.java rename to enigma/src/test/java/org/quiltmc/enigma/TestTypeDescriptor.java index 867b15dd7..89e410a58 100644 --- a/enigma/src/test/java/cuchaz/enigma/TestTypeDescriptor.java +++ b/enigma/src/test/java/org/quiltmc/enigma/TestTypeDescriptor.java @@ -1,9 +1,9 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; -import static cuchaz.enigma.TestEntryFactory.newClass; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; @@ -66,14 +66,14 @@ public void isClass() { @Test public void getClassEntry() { - assertThat(new TypeDescriptor("LFoo;").getTypeEntry(), is(newClass("Foo"))); - assertThat(new TypeDescriptor("Ljava/lang/String;").getTypeEntry(), is(newClass("java/lang/String"))); + assertThat(new TypeDescriptor("LFoo;").getTypeEntry(), Matchers.is(TestEntryFactory.newClass("Foo"))); + assertThat(new TypeDescriptor("Ljava/lang/String;").getTypeEntry(), Matchers.is(TestEntryFactory.newClass("java/lang/String"))); } @Test public void getArrayClassEntry() { - assertThat(new TypeDescriptor("[LFoo;").getTypeEntry(), is(newClass("Foo"))); - assertThat(new TypeDescriptor("[[[Ljava/lang/String;").getTypeEntry(), is(newClass("java/lang/String"))); + assertThat(new TypeDescriptor("[LFoo;").getTypeEntry(), Matchers.is(TestEntryFactory.newClass("Foo"))); + assertThat(new TypeDescriptor("[[[Ljava/lang/String;").getTypeEntry(), Matchers.is(TestEntryFactory.newClass("java/lang/String"))); } @Test diff --git a/enigma/src/test/java/cuchaz/enigma/TokenChecker.java b/enigma/src/test/java/org/quiltmc/enigma/TokenChecker.java similarity index 79% rename from enigma/src/test/java/cuchaz/enigma/TokenChecker.java rename to enigma/src/test/java/org/quiltmc/enigma/TokenChecker.java index 26aaa8d54..e6ef0eba1 100644 --- a/enigma/src/test/java/cuchaz/enigma/TokenChecker.java +++ b/enigma/src/test/java/org/quiltmc/enigma/TokenChecker.java @@ -1,18 +1,18 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.classprovider.CachingClassProvider; -import cuchaz.enigma.classprovider.ClassProvider; -import cuchaz.enigma.classprovider.JarClassProvider; -import cuchaz.enigma.source.Decompiler; -import cuchaz.enigma.source.DecompilerService; -import cuchaz.enigma.source.Source; -import cuchaz.enigma.source.SourceIndex; -import cuchaz.enigma.source.SourceSettings; -import cuchaz.enigma.source.Token; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.utils.Pair; +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.classprovider.CachingClassProvider; +import org.quiltmc.enigma.classprovider.ClassProvider; +import org.quiltmc.enigma.classprovider.JarClassProvider; +import org.quiltmc.enigma.source.Decompiler; +import org.quiltmc.enigma.source.DecompilerService; +import org.quiltmc.enigma.source.Source; +import org.quiltmc.enigma.source.SourceIndex; +import org.quiltmc.enigma.source.SourceSettings; +import org.quiltmc.enigma.source.Token; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.util.Pair; import org.tinylog.Logger; import java.io.IOException; diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/Keep.java b/enigma/src/test/java/org/quiltmc/enigma/input/Keep.java similarity index 75% rename from enigma/src/test/java/cuchaz/enigma/inputs/Keep.java rename to enigma/src/test/java/org/quiltmc/enigma/input/Keep.java index db0659ba0..2195d10a2 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/Keep.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/Keep.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs; +package org.quiltmc.enigma.input; public class Keep { public static void main(String... args) { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/bridge/BaseClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/bridge/BaseClass.java similarity index 95% rename from enigma/src/test/java/cuchaz/enigma/inputs/bridge/BaseClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/bridge/BaseClass.java index 94906548c..61d6c56dd 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/bridge/BaseClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/bridge/BaseClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.bridge; +package org.quiltmc.enigma.input.bridge; // a public class BaseClass { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/bridge/OtherClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/bridge/OtherClass.java similarity index 91% rename from enigma/src/test/java/cuchaz/enigma/inputs/bridge/OtherClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/bridge/OtherClass.java index 4240e41e7..a54cb4ffc 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/bridge/OtherClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/bridge/OtherClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.bridge; +package org.quiltmc.enigma.input.bridge; import java.util.function.Function; import java.util.function.Supplier; diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/bridge/SubClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/bridge/SubClass.java similarity index 96% rename from enigma/src/test/java/cuchaz/enigma/inputs/bridge/SubClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/bridge/SubClass.java index 84e1dc746..54c217472 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/bridge/SubClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/bridge/SubClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.bridge; +package org.quiltmc.enigma.input.bridge; // c extends a public class SubClass extends BaseClass { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/constructors/BaseClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/constructors/BaseClass.java similarity index 81% rename from enigma/src/test/java/cuchaz/enigma/inputs/constructors/BaseClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/constructors/BaseClass.java index 134681311..b0bb13c5d 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/constructors/BaseClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/constructors/BaseClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.constructors; +package org.quiltmc.enigma.input.constructors; // a public class BaseClass { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/constructors/Caller.java b/enigma/src/test/java/org/quiltmc/enigma/input/constructors/Caller.java similarity index 94% rename from enigma/src/test/java/cuchaz/enigma/inputs/constructors/Caller.java rename to enigma/src/test/java/org/quiltmc/enigma/input/constructors/Caller.java index 845de9f74..7ce268e33 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/constructors/Caller.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/constructors/Caller.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.constructors; +package org.quiltmc.enigma.input.constructors; // b public class Caller { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/constructors/DefaultConstructable.java b/enigma/src/test/java/org/quiltmc/enigma/input/constructors/DefaultConstructable.java similarity index 59% rename from enigma/src/test/java/cuchaz/enigma/inputs/constructors/DefaultConstructable.java rename to enigma/src/test/java/org/quiltmc/enigma/input/constructors/DefaultConstructable.java index 26a3ddbb7..70cd874c8 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/constructors/DefaultConstructable.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/constructors/DefaultConstructable.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.constructors; +package org.quiltmc.enigma.input.constructors; public class DefaultConstructable { // only default constructor diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/constructors/SubClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/constructors/SubClass.java similarity index 89% rename from enigma/src/test/java/cuchaz/enigma/inputs/constructors/SubClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/constructors/SubClass.java index 150b14681..6c4e5a7b7 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/constructors/SubClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/constructors/SubClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.constructors; +package org.quiltmc.enigma.input.constructors; // d extends a public class SubClass extends BaseClass { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/constructors/SubSubClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/constructors/SubSubClass.java similarity index 74% rename from enigma/src/test/java/cuchaz/enigma/inputs/constructors/SubSubClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/constructors/SubSubClass.java index eb574b349..a973303f7 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/constructors/SubSubClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/constructors/SubSubClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.constructors; +package org.quiltmc.enigma.input.constructors; // e extends d public class SubSubClass extends SubClass { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/decompiler/TestVarargsDecompile.java b/enigma/src/test/java/org/quiltmc/enigma/input/decompiler/TestVarargsDecompile.java similarity index 55% rename from enigma/src/test/java/cuchaz/enigma/inputs/decompiler/TestVarargsDecompile.java rename to enigma/src/test/java/org/quiltmc/enigma/input/decompiler/TestVarargsDecompile.java index 92beabbd5..315dd9e3a 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/decompiler/TestVarargsDecompile.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/decompiler/TestVarargsDecompile.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.inputs.decompiler; +package org.quiltmc.enigma.input.decompiler; -import cuchaz.enigma.inputs.Keep; +import org.quiltmc.enigma.input.Keep; public class TestVarargsDecompile { public void useVarargs() { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/enums/Color.java b/enigma/src/test/java/org/quiltmc/enigma/input/enums/Color.java similarity index 89% rename from enigma/src/test/java/cuchaz/enigma/inputs/enums/Color.java rename to enigma/src/test/java/org/quiltmc/enigma/input/enums/Color.java index 228227b58..d844e9f53 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/enums/Color.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/enums/Color.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.enums; +package org.quiltmc.enigma.input.enums; // this enum does not have its `values` or `valueOf` methods obfuscated. // (see proguard-enums-test.conf) diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/enums/TestEnum.java b/enigma/src/test/java/org/quiltmc/enigma/input/enums/TestEnum.java similarity index 70% rename from enigma/src/test/java/cuchaz/enigma/inputs/enums/TestEnum.java rename to enigma/src/test/java/org/quiltmc/enigma/input/enums/TestEnum.java index 624f029da..7b916f17b 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/enums/TestEnum.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/enums/TestEnum.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.enums; +package org.quiltmc.enigma.input.enums; public enum TestEnum { One, diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/inheritanceTree/BaseClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/inheritance_tree/BaseClass.java similarity index 84% rename from enigma/src/test/java/cuchaz/enigma/inputs/inheritanceTree/BaseClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/inheritance_tree/BaseClass.java index caa9cc1e5..ed8fc070b 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/inheritanceTree/BaseClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/inheritance_tree/BaseClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.inheritanceTree; +package org.quiltmc.enigma.input.inheritance_tree; // a public abstract class BaseClass { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassA.java b/enigma/src/test/java/org/quiltmc/enigma/input/inheritance_tree/SubclassA.java similarity index 79% rename from enigma/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassA.java rename to enigma/src/test/java/org/quiltmc/enigma/input/inheritance_tree/SubclassA.java index 4ab64fb6a..c3606ab5c 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassA.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/inheritance_tree/SubclassA.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.inheritanceTree; +package org.quiltmc.enigma.input.inheritance_tree; // b extends a public abstract class SubclassA extends BaseClass { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassB.java b/enigma/src/test/java/org/quiltmc/enigma/input/inheritance_tree/SubclassB.java similarity index 90% rename from enigma/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassB.java rename to enigma/src/test/java/org/quiltmc/enigma/input/inheritance_tree/SubclassB.java index f6454c05e..c3bc4c0c1 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubclassB.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/inheritance_tree/SubclassB.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.inheritanceTree; +package org.quiltmc.enigma.input.inheritance_tree; // c extends a public class SubclassB extends BaseClass { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubsubclassAA.java b/enigma/src/test/java/org/quiltmc/enigma/input/inheritance_tree/SubsubclassAA.java similarity index 89% rename from enigma/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubsubclassAA.java rename to enigma/src/test/java/org/quiltmc/enigma/input/inheritance_tree/SubsubclassAA.java index 90c94303d..32b55c69f 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/inheritanceTree/SubsubclassAA.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/inheritance_tree/SubsubclassAA.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.inheritanceTree; +package org.quiltmc.enigma.input.inheritance_tree; // d extends b public class SubsubclassAA extends SubclassA { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/A_Anonymous.java b/enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/A_Anonymous.java similarity index 81% rename from enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/A_Anonymous.java rename to enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/A_Anonymous.java index 7b97310d9..9f9078d0e 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/A_Anonymous.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/A_Anonymous.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.innerClasses; +package org.quiltmc.enigma.input.inner_classes; @SuppressWarnings("Convert2Lambda") public class A_Anonymous { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/B_AnonymousWithScopeArgs.java b/enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/B_AnonymousWithScopeArgs.java similarity index 81% rename from enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/B_AnonymousWithScopeArgs.java rename to enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/B_AnonymousWithScopeArgs.java index 2d3452723..b5b3fab6f 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/B_AnonymousWithScopeArgs.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/B_AnonymousWithScopeArgs.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.innerClasses; +package org.quiltmc.enigma.input.inner_classes; public class B_AnonymousWithScopeArgs { public static void foo(final D_Simple arg) { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/C_ConstructorArgs.java b/enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/C_ConstructorArgs.java similarity index 80% rename from enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/C_ConstructorArgs.java rename to enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/C_ConstructorArgs.java index 69d211bbd..396db6b3d 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/C_ConstructorArgs.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/C_ConstructorArgs.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.innerClasses; +package org.quiltmc.enigma.input.inner_classes; @SuppressWarnings("unused") public class C_ConstructorArgs { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/D_Simple.java b/enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/D_Simple.java similarity index 57% rename from enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/D_Simple.java rename to enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/D_Simple.java index 72592bc5d..cdecc896b 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/D_Simple.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/D_Simple.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.innerClasses; +package org.quiltmc.enigma.input.inner_classes; public class D_Simple { class Inner { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java b/enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/E_AnonymousWithOuterAccess.java similarity index 89% rename from enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java rename to enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/E_AnonymousWithOuterAccess.java index f2d3ab610..224f90469 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/E_AnonymousWithOuterAccess.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/E_AnonymousWithOuterAccess.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.innerClasses; +package org.quiltmc.enigma.input.inner_classes; public class E_AnonymousWithOuterAccess { // reproduction of error case documented at: diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/F_ClassTree.java b/enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/F_ClassTree.java similarity index 77% rename from enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/F_ClassTree.java rename to enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/F_ClassTree.java index 7fe4aed45..4bd59b701 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/innerClasses/F_ClassTree.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/inner_classes/F_ClassTree.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.innerClasses; +package org.quiltmc.enigma.input.inner_classes; public class F_ClassTree { public class Level1 { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/loneClass/LoneClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/lone_class/LoneClass.java similarity index 77% rename from enigma/src/test/java/cuchaz/enigma/inputs/loneClass/LoneClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/lone_class/LoneClass.java index c1346fbee..aaa846fb5 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/loneClass/LoneClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/lone_class/LoneClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.loneClass; +package org.quiltmc.enigma.input.lone_class; public class LoneClass { private String name; diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/packageAccess/Base.java b/enigma/src/test/java/org/quiltmc/enigma/input/package_access/Base.java similarity index 56% rename from enigma/src/test/java/cuchaz/enigma/inputs/packageAccess/Base.java rename to enigma/src/test/java/org/quiltmc/enigma/input/package_access/Base.java index 6f5fe3046..ef015db1b 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/packageAccess/Base.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/package_access/Base.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.packageAccess; +package org.quiltmc.enigma.input.package_access; public class Base { protected int make() { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/packageAccess/SamePackageChild.java b/enigma/src/test/java/org/quiltmc/enigma/input/package_access/SamePackageChild.java similarity index 77% rename from enigma/src/test/java/cuchaz/enigma/inputs/packageAccess/SamePackageChild.java rename to enigma/src/test/java/org/quiltmc/enigma/input/package_access/SamePackageChild.java index 5ca1a854b..3aa0ac1c9 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/packageAccess/SamePackageChild.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/package_access/SamePackageChild.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.packageAccess; +package org.quiltmc.enigma.input.package_access; public class SamePackageChild extends Base { class Inner { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/packageAccess/sub/OtherPackageChild.java b/enigma/src/test/java/org/quiltmc/enigma/input/package_access/sub/OtherPackageChild.java similarity index 62% rename from enigma/src/test/java/cuchaz/enigma/inputs/packageAccess/sub/OtherPackageChild.java rename to enigma/src/test/java/org/quiltmc/enigma/input/package_access/sub/OtherPackageChild.java index 30acd762b..e5b05889a 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/packageAccess/sub/OtherPackageChild.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/package_access/sub/OtherPackageChild.java @@ -1,6 +1,6 @@ -package cuchaz.enigma.inputs.packageAccess.sub; +package org.quiltmc.enigma.input.package_access.sub; -import cuchaz.enigma.inputs.packageAccess.Base; +import org.quiltmc.enigma.input.package_access.Base; public class OtherPackageChild extends Base { class Inner { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/translation/A_Basic.java b/enigma/src/test/java/org/quiltmc/enigma/input/translation/A_Basic.java similarity index 85% rename from enigma/src/test/java/cuchaz/enigma/inputs/translation/A_Basic.java rename to enigma/src/test/java/org/quiltmc/enigma/input/translation/A_Basic.java index 30871d078..af92a1960 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/translation/A_Basic.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/translation/A_Basic.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.translation; +package org.quiltmc.enigma.input.translation; public class A_Basic { public int one; diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/translation/B_BaseClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/translation/B_BaseClass.java similarity index 74% rename from enigma/src/test/java/cuchaz/enigma/inputs/translation/B_BaseClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/translation/B_BaseClass.java index 4eb7ece09..edb4ad492 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/translation/B_BaseClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/translation/B_BaseClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.translation; +package org.quiltmc.enigma.input.translation; public class B_BaseClass { public int f1; diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/translation/C_SubClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/translation/C_SubClass.java similarity index 81% rename from enigma/src/test/java/cuchaz/enigma/inputs/translation/C_SubClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/translation/C_SubClass.java index bb122ede8..f6c658f39 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/translation/C_SubClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/translation/C_SubClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.translation; +package org.quiltmc.enigma.input.translation; public class C_SubClass extends B_BaseClass { public char f2; // shadows B_BaseClass.f2 diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/translation/D_AnonymousTesting.java b/enigma/src/test/java/org/quiltmc/enigma/input/translation/D_AnonymousTesting.java similarity index 86% rename from enigma/src/test/java/cuchaz/enigma/inputs/translation/D_AnonymousTesting.java rename to enigma/src/test/java/org/quiltmc/enigma/input/translation/D_AnonymousTesting.java index ce1758e46..35393d33b 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/translation/D_AnonymousTesting.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/translation/D_AnonymousTesting.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.translation; +package org.quiltmc.enigma.input.translation; import java.util.ArrayList; import java.util.List; diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/translation/E_Bridges.java b/enigma/src/test/java/org/quiltmc/enigma/input/translation/E_Bridges.java similarity index 86% rename from enigma/src/test/java/cuchaz/enigma/inputs/translation/E_Bridges.java rename to enigma/src/test/java/org/quiltmc/enigma/input/translation/E_Bridges.java index bf521bf81..60f763e27 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/translation/E_Bridges.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/translation/E_Bridges.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.translation; +package org.quiltmc.enigma.input.translation; import java.util.Iterator; diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/translation/F_ObjectMethods.java b/enigma/src/test/java/org/quiltmc/enigma/input/translation/F_ObjectMethods.java similarity index 85% rename from enigma/src/test/java/cuchaz/enigma/inputs/translation/F_ObjectMethods.java rename to enigma/src/test/java/org/quiltmc/enigma/input/translation/F_ObjectMethods.java index 397e0ca27..0cb130739 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/translation/F_ObjectMethods.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/translation/F_ObjectMethods.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.translation; +package org.quiltmc.enigma.input.translation; @SuppressWarnings("FinalizeCalledExplicitly") public class F_ObjectMethods { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/translation/G_OuterClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/translation/G_OuterClass.java similarity index 86% rename from enigma/src/test/java/cuchaz/enigma/inputs/translation/G_OuterClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/translation/G_OuterClass.java index 4bc9e8641..fc5077a91 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/translation/G_OuterClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/translation/G_OuterClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.translation; +package org.quiltmc.enigma.input.translation; public class G_OuterClass { public class A_InnerClass { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/translation/H_NamelessClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/translation/H_NamelessClass.java similarity index 89% rename from enigma/src/test/java/cuchaz/enigma/inputs/translation/H_NamelessClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/translation/H_NamelessClass.java index 77ecd0a61..25735c834 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/translation/H_NamelessClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/translation/H_NamelessClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.translation; +package org.quiltmc.enigma.input.translation; public class H_NamelessClass { public class A_InnerClass { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/translation/I_Generics.java b/enigma/src/test/java/org/quiltmc/enigma/input/translation/I_Generics.java similarity index 87% rename from enigma/src/test/java/cuchaz/enigma/inputs/translation/I_Generics.java rename to enigma/src/test/java/org/quiltmc/enigma/input/translation/I_Generics.java index 2c9d5a367..b7743143f 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/translation/I_Generics.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/translation/I_Generics.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.translation; +package org.quiltmc.enigma.input.translation; import java.util.List; import java.util.Map; diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/validation/BaseClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/validation/BaseClass.java similarity index 91% rename from enigma/src/test/java/cuchaz/enigma/inputs/validation/BaseClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/validation/BaseClass.java index 312da82e9..bb023211b 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/validation/BaseClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/validation/BaseClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.validation; +package org.quiltmc.enigma.input.validation; // a public class BaseClass extends SuperClass { diff --git a/enigma/src/test/java/cuchaz/enigma/inputs/validation/SuperClass.java b/enigma/src/test/java/org/quiltmc/enigma/input/validation/SuperClass.java similarity index 91% rename from enigma/src/test/java/cuchaz/enigma/inputs/validation/SuperClass.java rename to enigma/src/test/java/org/quiltmc/enigma/input/validation/SuperClass.java index 69b02ccae..2382a9e57 100644 --- a/enigma/src/test/java/cuchaz/enigma/inputs/validation/SuperClass.java +++ b/enigma/src/test/java/org/quiltmc/enigma/input/validation/SuperClass.java @@ -1,4 +1,4 @@ -package cuchaz.enigma.inputs.validation; +package org.quiltmc.enigma.input.validation; // b public class SuperClass { diff --git a/enigma/src/test/java/cuchaz/enigma/translation/mapping/TestComments.java b/enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestComments.java similarity index 52% rename from enigma/src/test/java/cuchaz/enigma/translation/mapping/TestComments.java rename to enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestComments.java index 8f24938bc..40b1ea1ec 100644 --- a/enigma/src/test/java/cuchaz/enigma/translation/mapping/TestComments.java +++ b/enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestComments.java @@ -1,12 +1,12 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; -import cuchaz.enigma.TestUtil; -import cuchaz.enigma.translation.mapping.serde.MappingFileNameFormat; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.serde.enigma.EnigmaMappingsReader; -import cuchaz.enigma.translation.mapping.serde.tinyv2.TinyV2Writer; -import cuchaz.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.TestUtil; +import org.quiltmc.enigma.translation.mapping.serde.MappingFileNameFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.serde.enigma.EnigmaMappingsReader; +import org.quiltmc.enigma.translation.mapping.serde.tinyv2.TinyV2Writer; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; import org.junit.jupiter.api.Test; import java.io.IOException; diff --git a/enigma/src/test/java/cuchaz/enigma/translation/mapping/TestMappingValidator.java b/enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestMappingValidator.java similarity index 52% rename from enigma/src/test/java/cuchaz/enigma/translation/mapping/TestMappingValidator.java rename to enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestMappingValidator.java index a48d66eef..7632e1fb4 100644 --- a/enigma/src/test/java/cuchaz/enigma/translation/mapping/TestMappingValidator.java +++ b/enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestMappingValidator.java @@ -1,23 +1,23 @@ -package cuchaz.enigma.translation.mapping; - -import cuchaz.enigma.Enigma; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.TestUtil; -import cuchaz.enigma.classprovider.ClasspathClassProvider; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.utils.validation.Message; -import cuchaz.enigma.utils.validation.ParameterizedMessage; -import cuchaz.enigma.utils.validation.ValidationContext; +package org.quiltmc.enigma.translation.mapping; + +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.TestUtil; +import org.quiltmc.enigma.classprovider.ClasspathClassProvider; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.util.validation.Message; +import org.quiltmc.enigma.util.validation.ParameterizedMessage; +import org.quiltmc.enigma.util.validation.ValidationContext; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.RepeatedTest; import org.junit.jupiter.api.RepetitionInfo; +import org.quiltmc.enigma.TestEntryFactory; import java.nio.file.Path; -import static cuchaz.enigma.TestEntryFactory.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; @@ -43,34 +43,34 @@ public void beforeEach(RepetitionInfo repetitionInfo) { // repeat with mapped classes if (repetitionInfo.getCurrentRepetition() == 1) { - remapper.putMapping(newVC(), newClass("a"), new EntryMapping("BaseClass")); - remapper.putMapping(newVC(), newClass("b"), new EntryMapping("SuperClass")); + remapper.putMapping(newVC(), TestEntryFactory.newClass("a"), new EntryMapping("BaseClass")); + remapper.putMapping(newVC(), TestEntryFactory.newClass("b"), new EntryMapping("SuperClass")); } } @RepeatedTest(value = 2, name = REPEATED_TEST_NAME) public void shadowPrivateFields() { // static fields - remapper.putMapping(newVC(), newField("b", "a", "Ljava/lang/String;"), new EntryMapping("FIELD_00")); + remapper.putMapping(newVC(), TestEntryFactory.newField("b", "a", "Ljava/lang/String;"), new EntryMapping("FIELD_00")); ValidationContext vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newField("a", "c", "Ljava/lang/String;"), new EntryMapping("FIELD_00")); + remapper.validatePutMapping(vc, TestEntryFactory.newField("a", "c", "Ljava/lang/String;"), new EntryMapping("FIELD_00")); assertMessages(vc, Message.SHADOWED_NAME_CLASS); // final fields - remapper.putMapping(newVC(), newField("b", "a", "I"), new EntryMapping("field01")); + remapper.putMapping(newVC(), TestEntryFactory.newField("b", "a", "I"), new EntryMapping("field01")); vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newField("a", "a", "I"), new EntryMapping("field01")); + remapper.validatePutMapping(vc, TestEntryFactory.newField("a", "a", "I"), new EntryMapping("field01")); assertMessages(vc); // instance fields - remapper.putMapping(newVC(), newField("b", "b", "I"), new EntryMapping("field02")); + remapper.putMapping(newVC(), TestEntryFactory.newField("b", "b", "I"), new EntryMapping("field02")); vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newField("a", "b", "I"), new EntryMapping("field02")); + remapper.validatePutMapping(vc, TestEntryFactory.newField("a", "b", "I"), new EntryMapping("field02")); assertMessages(vc); } @@ -78,18 +78,18 @@ public void shadowPrivateFields() { @RepeatedTest(value = 2, name = REPEATED_TEST_NAME) public void shadowPublicFields() { // static fields - remapper.putMapping(newVC(), newField("b", "b", "Ljava/lang/String;"), new EntryMapping("FIELD_04")); + remapper.putMapping(newVC(), TestEntryFactory.newField("b", "b", "Ljava/lang/String;"), new EntryMapping("FIELD_04")); ValidationContext vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newField("a", "a", "Ljava/lang/String;"), new EntryMapping("FIELD_04")); + remapper.validatePutMapping(vc, TestEntryFactory.newField("a", "a", "Ljava/lang/String;"), new EntryMapping("FIELD_04")); assertMessages(vc, Message.SHADOWED_NAME_CLASS); // default fields - remapper.putMapping(newVC(), newField("b", "b", "Z"), new EntryMapping("field05")); + remapper.putMapping(newVC(), TestEntryFactory.newField("b", "b", "Z"), new EntryMapping("field05")); vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newField("a", "a", "Z"), new EntryMapping("field05")); + remapper.validatePutMapping(vc, TestEntryFactory.newField("a", "a", "Z"), new EntryMapping("field05")); assertMessages(vc); } @@ -97,50 +97,50 @@ public void shadowPublicFields() { @RepeatedTest(value = 2, name = REPEATED_TEST_NAME) public void shadowMethods() { // static methods - remapper.putMapping(newVC(), newMethod("b", "c", "()V"), new EntryMapping("method01")); + remapper.putMapping(newVC(), TestEntryFactory.newMethod("b", "c", "()V"), new EntryMapping("method01")); ValidationContext vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newMethod("a", "a", "()V"), new EntryMapping("method01")); + remapper.validatePutMapping(vc, TestEntryFactory.newMethod("a", "a", "()V"), new EntryMapping("method01")); assertMessages(vc, Message.SHADOWED_NAME_CLASS); // private methods - remapper.putMapping(newVC(), newMethod("b", "a", "()V"), new EntryMapping("method02")); + remapper.putMapping(newVC(), TestEntryFactory.newMethod("b", "a", "()V"), new EntryMapping("method02")); vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newMethod("a", "d", "()V"), new EntryMapping("method02")); + remapper.validatePutMapping(vc, TestEntryFactory.newMethod("a", "d", "()V"), new EntryMapping("method02")); assertMessages(vc); } @RepeatedTest(value = 2, name = REPEATED_TEST_NAME) public void nonUniqueFields() { - remapper.putMapping(newVC(), newField("a", "a", "I"), new EntryMapping("field01")); + remapper.putMapping(newVC(), TestEntryFactory.newField("a", "a", "I"), new EntryMapping("field01")); ValidationContext vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newField("a", "b", "I"), new EntryMapping("field01")); + remapper.validatePutMapping(vc, TestEntryFactory.newField("a", "b", "I"), new EntryMapping("field01")); assertMessages(vc, Message.NON_UNIQUE_NAME_CLASS); - remapper.putMapping(newVC(), newField("a", "c", "Ljava/lang/String;"), new EntryMapping("FIELD_02")); + remapper.putMapping(newVC(), TestEntryFactory.newField("a", "c", "Ljava/lang/String;"), new EntryMapping("FIELD_02")); vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newField("a", "a", "Ljava/lang/String;"), new EntryMapping("FIELD_02")); + remapper.validatePutMapping(vc, TestEntryFactory.newField("a", "a", "Ljava/lang/String;"), new EntryMapping("FIELD_02")); assertMessages(vc, Message.NON_UNIQUE_NAME_CLASS); } @RepeatedTest(value = 2, name = REPEATED_TEST_NAME) public void nonUniqueMethods() { - remapper.putMapping(newVC(), newMethod("a", "a", "()V"), new EntryMapping("method01")); + remapper.putMapping(newVC(), TestEntryFactory.newMethod("a", "a", "()V"), new EntryMapping("method01")); ValidationContext vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newMethod("a", "b", "()V"), new EntryMapping("method01")); + remapper.validatePutMapping(vc, TestEntryFactory.newMethod("a", "b", "()V"), new EntryMapping("method01")); assertMessages(vc, Message.NON_UNIQUE_NAME_CLASS); vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newMethod("a", "d", "()V"), new EntryMapping("method01")); + remapper.validatePutMapping(vc, TestEntryFactory.newMethod("a", "d", "()V"), new EntryMapping("method01")); assertMessages(vc, Message.NON_UNIQUE_NAME_CLASS); } @@ -148,26 +148,26 @@ public void nonUniqueMethods() { @RepeatedTest(value = 2, name = REPEATED_TEST_NAME) public void conflictingMethods() { // "overriding" w/different return descriptor - remapper.putMapping(newVC(), newMethod("b", "a", "()Z"), new EntryMapping("method01")); + remapper.putMapping(newVC(), TestEntryFactory.newMethod("b", "a", "()Z"), new EntryMapping("method01")); ValidationContext vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newMethod("a", "b", "()V"), new EntryMapping("method01")); + remapper.validatePutMapping(vc, TestEntryFactory.newMethod("a", "b", "()V"), new EntryMapping("method01")); assertMessages(vc, Message.NON_UNIQUE_NAME_CLASS); // "overriding" a static method - remapper.putMapping(newVC(), newMethod("b", "c", "()V"), new EntryMapping("method02")); + remapper.putMapping(newVC(), TestEntryFactory.newMethod("b", "c", "()V"), new EntryMapping("method02")); vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newMethod("a", "b", "()V"), new EntryMapping("method02")); + remapper.validatePutMapping(vc, TestEntryFactory.newMethod("a", "b", "()V"), new EntryMapping("method02")); assertMessages(vc, Message.NON_UNIQUE_NAME_CLASS); // "overriding" when the original methods were not related - remapper.putMapping(newVC(), newMethod("b", "b", "()I"), new EntryMapping("method03")); + remapper.putMapping(newVC(), TestEntryFactory.newMethod("b", "b", "()I"), new EntryMapping("method03")); vc = new ValidationContext(notifier()); - remapper.validatePutMapping(vc, newMethod("a", "a", "()I"), new EntryMapping("method03")); + remapper.validatePutMapping(vc, TestEntryFactory.newMethod("a", "a", "()I"), new EntryMapping("method03")); assertMessages(vc, Message.NON_UNIQUE_NAME_CLASS); } diff --git a/enigma/src/test/java/cuchaz/enigma/translation/mapping/TestReadWriteCycle.java b/enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestReadWriteCycle.java similarity index 87% rename from enigma/src/test/java/cuchaz/enigma/translation/mapping/TestReadWriteCycle.java rename to enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestReadWriteCycle.java index 4c205b885..f31d48a08 100644 --- a/enigma/src/test/java/cuchaz/enigma/translation/mapping/TestReadWriteCycle.java +++ b/enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestReadWriteCycle.java @@ -1,17 +1,17 @@ -package cuchaz.enigma.translation.mapping; - -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.serde.MappingFileNameFormat; -import cuchaz.enigma.translation.mapping.serde.MappingFormat; -import cuchaz.enigma.translation.mapping.serde.MappingParseException; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.tree.EntryTree; -import cuchaz.enigma.translation.mapping.tree.HashEntryTree; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.Entry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; -import cuchaz.enigma.utils.Pair; +package org.quiltmc.enigma.translation.mapping; + +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.serde.MappingFileNameFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingParseException; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.translation.mapping.tree.HashEntryTree; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.Entry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; +import org.quiltmc.enigma.util.Pair; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/enigma/src/test/java/cuchaz/enigma/translation/mapping/TestTinyV2InnerClasses.java b/enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestTinyV2InnerClasses.java similarity index 52% rename from enigma/src/test/java/cuchaz/enigma/translation/mapping/TestTinyV2InnerClasses.java rename to enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestTinyV2InnerClasses.java index fa84e8c7d..6cd8e007d 100644 --- a/enigma/src/test/java/cuchaz/enigma/translation/mapping/TestTinyV2InnerClasses.java +++ b/enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestTinyV2InnerClasses.java @@ -1,17 +1,17 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; -import cuchaz.enigma.Enigma; -import cuchaz.enigma.EnigmaProject; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.TestUtil; -import cuchaz.enigma.classprovider.ClasspathClassProvider; -import cuchaz.enigma.translation.mapping.serde.enigma.EnigmaMappingsReader; +import org.quiltmc.enigma.Enigma; +import org.quiltmc.enigma.EnigmaProject; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.TestUtil; +import org.quiltmc.enigma.classprovider.ClasspathClassProvider; +import org.quiltmc.enigma.translation.mapping.serde.enigma.EnigmaMappingsReader; import org.junit.jupiter.api.Test; import java.nio.file.Path; public final class TestTinyV2InnerClasses { - public static final Path JAR = TestUtil.obfJar("innerClasses"); + public static final Path JAR = TestUtil.obfJar("inner_classes"); public static final Path MAPPINGS = TestUtil.getResource("/tinyV2InnerClasses/"); @Test diff --git a/enigma/src/test/java/cuchaz/enigma/translation/mapping/TestV2Main.java b/enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestV2Main.java similarity index 51% rename from enigma/src/test/java/cuchaz/enigma/translation/mapping/TestV2Main.java rename to enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestV2Main.java index 8fffd6ba8..c81528e5e 100644 --- a/enigma/src/test/java/cuchaz/enigma/translation/mapping/TestV2Main.java +++ b/enigma/src/test/java/org/quiltmc/enigma/translation/mapping/TestV2Main.java @@ -1,11 +1,11 @@ -package cuchaz.enigma.translation.mapping; +package org.quiltmc.enigma.translation.mapping; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.serde.MappingFileNameFormat; -import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; -import cuchaz.enigma.translation.mapping.serde.enigma.EnigmaMappingsReader; -import cuchaz.enigma.translation.mapping.serde.tinyv2.TinyV2Writer; -import cuchaz.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.serde.MappingFileNameFormat; +import org.quiltmc.enigma.translation.mapping.serde.MappingSaveParameters; +import org.quiltmc.enigma.translation.mapping.serde.enigma.EnigmaMappingsReader; +import org.quiltmc.enigma.translation.mapping.serde.tinyv2.TinyV2Writer; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; import java.nio.file.Path; import java.nio.file.Paths; diff --git a/enigma/src/test/java/cuchaz/enigma/translation/mapping/serde/recaf/TestRecaf.java b/enigma/src/test/java/org/quiltmc/enigma/translation/mapping/serde/recaf/TestRecaf.java similarity index 83% rename from enigma/src/test/java/cuchaz/enigma/translation/mapping/serde/recaf/TestRecaf.java rename to enigma/src/test/java/org/quiltmc/enigma/translation/mapping/serde/recaf/TestRecaf.java index 62952beea..bedc3b545 100644 --- a/enigma/src/test/java/cuchaz/enigma/translation/mapping/serde/recaf/TestRecaf.java +++ b/enigma/src/test/java/org/quiltmc/enigma/translation/mapping/serde/recaf/TestRecaf.java @@ -1,9 +1,9 @@ -package cuchaz.enigma.translation.mapping.serde.recaf; +package org.quiltmc.enigma.translation.mapping.serde.recaf; import com.google.common.jimfs.Jimfs; -import cuchaz.enigma.ProgressListener; -import cuchaz.enigma.translation.mapping.EntryMapping; -import cuchaz.enigma.translation.mapping.tree.EntryTree; +import org.quiltmc.enigma.ProgressListener; +import org.quiltmc.enigma.translation.mapping.EntryMapping; +import org.quiltmc.enigma.translation.mapping.tree.EntryTree; import org.junit.jupiter.api.Test; import java.io.InputStream; diff --git a/enigma/src/test/resources/proguard-bridge-test.conf b/enigma/src/test/resources/proguard-bridge-test.conf index e21038666..834a3e7de 100644 --- a/enigma/src/test/resources/proguard-bridge-test.conf +++ b/enigma/src/test/resources/proguard-bridge-test.conf @@ -4,4 +4,4 @@ -dontshrink -keepparameternames -keepattributes --keep class cuchaz.enigma.inputs.Keep +-keep class org.quiltmc.enigma.input.Keep diff --git a/enigma/src/test/resources/proguard-build.conf b/enigma/src/test/resources/proguard-build.conf index 691d8a294..e3112c572 100644 --- a/enigma/src/test/resources/proguard-build.conf +++ b/enigma/src/test/resources/proguard-build.conf @@ -1,6 +1,5 @@ -dontoptimize -dontobfuscate -dontwarn --keep class cuchaz.enigma.Main { static void main(java.lang.String[]); } --keep class cuchaz.enigma.command.Main { static void main(java.lang.String[]); } --keep class de.sciss.syntaxpane.** { *; } +-keep class org.quiltmc.enigma.Main { static void main(java.lang.String[]); } +-keep class org.quiltmc.enigma.command.Main { static void main(java.lang.String[]); } diff --git a/enigma/src/test/resources/proguard-enums-test.conf b/enigma/src/test/resources/proguard-enums-test.conf index 5cc8d7713..94c1ffefe 100644 --- a/enigma/src/test/resources/proguard-enums-test.conf +++ b/enigma/src/test/resources/proguard-enums-test.conf @@ -5,8 +5,8 @@ -dontshrink -keepparameternames -keepattributes --keep class cuchaz.enigma.inputs.Keep --keepclassmembers enum cuchaz.enigma.inputs.enums.Color { +-keep class org.quiltmc.enigma.input.Keep +-keepclassmembers enum org.quiltmc.enigma.input.enums.Color { public static **[] values(); public static ** valueOf(java.lang.String); -} \ No newline at end of file +} diff --git a/enigma/src/test/resources/proguard-test.conf b/enigma/src/test/resources/proguard-test.conf index 9411d2691..5186c9a23 100644 --- a/enigma/src/test/resources/proguard-test.conf +++ b/enigma/src/test/resources/proguard-test.conf @@ -5,4 +5,4 @@ -dontshrink -keepparameternames -keepattributes --keep class cuchaz.enigma.inputs.Keep +-keep class org.quiltmc.enigma.input.Keep diff --git a/enigma/src/test/resources/tinyV2InnerClasses/c.mapping b/enigma/src/test/resources/tinyV2InnerClasses/org/quiltmc/c.mapping similarity index 100% rename from enigma/src/test/resources/tinyV2InnerClasses/c.mapping rename to enigma/src/test/resources/tinyV2InnerClasses/org/quiltmc/c.mapping diff --git a/enigma/src/test/resources/tinyV2InnerClasses/cuchaz/enigma/Dad.mapping b/enigma/src/test/resources/tinyV2InnerClasses/org/quiltmc/enigma/Dad.mapping similarity index 65% rename from enigma/src/test/resources/tinyV2InnerClasses/cuchaz/enigma/Dad.mapping rename to enigma/src/test/resources/tinyV2InnerClasses/org/quiltmc/enigma/Dad.mapping index 8d43ba909..b4fdbc5b9 100644 --- a/enigma/src/test/resources/tinyV2InnerClasses/cuchaz/enigma/Dad.mapping +++ b/enigma/src/test/resources/tinyV2InnerClasses/org/quiltmc/enigma/Dad.mapping @@ -1,4 +1,4 @@ -CLASS f cuchaz/enigma/Dad +CLASS f org/quiltmc/enigma/Dad CLASS a One CLASS a Two CLASS a diff --git a/enigma/src/testFixtures/java/cuchaz/enigma/TestEntryFactory.java b/enigma/src/testFixtures/java/org/quiltmc/enigma/TestEntryFactory.java similarity index 76% rename from enigma/src/testFixtures/java/cuchaz/enigma/TestEntryFactory.java rename to enigma/src/testFixtures/java/org/quiltmc/enigma/TestEntryFactory.java index 5a5d7b99b..81427c9b1 100644 --- a/enigma/src/testFixtures/java/cuchaz/enigma/TestEntryFactory.java +++ b/enigma/src/testFixtures/java/org/quiltmc/enigma/TestEntryFactory.java @@ -1,11 +1,11 @@ -package cuchaz.enigma; - -import cuchaz.enigma.analysis.EntryReference; -import cuchaz.enigma.translation.representation.MethodDescriptor; -import cuchaz.enigma.translation.representation.TypeDescriptor; -import cuchaz.enigma.translation.representation.entry.ClassEntry; -import cuchaz.enigma.translation.representation.entry.FieldEntry; -import cuchaz.enigma.translation.representation.entry.MethodEntry; +package org.quiltmc.enigma; + +import org.quiltmc.enigma.analysis.EntryReference; +import org.quiltmc.enigma.translation.representation.MethodDescriptor; +import org.quiltmc.enigma.translation.representation.TypeDescriptor; +import org.quiltmc.enigma.translation.representation.entry.ClassEntry; +import org.quiltmc.enigma.translation.representation.entry.FieldEntry; +import org.quiltmc.enigma.translation.representation.entry.MethodEntry; public class TestEntryFactory { public static ClassEntry newClass(String name) { diff --git a/enigma/src/testFixtures/java/cuchaz/enigma/TestUtil.java b/enigma/src/testFixtures/java/org/quiltmc/enigma/TestUtil.java similarity index 62% rename from enigma/src/testFixtures/java/cuchaz/enigma/TestUtil.java rename to enigma/src/testFixtures/java/org/quiltmc/enigma/TestUtil.java index d4a361d76..bbcc4415a 100644 --- a/enigma/src/testFixtures/java/cuchaz/enigma/TestUtil.java +++ b/enigma/src/testFixtures/java/org/quiltmc/enigma/TestUtil.java @@ -1,4 +1,4 @@ -package cuchaz.enigma; +package org.quiltmc.enigma; import java.net.URISyntaxException; import java.nio.file.Path; @@ -8,11 +8,11 @@ private TestUtil() { } public static Path obfJar(String name) { - return Path.of("../enigma/build/test-obf/%s.jar".formatted(name)).toAbsolutePath(); + return Path.of("").toAbsolutePath().getParent().resolve("enigma/build/test-obf/%s.jar".formatted(name)); } public static Path deobfJar(String name) { - return Path.of("../enigma/build/test-deobf/%s.jar".formatted(name)).toAbsolutePath(); + return Path.of("").toAbsolutePath().getParent().resolve("enigma/build/test-deobf/%s.jar".formatted(name)); } public static Path getResource(String name) {