Added Thread Titles
This commit is contained in:
parent
373fc38ad2
commit
007955b2ba
14 changed files with 37 additions and 34 deletions
|
@ -121,7 +121,7 @@ public class BytecodeViewer
|
|||
/**
|
||||
* The version checker thread
|
||||
*/
|
||||
private static final Thread versionChecker = new Thread(new VersionChecker());
|
||||
private static final Thread versionChecker = new Thread(new VersionChecker(), "Version Checker");
|
||||
|
||||
/**
|
||||
* Pings back to bytecodeviewer.com to be added into the total running statistics
|
||||
|
@ -132,7 +132,7 @@ public class BytecodeViewer
|
|||
} catch (Exception e) {
|
||||
Configuration.pingback = false;
|
||||
}
|
||||
});
|
||||
}, "Pingback");
|
||||
|
||||
/**
|
||||
* Downloads & installs the krakatau & enjarify zips
|
||||
|
@ -152,12 +152,12 @@ public class BytecodeViewer
|
|||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
}, "Install Fat-Jar");
|
||||
|
||||
/**
|
||||
* Used to check incase booting failed for some reason, this kicks in as a fail safe
|
||||
*/
|
||||
private static final Thread bootCheck = new Thread(new BootCheck());
|
||||
private static final Thread bootCheck = new Thread(new BootCheck(), "Boot Check");
|
||||
|
||||
/**
|
||||
* Main startup
|
||||
|
@ -221,7 +221,7 @@ public class BytecodeViewer
|
|||
proc.destroy();
|
||||
SettingsSerializer.saveSettings();
|
||||
cleanup();
|
||||
}));
|
||||
}, "Shutdown Hook"));
|
||||
|
||||
viewer.calledAfterLoad();
|
||||
Settings.resetRecentFilesMenu();
|
||||
|
@ -533,7 +533,7 @@ public class BytecodeViewer
|
|||
|
||||
BytecodeViewer.viewer.updateBusyStatus(true);
|
||||
Configuration.needsReDump = true;
|
||||
Thread t = new Thread(new ImportResource(files));
|
||||
Thread t = new Thread(new ImportResource(files), "Import Resource");
|
||||
t.start();
|
||||
}
|
||||
|
||||
|
@ -594,7 +594,7 @@ public class BytecodeViewer
|
|||
*/
|
||||
public static void cleanupAsync()
|
||||
{
|
||||
Thread cleanupThread = new Thread(BytecodeViewer::cleanup);
|
||||
Thread cleanupThread = new Thread(BytecodeViewer::cleanup, "Cleanup");
|
||||
cleanupThread.start();
|
||||
}
|
||||
|
||||
|
@ -656,7 +656,7 @@ public class BytecodeViewer
|
|||
BytecodeViewer.resetWorkSpace(true);
|
||||
} else if ((e.getKeyCode() == KeyEvent.VK_T) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
|
||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||
Thread t = new Thread(() -> BytecodeViewer.compile(true));
|
||||
Thread t = new Thread(() -> BytecodeViewer.compile(true), "Compile");
|
||||
t.start();
|
||||
} else if ((e.getKeyCode() == KeyEvent.VK_R) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
|
||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||
|
@ -673,7 +673,8 @@ public class BytecodeViewer
|
|||
return;
|
||||
}
|
||||
|
||||
Thread t = new Thread(() -> {
|
||||
Thread resourceExport = new Thread(() ->
|
||||
{
|
||||
if (viewer.compileOnSave.isSelected() && !BytecodeViewer.compile(false))
|
||||
return;
|
||||
|
||||
|
@ -705,16 +706,18 @@ public class BytecodeViewer
|
|||
final File file2 = file;
|
||||
|
||||
BytecodeViewer.viewer.updateBusyStatus(true);
|
||||
Thread t1 = new Thread(() -> {
|
||||
Thread jarExport = new Thread(() -> {
|
||||
JarUtils.saveAsJar(BytecodeViewer.getLoadedClasses(),
|
||||
file2.getAbsolutePath());
|
||||
BytecodeViewer.viewer.updateBusyStatus(false);
|
||||
});
|
||||
t1.start();
|
||||
}, "Jar Export");
|
||||
jarExport.start();
|
||||
}
|
||||
});
|
||||
t.start();
|
||||
} else if ((e.getKeyCode() == KeyEvent.VK_W) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
|
||||
}, "Resource Export");
|
||||
resourceExport.start();
|
||||
}
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_W) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
||||
{
|
||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||
if (viewer.workPane.getCurrentViewer() != null)
|
||||
viewer.workPane.tabs.remove(viewer.workPane.getCurrentViewer());
|
||||
|
|
|
@ -42,7 +42,7 @@ public class SettingsSerializer
|
|||
|
||||
public static void saveSettingsAsync()
|
||||
{
|
||||
Thread saveThread = new Thread(()-> saveSettings());
|
||||
Thread saveThread = new Thread(SettingsSerializer::saveSettings, "Save Settings");
|
||||
saveThread.start();
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ public class JavaCompiler extends InternalCompiler
|
|||
System.out.println("Force killing javac process, assuming it's gotten stuck");
|
||||
process.destroyForcibly().destroy();
|
||||
}
|
||||
});
|
||||
}, "Javac Fail-Safe");
|
||||
failSafe.start();
|
||||
|
||||
int exitValue = process.waitFor();
|
||||
|
|
|
@ -791,7 +791,7 @@ public class MainViewerGUI extends JFrame
|
|||
|
||||
public void compileOnNewThread()
|
||||
{
|
||||
Thread t = new Thread(() -> BytecodeViewer.compile(true));
|
||||
Thread t = new Thread(() -> BytecodeViewer.compile(true), "Compile");
|
||||
t.start();
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public class ExportJar extends JFrame
|
|||
{
|
||||
JarUtils.saveAsJar(BytecodeViewer.getLoadedClasses(), jarPath, manifest.getText());
|
||||
BytecodeViewer.viewer.updateBusyStatus(false);
|
||||
});
|
||||
}, "Jar Export");
|
||||
t.start();
|
||||
dispose();
|
||||
});
|
||||
|
|
|
@ -140,7 +140,7 @@ public class WorkPaneMainComponent extends VisibleComponent
|
|||
|
||||
refreshClass = new JButton("Refresh");
|
||||
refreshClass.addActionListener((event)->{
|
||||
Thread t = new Thread(() -> new WorkPaneRefresh(event).run());
|
||||
Thread t = new Thread(() -> new WorkPaneRefresh(event).run(), "Refresh");
|
||||
t.start();
|
||||
});
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ public class ClassViewer extends ResourceViewer
|
|||
resourceViewPanel2.updateThread.startNewThread();
|
||||
if (resourceViewPanel3.decompilerViewIndex > 0)
|
||||
resourceViewPanel3.updateThread.startNewThread();
|
||||
});
|
||||
}, "ClassViewer Temp Dump");
|
||||
t.start();
|
||||
|
||||
if (isPanel1Editable() || isPanel2Editable() || isPanel3Editable())
|
||||
|
|
|
@ -64,7 +64,7 @@ public abstract class PaneUpdaterThread implements Runnable
|
|||
|
||||
public void startNewThread()
|
||||
{
|
||||
thread = new Thread(this);
|
||||
thread = new Thread(this, "Pane Update");
|
||||
thread.start();
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ public class ResourceDecompiling
|
|||
BytecodeViewer.viewer.updateBusyStatus(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, "Decompile Thread");
|
||||
decompileThread.start();
|
||||
}
|
||||
|
||||
|
@ -412,7 +412,7 @@ public class ResourceDecompiling
|
|||
BytecodeViewer.viewer.updateBusyStatus(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, "Decompile Thread");
|
||||
decompileThread.start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,12 +113,12 @@ public class APKExport implements Exporter
|
|||
{
|
||||
APKTool.buildAPK(new File(input), file2, finalContainer);
|
||||
BytecodeViewer.viewer.updateBusyStatus(false);
|
||||
});
|
||||
}, "Process APK");
|
||||
buildAPKThread.start();
|
||||
});
|
||||
}, "Jar Export");
|
||||
saveThread.start();
|
||||
}
|
||||
});
|
||||
}, "Resource Export");
|
||||
exportThread.start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,12 +77,12 @@ public class DexExport implements Exporter
|
|||
Dex2Jar.saveAsDex(new File(input), outputPath);
|
||||
|
||||
BytecodeViewer.viewer.updateBusyStatus(false);
|
||||
});
|
||||
}, "Process DEX");
|
||||
saveAsDex.start();
|
||||
});
|
||||
}, "Jar Export");
|
||||
saveAsJar.start();
|
||||
}
|
||||
});
|
||||
}, "Resource Export");
|
||||
exportThread.start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class RunnableJarExporter implements Exporter
|
|||
|
||||
new ExportJar(path).setVisible(true);
|
||||
}
|
||||
});
|
||||
}, "Runnable Jar Export");
|
||||
exportThread.start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,10 +65,10 @@ public class ZipExport implements Exporter
|
|||
{
|
||||
JarUtils.saveAsJar(BytecodeViewer.getLoadedClasses(), file2.getAbsolutePath());
|
||||
BytecodeViewer.viewer.updateBusyStatus(false);
|
||||
});
|
||||
}, "Jar Export");
|
||||
saveThread.start();
|
||||
}
|
||||
});
|
||||
}, "Resource Export");
|
||||
exportThread.start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ public class VersionChecker implements Runnable
|
|||
new ExceptionUI(e);
|
||||
}
|
||||
|
||||
});
|
||||
}, "Downloader");
|
||||
downloadThread.start();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue