mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-01-10 14:38:02 -05:00
Merge branch 'GP-5953_ghidragon_dirty_program_indicator_not_working_analyze_all'
This commit is contained in:
@@ -31,6 +31,7 @@ import ghidra.app.events.*;
|
||||
import ghidra.app.plugin.PluginCategoryNames;
|
||||
import ghidra.app.services.CodeViewerService;
|
||||
import ghidra.app.services.ProgramManager;
|
||||
import ghidra.framework.data.DomainObjectAdapterDB;
|
||||
import ghidra.framework.model.*;
|
||||
import ghidra.framework.options.OptionsChangeListener;
|
||||
import ghidra.framework.options.ToolOptions;
|
||||
@@ -57,7 +58,7 @@ import help.Help;
|
||||
eventsConsumed = { ProgramOpenedPluginEvent.class, ProgramClosedPluginEvent.class, ProgramActivatedPluginEvent.class, ProgramVisibilityChangePluginEvent.class }
|
||||
)
|
||||
//@formatter:on
|
||||
public class MultiTabPlugin extends Plugin implements DomainObjectListener, OptionsChangeListener {
|
||||
public class MultiTabPlugin extends Plugin implements TransactionListener, OptionsChangeListener {
|
||||
private final static Icon TRANSIENT_ICON = new GIcon("icon.plugin.programmanager.transient");
|
||||
private final static Icon EMPTY8_ICON = new GIcon("icon.plugin.programmanager.empty.small");
|
||||
private static final String SHOW_TABS_ALWAYS = "Show Program Tabs Always";
|
||||
@@ -248,14 +249,6 @@ public class MultiTabPlugin extends Plugin implements DomainObjectListener, Opti
|
||||
selectHighlightedProgramTimer.restart();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void domainObjectChanged(DomainObjectChangedEvent ev) {
|
||||
if (ev.getSource() instanceof Program) {
|
||||
Program program = (Program) ev.getSource();
|
||||
tabPanel.refreshTab(program);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
tabPanel = new GTabPanel<Program>("Program");
|
||||
@@ -314,14 +307,14 @@ public class MultiTabPlugin extends Plugin implements DomainObjectListener, Opti
|
||||
|
||||
if (progService.isVisible(prog)) {
|
||||
tabPanel.addTab(prog);
|
||||
prog.removeListener(this);
|
||||
prog.addListener(this);
|
||||
prog.removeTransactionListener(this);
|
||||
prog.addTransactionListener(this);
|
||||
updateActionEnablement();
|
||||
}
|
||||
}
|
||||
|
||||
private void remove(Program prog) {
|
||||
prog.removeListener(this);
|
||||
prog.removeTransactionListener(this);
|
||||
tabPanel.removeTab(prog);
|
||||
updateActionEnablement();
|
||||
}
|
||||
@@ -379,4 +372,24 @@ public class MultiTabPlugin extends Plugin implements DomainObjectListener, Opti
|
||||
cvService.setNorthComponent(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void transactionStarted(DomainObjectAdapterDB domainObj, TransactionInfo tx) {
|
||||
// don't care
|
||||
}
|
||||
|
||||
@Override
|
||||
public void transactionEnded(DomainObjectAdapterDB domainObj) {
|
||||
tabPanel.refreshTab((Program) domainObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undoStackChanged(DomainObjectAdapterDB domainObj) {
|
||||
// don't care
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undoRedoOccurred(DomainObjectAdapterDB domainObj) {
|
||||
tabPanel.refreshTab((Program) domainObj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user