-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from mappings-io over to srgutils (#2)
- Loading branch information
Showing
11 changed files
with
83 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
parchment/src/main/java/net/neoforged/jst/parchment/namesanddocs/mappingio/TreeData.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
.../src/main/java/net/neoforged/jst/parchment/namesanddocs/srgutils/MappingFileDatabase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package net.neoforged.jst.parchment.namesanddocs.srgutils; | ||
|
||
import net.neoforged.jst.parchment.namesanddocs.NamesAndDocsDatabase; | ||
import net.neoforged.jst.parchment.namesanddocs.NamesAndDocsForClass; | ||
import net.neoforged.srgutils.IMappingFile; | ||
import net.neoforged.srgutils.INamedMappingFile; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Path; | ||
|
||
public class MappingFileDatabase implements NamesAndDocsDatabase { | ||
private final IMappingFile tree; | ||
|
||
public MappingFileDatabase(INamedMappingFile tree) { | ||
this.tree = tree.getMap("right", "right"); | ||
} | ||
|
||
public static MappingFileDatabase load(Path path) throws IOException { | ||
var mappingFile = INamedMappingFile.load(path.toFile()); | ||
return new MappingFileDatabase(mappingFile); | ||
} | ||
|
||
@Override | ||
public NamesAndDocsForClass getClass(String className) { | ||
var classData = tree.getClass(className); | ||
return classData != null ? new MappingFileClassData(classData) : null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package pkg; | ||
|
||
import java.util.*; | ||
|
||
public class TestClass { | ||
public void m(String p_254545_, List<String> p_254546_) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
tsrg2 left right | ||
obfuscated_c pkg/TestClass | ||
obfuscated_m (Ljava/lang/String;Ljava/util/List;)V m | ||
1 o p_254545_ | ||
2 o p_254546_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package pkg; | ||
|
||
import java.util.*; | ||
|
||
public class TestClass { | ||
public void m(String a1, List<String> a2) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters