mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 12:00:04 +02:00
GP-3281 fixed DataTypes tree is allow multiple file archives with the
same name to be opened.
This commit is contained in:
parent
ca9a56b5f4
commit
5db99f4167
2 changed files with 13 additions and 1 deletions
|
@ -222,8 +222,8 @@ public class ArchiveRootNode extends DataTypeTreeNode {
|
|||
int index = Collections.binarySearch(allChildrenList, node);
|
||||
if (index < 0) {
|
||||
index = -index - 1;
|
||||
addNode(index, node);
|
||||
}
|
||||
addNode(index, node);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,10 +30,12 @@ public class FileArchiveNode extends ArchiveNode {
|
|||
new GIcon("icon.plugin.datatypes.tree.node.archive.file.checked.out.exclusive");
|
||||
|
||||
FileArchive fileArchive; // casted reference for easy access
|
||||
String fullName;
|
||||
|
||||
public FileArchiveNode(FileArchive archive, ArrayPointerFilterState filterState) {
|
||||
super(archive, filterState);
|
||||
this.fileArchive = archive;
|
||||
fullName = archive.getName() + ": " + archive.getFile().getAbsolutePath();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -58,6 +60,16 @@ public class FileArchiveNode extends ArchiveNode {
|
|||
return "[Unsaved New Archive]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return fullName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayText() {
|
||||
return archive.getName();
|
||||
}
|
||||
|
||||
public boolean hasWriteLock() {
|
||||
return fileArchive.hasWriteLock();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue