-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support additional tiny v1 layouts, tiny v2 via mapping-io
- Loading branch information
Showing
14 changed files
with
274 additions
and
145 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
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
18 changes: 18 additions & 0 deletions
18
...e/src/main/java/software/coley/recaf/services/mapping/format/InvalidMappingException.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,18 @@ | ||
package software.coley.recaf.services.mapping.format; | ||
|
||
import jakarta.annotation.Nonnull; | ||
|
||
/** | ||
* Wrapper to encompass any error encountered during mapping format reading / writing. | ||
* | ||
* @author Matt Coley | ||
*/ | ||
public class InvalidMappingException extends Exception { | ||
/** | ||
* @param cause | ||
* Cause for mapping parse/write failure. | ||
*/ | ||
public InvalidMappingException(@Nonnull Throwable cause) { | ||
super(cause); | ||
} | ||
} |
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
29 changes: 29 additions & 0 deletions
29
recaf-core/src/main/java/software/coley/recaf/services/mapping/format/MappingTreeReader.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,29 @@ | ||
package software.coley.recaf.services.mapping.format; | ||
|
||
import jakarta.annotation.Nonnull; | ||
import net.fabricmc.mappingio.MappingVisitor; | ||
import net.fabricmc.mappingio.format.tiny.Tiny1FileReader; | ||
|
||
import java.io.IOException; | ||
import java.io.Reader; | ||
|
||
/** | ||
* Outlines the read process from a given reader into the given visitor. | ||
* Should point to a file-reader method from mapping-io. | ||
* For instance: {@link Tiny1FileReader#read(Reader, MappingVisitor)}. | ||
* | ||
* @author Matt Coley | ||
* @see MappingFileFormat#parse(String, MappingTreeReader) | ||
*/ | ||
public interface MappingTreeReader { | ||
/** | ||
* @param reader | ||
* Reader containing the mapping file text. | ||
* @param visitor | ||
* Mapping output visitor. | ||
* | ||
* @throws IOException | ||
* When any mapping parse errors occur. | ||
*/ | ||
void read(@Nonnull Reader reader, @Nonnull MappingVisitor visitor) throws IOException; | ||
} |
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
Oops, something went wrong.