mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-29 05:50:04 +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();
|
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
|
// Methods call by the DecompilerManager
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
|
|||||||
+5
-3
@@ -725,11 +725,13 @@ public class DecompilerProvider extends NavigatableComponentProviderAdapter
|
|||||||
ViewerPosition myViewPosition = controller.getDecompilerPanel().getViewerPosition();
|
ViewerPosition myViewPosition = controller.getDecompilerPanel().getViewerPosition();
|
||||||
newProvider.doSetProgram(program);
|
newProvider.doSetProgram(program);
|
||||||
|
|
||||||
// Any change in the HighlightTokens should be delivered to the new panel
|
// initialize the new provider's cache and then set the location
|
||||||
DecompilerPanel myPanel = getDecompilerPanel();
|
DecompileData myDecompileData = controller.getDecompileData();
|
||||||
newProvider.setLocation(currentLocation, myPanel.getViewerPosition());
|
newProvider.controller.addToCache(myDecompileData);
|
||||||
|
newProvider.setLocation(currentLocation, myViewPosition);
|
||||||
|
|
||||||
// transfer any state after the new decompiler is initialized
|
// transfer any state after the new decompiler is initialized
|
||||||
|
DecompilerPanel myPanel = getDecompilerPanel();
|
||||||
DecompilerPanel newPanel = newProvider.getDecompilerPanel();
|
DecompilerPanel newPanel = newProvider.getDecompilerPanel();
|
||||||
newProvider.doWhenNotBusy(() -> {
|
newProvider.doWhenNotBusy(() -> {
|
||||||
newPanel.setViewerPosition(myViewPosition);
|
newPanel.setViewerPosition(myViewPosition);
|
||||||
|
|||||||
Reference in New Issue
Block a user