Compare commits
No commits in common. "c784a8b2860eb081eca783c0c8e5dcf13d3d7067" and "a42efaae800b57679719c5a984b65de968347e41" have entirely different histories.
c784a8b286
...
a42efaae80
|
@ -4,7 +4,6 @@ import dev.frogmc.frogloader.impl.gui.component.DependencyErrorEntry;
|
||||||
import dev.frogmc.frogloader.impl.mod.ModDependencyResolver;
|
import dev.frogmc.frogloader.impl.mod.ModDependencyResolver;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public class BreakingDepPage extends JScrollPane {
|
public class BreakingDepPage extends JScrollPane {
|
||||||
|
@ -48,7 +47,6 @@ public class BreakingDepPage extends JScrollPane {
|
||||||
list.add(result);
|
list.add(result);
|
||||||
});
|
});
|
||||||
setViewportView(list);
|
setViewportView(list);
|
||||||
SwingUtilities.invokeLater(() -> getViewport().setViewPosition(new Point()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package dev.frogmc.frogloader.impl.gui.page;
|
package dev.frogmc.frogloader.impl.gui.page;
|
||||||
|
|
||||||
|
import dev.frogmc.frogloader.impl.util.PlatformUtil;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
|
@ -9,24 +10,18 @@ import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
public class ReportPage extends JScrollPane {
|
public class ReportPage extends JTextPane {
|
||||||
|
|
||||||
public ReportPage(Path reportPath) {
|
public ReportPage(Path reportPath) {
|
||||||
getHorizontalScrollBar().setUnitIncrement(16);
|
setEditable(false);
|
||||||
getVerticalScrollBar().setUnitIncrement(16);
|
|
||||||
|
|
||||||
JTextPane text = new JTextPane();
|
|
||||||
text.setEditable(false);
|
|
||||||
try {
|
try {
|
||||||
text.setText(Files.readString(reportPath, StandardCharsets.UTF_8));
|
setText(Files.readString(reportPath, StandardCharsets.UTF_8));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
StringWriter writer = new StringWriter();
|
StringWriter writer = new StringWriter();
|
||||||
PrintWriter printer = new PrintWriter(writer);
|
PrintWriter printer = new PrintWriter(writer);
|
||||||
printer.printf("Could not load contents of %s:%n", reportPath);
|
printer.printf("Could not load contents of %s:%n", reportPath);
|
||||||
e.printStackTrace(printer);
|
e.printStackTrace(printer);
|
||||||
}
|
}
|
||||||
setViewportView(text);
|
|
||||||
SwingUtilities.invokeLater(() -> getViewport().setViewPosition(new Point(0, 0)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
package dev.frogmc.frogloader.impl.gui.page;
|
package dev.frogmc.frogloader.impl.gui.page;
|
||||||
|
|
||||||
|
import dev.frogmc.frogloader.impl.FrogLoaderImpl;
|
||||||
import dev.frogmc.frogloader.impl.gui.component.DependencyErrorEntry;
|
import dev.frogmc.frogloader.impl.gui.component.DependencyErrorEntry;
|
||||||
import dev.frogmc.frogloader.impl.mod.ModDependencyResolver;
|
import dev.frogmc.frogloader.impl.mod.ModDependencyResolver;
|
||||||
|
import dev.frogmc.frogloader.impl.mod.ModUtil;
|
||||||
import dev.frogmc.frogloader.impl.util.PlatformUtil;
|
import dev.frogmc.frogloader.impl.util.PlatformUtil;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
@ -72,7 +73,6 @@ public class UnfulfilledDepPage extends JScrollPane {
|
||||||
});
|
});
|
||||||
|
|
||||||
setViewportView(list);
|
setViewportView(list);
|
||||||
SwingUtilities.invokeLater(() -> getViewport().setViewPosition(new Point()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,20 +91,6 @@ public class AccessWidener {
|
||||||
}
|
}
|
||||||
return super.visitMethod(access, name, descriptor, signature, exceptions);
|
return super.visitMethod(access, name, descriptor, signature, exceptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void visitInnerClass(String name, String outerName, String innerName, int access) {
|
|
||||||
Entry e = classMap.get(name);
|
|
||||||
if (e != null) {
|
|
||||||
access &= ~(Opcodes.ACC_PRIVATE | Opcodes.ACC_PROTECTED | Opcodes.ACC_PUBLIC);
|
|
||||||
access |= e.type.access;
|
|
||||||
}
|
|
||||||
if (fields.containsKey(name) || methods.containsKey(name) || mutations.containsKey(name)) {
|
|
||||||
access &= ~(Opcodes.ACC_PRIVATE | Opcodes.ACC_PROTECTED | Opcodes.ACC_PUBLIC);
|
|
||||||
access |= Opcodes.ACC_PUBLIC;
|
|
||||||
}
|
|
||||||
super.visitInnerClass(name, outerName, innerName, access);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
reader.accept(mapper, 0);
|
reader.accept(mapper, 0);
|
||||||
|
@ -153,7 +139,7 @@ public class AccessWidener {
|
||||||
public record Entry(AccessType type, String targetType, String className, String name, String descriptor) {
|
public record Entry(AccessType type, String targetType, String className, String name, String descriptor) {
|
||||||
|
|
||||||
public Entry(String[] line) {
|
public Entry(String[] line) {
|
||||||
this(AccessType.of(line[0]), line[1], line[2], line.length > 3 ? line[3] : null, line.length > 4 ? line[4] : null);
|
this(AccessType.of(line[0]), line[1], line[2], line[3], line[4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAccessGreaterThan(Entry other) {
|
public boolean isAccessGreaterThan(Entry other) {
|
||||||
|
|
Loading…
Reference in a new issue