-
-
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.
- Loading branch information
1 parent
8c145d6
commit 6e0182f
Showing
24 changed files
with
229 additions
and
55 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
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,28 @@ | ||
package net.neoforged.jst.api; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.io.PrintStream; | ||
import java.util.Locale; | ||
|
||
public class Logger { | ||
private final PrintStream debugOut; | ||
private final PrintStream errorOut; | ||
|
||
public Logger(@Nullable PrintStream debugOut, @Nullable PrintStream errorOut) { | ||
this.debugOut = debugOut; | ||
this.errorOut = errorOut; | ||
} | ||
|
||
public void error(String message, Object... args) { | ||
if (errorOut != null) { | ||
errorOut.printf(Locale.ROOT, message + "\n", args); | ||
} | ||
} | ||
|
||
public void debug(String message, Object... args) { | ||
if (debugOut != null) { | ||
debugOut.printf(Locale.ROOT, message + "\n", args); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package net.neoforged.jst.api; | ||
|
||
public record TransformContext(IntelliJEnvironment environment, FileSource source, FileSink sink) { | ||
public record TransformContext(IntelliJEnvironment environment, FileSource source, FileSink sink, Logger logger) { | ||
} |
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.