General code quality changes
This commit is contained in:
parent
8e80a0b439
commit
4ccfb6021f
3 changed files with 4 additions and 8 deletions
|
@ -64,7 +64,7 @@ public class DiskReader {
|
||||||
try (FileReader fr = new FileReader(fileName);
|
try (FileReader fr = new FileReader(fileName);
|
||||||
BufferedReader reader = new BufferedReader(fr)) {
|
BufferedReader reader = new BufferedReader(fr)) {
|
||||||
for (String add = reader.readLine(); add != null; add = reader.readLine()) {
|
for (String add = reader.readLine(); add != null; add = reader.readLine()) {
|
||||||
s.append(EncodeUtils.unicodeToString(add)).append(System.getProperty("line.separator"));
|
s.append(EncodeUtils.unicodeToString(add)).append(System.lineSeparator());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class RunOptions extends JFrame
|
||||||
getContentPane().add(mainMethodFQN);
|
getContentPane().add(mainMethodFQN);
|
||||||
mainMethodFQN.setColumns(10);
|
mainMethodFQN.setColumns(10);
|
||||||
|
|
||||||
JLabel lblNewLabel = new JLabel("Debug Classes (Seperate with , ):");
|
JLabel lblNewLabel = new JLabel("Debug Classes (Separated with , ):");
|
||||||
lblNewLabel.setBounds(10, 89, 228, 14);
|
lblNewLabel.setBounds(10, 89, 228, 14);
|
||||||
getContentPane().add(lblNewLabel);
|
getContentPane().add(lblNewLabel);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package the.bytecode.club.bytecodeviewer.plugin.strategies;
|
package the.bytecode.club.bytecodeviewer.plugin.strategies;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import me.konloch.kontainer.io.DiskReader;
|
|
||||||
import org.codehaus.janino.SimpleCompiler;
|
import org.codehaus.janino.SimpleCompiler;
|
||||||
import the.bytecode.club.bytecodeviewer.api.Plugin;
|
import the.bytecode.club.bytecodeviewer.api.Plugin;
|
||||||
import the.bytecode.club.bytecodeviewer.plugin.PluginLaunchStrategy;
|
import the.bytecode.club.bytecodeviewer.plugin.PluginLaunchStrategy;
|
||||||
|
@ -35,13 +34,10 @@ public class JavaPluginLaunchStrategy implements PluginLaunchStrategy
|
||||||
@Override
|
@Override
|
||||||
public Plugin run(File file) throws Throwable
|
public Plugin run(File file) throws Throwable
|
||||||
{
|
{
|
||||||
SimpleCompiler compiler = new SimpleCompiler();
|
SimpleCompiler compiler = new SimpleCompiler(file.getCanonicalPath());
|
||||||
|
|
||||||
//compile the Java source
|
|
||||||
compiler.cook(DiskReader.loadAsString(file.getAbsolutePath()));
|
|
||||||
|
|
||||||
//debug
|
//debug
|
||||||
System.out.println(file.getName().substring(0, file.getName().length() - (".java".length())));
|
//System.out.println(file.getName().substring(0, file.getName().length() - (".java".length())));
|
||||||
|
|
||||||
//get the class object from the compiler classloader
|
//get the class object from the compiler classloader
|
||||||
Class<?> clazz = Class.forName(
|
Class<?> clazz = Class.forName(
|
||||||
|
|
Loading…
Reference in a new issue