save/restore active bundles, use generic.util.Path string encoding

This commit is contained in:
Jason P. Leasure
2020-05-12 11:37:11 -04:00
parent 74658143ea
commit 9216a940dc
11 changed files with 169 additions and 158 deletions

View File

@@ -26,6 +26,7 @@ import docking.ComponentProvider;
import docking.widgets.tree.GTree;
import docking.widgets.tree.GTreeNode;
import generic.jar.ResourceFile;
import generic.util.Path;
import ghidra.app.plugin.core.console.ConsoleComponentProvider;
import ghidra.app.plugin.core.osgi.BundleStatusComponentProvider;
import ghidra.app.plugin.core.script.*;
@@ -110,14 +111,16 @@ public class GhidraScriptMgrPluginScreenShots extends GhidraScreenShotGenerator
@Test
public void testScript_Dirs() throws Exception {
List<String> paths = new ArrayList<>();
paths.add("$USER_HOME/ghidra_scripts");
paths.add("$GHIDRA_HOME/Features/Base/ghidra_scripts");
paths.add("/User/defined/invalid/directory");
List<ResourceFile> paths = new ArrayList<>();
paths.add(Path.fromPathString("$USER_HOME/ghidra_scripts"));
paths.add(Path.fromPathString("$GHIDRA_HOME/Features/Base/ghidra_scripts"));
paths.add(Path.fromPathString("/User/defined/invalid/directory"));
BundleStatusComponentProvider bundleStatusComponentProvider =
showProvider(BundleStatusComponentProvider.class);
BundleStatusComponentProvider bundleStatusComponentProvider = showProvider(BundleStatusComponentProvider.class);
bundleStatusComponentProvider.getModel().setPathsForTesting(paths);
waitForComponentProvider(BundleStatusComponentProvider.class);
captureComponent(bundleStatusComponentProvider.getComponent());
}