Merge remote-tracking branch 'origin/GP-4635-dragonmacher-flat-laf-tree-folder-fix'

This commit is contained in:
Ryan Kurtz 2024-05-29 12:57:19 -04:00
commit 8dcf63464e
4 changed files with 17 additions and 11 deletions

View File

@ -159,8 +159,8 @@ public class BatchInfo {
}
}
for (Iterator<UserAddedSourceInfo> iterator =
userAddedSources.iterator(); iterator.hasNext();) {
for (Iterator<UserAddedSourceInfo> iterator = userAddedSources.iterator(); iterator
.hasNext();) {
UserAddedSourceInfo uasi = iterator.next();
if (uasi.getFSRL().equals(fsrl)) {
iterator.remove();
@ -297,8 +297,7 @@ public class BatchInfo {
return sb.toString();
}
private boolean processAsFS(FSRL fsrl, TaskMonitor taskMonitor)
throws CancelledException {
private boolean processAsFS(FSRL fsrl, TaskMonitor taskMonitor) throws CancelledException {
try (FileSystemRef fsRef = fsService.probeFileForFilesystem(fsrl, taskMonitor,
FileSystemProbeConflictResolver.CHOOSEFIRST)) {
@ -390,7 +389,8 @@ public class BatchInfo {
}
}
private LoaderMap pollLoadersForLoadSpecs(ByteProvider provider, FSRL fsrl, TaskMonitor monitor) {
private LoaderMap pollLoadersForLoadSpecs(ByteProvider provider, FSRL fsrl,
TaskMonitor monitor) {
monitor.setMessage(fsrl.getName());
return LoaderService.getSupportedLoadSpecs(provider,
loader -> !(loader instanceof BinaryLoader));
@ -465,8 +465,6 @@ public class BatchInfo {
// just remove existing files that are deeper. Recalculating user added source info
// number is hard so I'm skipping it now.
Msg.trace(this, "Switching maxDepth from " + maxDepth + " to " + newMaxDepth);
//@formatter:off
List<FSRL> files = userAddedSources
.stream()
@ -495,7 +493,6 @@ public class BatchInfo {
try (CryptoSession cryptoSession = fsService.newCryptoSession()) {
List<FSRL> badFiles = new ArrayList<>();
for (FSRL fsrl : filesToAdd) {
Msg.trace(this, "Adding " + fsrl);
batchMonitor.setPrefix("Processing " + fsrl.getName() + ": ");
try {

View File

@ -59,8 +59,7 @@
<logger name="ghidra.app.plugin.core.misc.RecoverySnapshotMgrPlugin" level="INFO"/>
<logger name="ghidra.framework.project.extensions" level="DEBUG" />
<logger name="ghidra.framework.store.local" level="INFO"/>
<logger name="ghidra.pcodeCPort.slgh_compile" level="INFO"/>
<logger name="ghidra.plugins" level="INFO"/>
<logger name="ghidra.pcodeCPort.slgh_compile" level="INFO"/>
<logger name="ghidra.program.database" level="DEBUG" />
<logger name="ghidra.program.model.lang.xml" level="DEBUG"/>
<logger name="ghidra.app.plugin.assembler" level="DEBUG" />

View File

@ -58,7 +58,6 @@
<logger name="ghidra.framework.project.extensions" level="DEBUG" />
<logger name="ghidra.framework.store.local" level="INFO"/>
<logger name="ghidra.pcodeCPort.slgh_compile" level="INFO"/>
<logger name="ghidra.plugins" level="INFO"/>
<logger name="ghidra.program.database" level="DEBUG" />
<logger name="ghidra.program.model.lang.xml" level="DEBUG"/>
<logger name="ghidra.app.plugin.assembler" level="DEBUG" />

View File

@ -16,6 +16,7 @@
package generic.theme.laf;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import generic.theme.ApplicationThemeManager;
import generic.theme.LafType;
@ -33,4 +34,14 @@ public class FlatLookAndFeelManager extends LookAndFeelManager {
}
return new FlatUiDefaultsMapper(defaults);
}
@Override
protected void fixupLookAndFeelIssues() {
//
// The FlatTreeUI class will remove default renderers inside the call to updateRenderer()
// if "Tree.showDefaultIcons" is false. We want the tree to display folder icons.
//
UIManager.put("Tree.showDefaultIcons", Boolean.TRUE);
}
}