GT-2758 - fix and normalize GFileSystem.getInfo()

Remove unnecessary boilerplate impls that returned null.
Build info string better, handle the GTree node where a sub-file system
is mounted so that both are included in the info display.
Fix missing img3 icon.
This commit is contained in:
dev747368 2019-04-17 13:51:47 -04:00
parent 4ce178c419
commit 203dacdecc
36 changed files with 290 additions and 343 deletions

View file

@ -30,10 +30,8 @@ import ghidra.util.task.TaskMonitor;
/**
* TODO: Provide class-level documentation that describes what this file system does.
*/
@FileSystemInfo(
type = "fstypegoeshere", // ([a-z0-9]+ only)
description = "File system description goes here",
factory = SkeletonFileSystem.MyFileSystemFactory.class)
@FileSystemInfo(type = "fstypegoeshere", // ([a-z0-9]+ only)
description = "File system description goes here", factory = SkeletonFileSystem.MyFileSystemFactory.class)
public class SkeletonFileSystem implements GFileSystem {
private final FSRLRoot fsFSRL;
@ -130,7 +128,7 @@ public class SkeletonFileSystem implements GFileSystem {
}
@Override
public String getInfo(GFile file, TaskMonitor monitor) throws IOException {
public String getInfo(GFile file, TaskMonitor monitor) {
MyMetadata metadata = fsih.getMetadata(file);
return (metadata == null) ? null : FSUtilities.infoMapToString(getInfoMap(metadata));
}