mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-25 21:51:47 +00:00
Merge remote-tracking branch 'origin/GT-0-dragonmacher-test-fixes'
This commit is contained in:
commit
7a85fdac25
@ -734,7 +734,7 @@ class CompositeViewerModel extends AbstractTableModel implements DataTypeManager
|
||||
* For example, the name, or description change.
|
||||
*/
|
||||
protected void compositeInfoChanged() {
|
||||
notify(modelListeners, CompositeViewerModelListener::componentDataChanged);
|
||||
notify(modelListeners, CompositeViewerModelListener::compositeInfoChanged);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -147,12 +147,17 @@ public class GhidraScriptUtil {
|
||||
|
||||
/**
|
||||
* Determine if the specified file is contained within the Ghidra installation.
|
||||
* @param file - file or directory to check
|
||||
* @param file file or directory to check
|
||||
* @return true if file is contained within Ghidra application root.
|
||||
*/
|
||||
public static boolean isSystemFile(ResourceFile file) {
|
||||
private static boolean isSystemFile(ResourceFile file) {
|
||||
try {
|
||||
String filePath = file.getCanonicalPath().replace('\\', '/');
|
||||
if (filePath.startsWith(USER_SCRIPTS_DIR)) {
|
||||
// a script inside of the user scripts dir is not a 'system' script
|
||||
return false;
|
||||
}
|
||||
|
||||
Collection<ResourceFile> roots = Application.getApplicationRootDirectories();
|
||||
for (ResourceFile resourceFile : roots) {
|
||||
String installPath = resourceFile.getCanonicalPath().replace('\\', '/');
|
||||
@ -330,8 +335,10 @@ public class GhidraScriptUtil {
|
||||
//
|
||||
ResourceFile preferredFile = null;
|
||||
for (ResourceFile file : matchingClassFiles) {
|
||||
if (file.getParentFile().getAbsolutePath().equals(
|
||||
GhidraScriptUtil.USER_SCRIPTS_BIN_DIR)) {
|
||||
if (file.getParentFile()
|
||||
.getAbsolutePath()
|
||||
.equals(
|
||||
GhidraScriptUtil.USER_SCRIPTS_BIN_DIR)) {
|
||||
preferredFile = file;
|
||||
break;
|
||||
}
|
||||
|
@ -101,10 +101,12 @@ public class KeyBindingsTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
selectRowForAction(action1);
|
||||
|
||||
String actualText = getText(statusPane);
|
||||
String description = action1.getDescription();
|
||||
String escaped = description.replaceAll("&", "&");
|
||||
assertTrue(
|
||||
"Description is not updated for action '" + action1.getName() + "'; instead the " +
|
||||
"description is '" + actualText + "'",
|
||||
actualText.indexOf(action1.getDescription()) != -1);
|
||||
"description is '" + actualText + "'\n\tDescrption: " + escaped,
|
||||
actualText.indexOf(escaped) != -1);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user