mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-27 18:48:17 +08:00
Merge branch 'GT-3283-dragonmacher'
This commit is contained in:
+4
@@ -85,4 +85,8 @@ public class ObjectChooserDialog<T> extends DialogComponentProvider {
|
|||||||
public T getSelectedObject() {
|
public T getSelectedObject() {
|
||||||
return selectedObject;
|
return selectedObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setFilterText(String text) {
|
||||||
|
table.setFilterText(text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -186,4 +186,7 @@ public class GFilterTable<ROW_OBJECT> extends JPanel {
|
|||||||
filterPanel.requestFocus();
|
filterPanel.requestFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setFiterText(String text) {
|
||||||
|
filterPanel.setFilterText(text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,4 +219,8 @@ public class GTableWidget<T> extends JPanel {
|
|||||||
public void focusFilter() {
|
public void focusFilter() {
|
||||||
gFilterTable.focusFilter();
|
gFilterTable.focusFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setFilterText(String text) {
|
||||||
|
gFilterTable.setFiterText(text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,38 +155,44 @@ public class GenericRunInfo {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the same as {@link #getUserSettingsDirsByTime()} except that it doesn't include the
|
* This is the same as {@link #getUserSettingsDirsByTime()} except that it doesn't include the
|
||||||
* current installation or installations with different release names.
|
* current installation or installations with different release names
|
||||||
|
*
|
||||||
|
* @return the list of previous directories, sorted by time
|
||||||
*/
|
*/
|
||||||
public static List<File> getPreviousApplicationSettingsDirsByTime() {
|
public static List<File> getPreviousApplicationSettingsDirsByTime() {
|
||||||
List<File> applicationSettiingsDirs = new ArrayList<>();
|
List<File> settingsDirs = new ArrayList<>();
|
||||||
|
|
||||||
ApplicationIdentifier myIdentifier = new ApplicationIdentifier(
|
ApplicationIdentifier myIdentifier = new ApplicationIdentifier(
|
||||||
Application.getApplicationLayout().getApplicationProperties());
|
Application.getApplicationLayout().getApplicationProperties());
|
||||||
|
String myRelease = myIdentifier.getApplicationReleaseName();
|
||||||
|
String myDirName = Application.getUserSettingsDirectory().getName();
|
||||||
|
|
||||||
for (File dir : getUserSettingsDirsByTime()) {
|
for (File dir : getUserSettingsDirsByTime()) {
|
||||||
String dirName = dir.getName();
|
|
||||||
|
|
||||||
// Ignore the currently active user settings directory.
|
// Ignore the currently active user settings directory.
|
||||||
// By definition, it is not a previous one.
|
// By definition, it is not a previous one.
|
||||||
if (dirName.equals(Application.getUserSettingsDirectory().getName())) {
|
String dirName = dir.getName();
|
||||||
|
if (dirName.equals(myDirName)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dirName.startsWith(".")) {
|
if (dirName.startsWith(".")) {
|
||||||
dirName = dirName.substring(1);
|
dirName = dirName.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// The current release name has to match for it to be considered
|
// The current release name has to match for it to be considered
|
||||||
if (new ApplicationIdentifier(dirName).getApplicationReleaseName().equals(
|
ApplicationIdentifier identifier = new ApplicationIdentifier(dirName);
|
||||||
myIdentifier.getApplicationReleaseName())) {
|
String release = identifier.getApplicationReleaseName();
|
||||||
applicationSettiingsDirs.add(dir);
|
if (release.equals(myRelease)) {
|
||||||
|
settingsDirs.add(dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException e) {
|
catch (IllegalArgumentException e) {
|
||||||
// The directory name didn't contain a valid application identifier...skip it
|
// The directory name didn't contain a valid application identifier...skip it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return applicationSettiingsDirs;
|
return settingsDirs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user