mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Merge branch 'dragonmacher-task-launcher-backgrounding-update'
This commit is contained in:
commit
8cdfe79def
28 changed files with 605 additions and 318 deletions
|
@ -33,7 +33,7 @@ public class Swing {
|
|||
|
||||
private static final String SWING_TIMEOUT_SECONDS_PROPERTY =
|
||||
Swing.class.getName().toLowerCase() + ".timeout.seconds";
|
||||
private static final int SWING_TIMEOUT_SECONDS_DEFAULT_VALUE = 10;
|
||||
private static final int SWING_TIMEOUT_SECONDS_DEFAULT_VALUE = 20;
|
||||
|
||||
private static int loadTimeout() {
|
||||
String timeoutString = System.getProperty(SWING_TIMEOUT_SECONDS_PROPERTY,
|
||||
|
@ -61,7 +61,7 @@ public class Swing {
|
|||
*
|
||||
* @return true if this is the event dispatch thread -OR- is in headless mode.
|
||||
*/
|
||||
public static boolean isEventDispatchThread() {
|
||||
public static boolean isSwingThread() {
|
||||
if (isInHeadlessMode()) {
|
||||
return true;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ public class Swing {
|
|||
return; // squash during production mode
|
||||
}
|
||||
|
||||
if (!isEventDispatchThread()) {
|
||||
if (!isSwingThread()) {
|
||||
Throwable t =
|
||||
ReflectionUtilities.filterJavaThrowable(new AssertException(errorMessage));
|
||||
Msg.error(SystemUtilities.class, errorMessage, t);
|
||||
|
|
|
@ -422,7 +422,7 @@ public class SystemUtilities {
|
|||
* @return true if this is the event dispatch thread -OR- is in headless mode.
|
||||
*/
|
||||
public static boolean isEventDispatchThread() {
|
||||
return Swing.isEventDispatchThread();
|
||||
return Swing.isSwingThread();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,7 +33,11 @@ class StubTaskMonitor implements TaskMonitor {
|
|||
@Override
|
||||
public void setMessage(String message) {
|
||||
// stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,6 +68,11 @@ class StubTaskMonitor implements TaskMonitor {
|
|||
// stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isIndeterminate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkCanceled() throws CancelledException {
|
||||
// stub
|
||||
|
|
|
@ -56,6 +56,12 @@ public interface TaskMonitor {
|
|||
*/
|
||||
public void setMessage(String message);
|
||||
|
||||
/**
|
||||
* Gets the last set message of this monitor
|
||||
* @return the message
|
||||
*/
|
||||
public String getMessage();
|
||||
|
||||
/**
|
||||
* Sets the current progress value
|
||||
* @param value progress value
|
||||
|
@ -91,6 +97,12 @@ public interface TaskMonitor {
|
|||
*/
|
||||
public void setIndeterminate(boolean indeterminate);
|
||||
|
||||
/**
|
||||
* Returns true if this monitor shows no progress
|
||||
* @return true if this monitor shows no progress
|
||||
*/
|
||||
public boolean isIndeterminate();
|
||||
|
||||
/**
|
||||
* Check to see if this monitor has been canceled
|
||||
* @throws CancelledException if monitor has been cancelled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue