Better Compiling
This commit is contained in:
parent
122aa02d3d
commit
52a3c2bfd0
2 changed files with 5 additions and 5 deletions
|
@ -424,7 +424,7 @@ public class BytecodeViewer
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return compile(true);
|
return compile(true, false);
|
||||||
} catch (NullPointerException ignored) {
|
} catch (NullPointerException ignored) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -436,7 +436,7 @@ public class BytecodeViewer
|
||||||
* @param message if it should send a message saying it's compiled sucessfully.
|
* @param message if it should send a message saying it's compiled sucessfully.
|
||||||
* @return true if no errors, false if it failed to compile.
|
* @return true if no errors, false if it failed to compile.
|
||||||
*/
|
*/
|
||||||
public static boolean compile(boolean message) {
|
public static boolean compile(boolean message, boolean successAlert) {
|
||||||
BytecodeViewer.viewer.updateBusyStatus(true);
|
BytecodeViewer.viewer.updateBusyStatus(true);
|
||||||
boolean noErrors = true;
|
boolean noErrors = true;
|
||||||
boolean actuallyTried = false;
|
boolean actuallyTried = false;
|
||||||
|
@ -467,7 +467,7 @@ public class BytecodeViewer
|
||||||
{
|
{
|
||||||
if (actuallyTried)
|
if (actuallyTried)
|
||||||
{
|
{
|
||||||
if(noErrors)
|
if(noErrors && successAlert)
|
||||||
BytecodeViewer.showMessage("Compiled Successfully.");
|
BytecodeViewer.showMessage("Compiled Successfully.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -616,7 +616,7 @@ public class BytecodeViewer
|
||||||
BytecodeViewer.resetWorkSpace(true);
|
BytecodeViewer.resetWorkSpace(true);
|
||||||
} else if ((e.getKeyCode() == KeyEvent.VK_T) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
|
} else if ((e.getKeyCode() == KeyEvent.VK_T) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
|
||||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||||
Thread t = new Thread(() -> BytecodeViewer.compile(true), "Compile");
|
Thread t = new Thread(() -> BytecodeViewer.compile(true, false), "Compile");
|
||||||
t.start();
|
t.start();
|
||||||
} else if ((e.getKeyCode() == KeyEvent.VK_R) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
|
} else if ((e.getKeyCode() == KeyEvent.VK_R) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
|
||||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||||
|
|
|
@ -785,7 +785,7 @@ public class MainViewerGUI extends JFrame
|
||||||
|
|
||||||
public void compileOnNewThread()
|
public void compileOnNewThread()
|
||||||
{
|
{
|
||||||
Thread t = new Thread(() -> BytecodeViewer.compile(true), "Compile");
|
Thread t = new Thread(() -> BytecodeViewer.compile(true, true), "Compile");
|
||||||
t.start();
|
t.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue