Merge remote-tracking branch 'origin/GP-2025-dragonmacher-function-window-duplicates' into patch

This commit is contained in:
Ryan Kurtz 2022-05-18 10:20:27 -04:00
commit d82537a3d4
2 changed files with 26 additions and 9 deletions

View File

@ -62,4 +62,9 @@ public class FunctionRowObject implements Comparable<FunctionRowObject> {
public int compareTo(FunctionRowObject o) {
return ((Long) function.getID()).compareTo(o.function.getID());
}
@Override
public String toString() {
return "[id=" + function.getID() + ", name=" + function.getSignature() + "]";
}
}

View File

@ -62,18 +62,20 @@ public class FunctionTableModel extends AddressBasedTableModel<FunctionRowObject
// Function tag column is not something widely used, so make hidden by default
descriptor.addHiddenColumn(
DiscoverableTableUtils.adaptColumForModel(this, new FunctionTagTableColumn()));
descriptor.addHiddenColumn(
DiscoverableTableUtils.adaptColumForModel(this, new IsFunctionInlineTableColumn()));
descriptor.addHiddenColumn(
DiscoverableTableUtils.adaptColumForModel(this, new IsFunctionNonReturningTableColumn()));
DiscoverableTableUtils.adaptColumForModel(this,
new IsFunctionNonReturningTableColumn()));
descriptor.addHiddenColumn(
DiscoverableTableUtils.adaptColumForModel(this, new IsFunctionVarargsTableColumn()));
descriptor.addHiddenColumn(
DiscoverableTableUtils.adaptColumForModel(this, new IsFunctionCustomStorageTableColumn()));
DiscoverableTableUtils.adaptColumForModel(this,
new IsFunctionCustomStorageTableColumn()));
return descriptor;
}
@ -149,15 +151,25 @@ public class FunctionTableModel extends AddressBasedTableModel<FunctionRowObject
}
void functionAdded(Function f) {
addObject(new FunctionRowObject(f));
if (supportsFunction(f)) {
addObject(new FunctionRowObject(f));
}
}
void functionRemoved(Function f) {
removeObject(new FunctionRowObject(f));
if (supportsFunction(f)) {
removeObject(new FunctionRowObject(f));
}
}
void update(Function f) {
updateObject(new FunctionRowObject(f));
if (supportsFunction(f)) {
updateObject(new FunctionRowObject(f));
}
}
private boolean supportsFunction(Function f) {
return !f.isExternal(); // this model does not show external functions
}
@Override