mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-20 10:37:27 +08:00
Merge remote-tracking branch 'origin/GP-6629-dragonmacher-decompiler-snapshot-cache-patch' into patch
This commit is contained in:
+8
@@ -207,6 +207,14 @@ public class DecompilerController {
|
||||
decompilerMgr.resetDecompiler();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the given data to the cache. Meant for internal use only.
|
||||
* @param data the data
|
||||
*/
|
||||
public void addToCache(DecompileData data) {
|
||||
updateCache(data);
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
// Methods call by the DecompilerManager
|
||||
//==================================================================================================
|
||||
|
||||
+5
-3
@@ -725,11 +725,13 @@ public class DecompilerProvider extends NavigatableComponentProviderAdapter
|
||||
ViewerPosition myViewPosition = controller.getDecompilerPanel().getViewerPosition();
|
||||
newProvider.doSetProgram(program);
|
||||
|
||||
// Any change in the HighlightTokens should be delivered to the new panel
|
||||
DecompilerPanel myPanel = getDecompilerPanel();
|
||||
newProvider.setLocation(currentLocation, myPanel.getViewerPosition());
|
||||
// initialize the new provider's cache and then set the location
|
||||
DecompileData myDecompileData = controller.getDecompileData();
|
||||
newProvider.controller.addToCache(myDecompileData);
|
||||
newProvider.setLocation(currentLocation, myViewPosition);
|
||||
|
||||
// transfer any state after the new decompiler is initialized
|
||||
DecompilerPanel myPanel = getDecompilerPanel();
|
||||
DecompilerPanel newPanel = newProvider.getDecompilerPanel();
|
||||
newProvider.doWhenNotBusy(() -> {
|
||||
newPanel.setViewerPosition(myViewPosition);
|
||||
|
||||
Reference in New Issue
Block a user