mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-6483: Loader option redesign with tooltip support
This commit is contained in:
@@ -29,7 +29,6 @@ import org.jdom2.JDOMException;
|
||||
import db.Transaction;
|
||||
import ghidra.app.util.Option;
|
||||
import ghidra.app.util.bin.ByteProvider;
|
||||
import ghidra.app.util.importer.DomainFileOption;
|
||||
import ghidra.app.util.importer.MessageLog;
|
||||
import ghidra.framework.model.DomainFile;
|
||||
import ghidra.framework.model.DomainObject;
|
||||
@@ -232,8 +231,9 @@ public class TenetLoader implements Loader {
|
||||
final DomainObject domainObject, final boolean loadIntoProgram,
|
||||
final boolean mirrorFsLayout) {
|
||||
final List<Option> list = new ArrayList<>();
|
||||
list.add(new DomainFileOption(DOMAIN_FILE_OPTION_NAME,
|
||||
COMMAND_LINE_ARG_PREFIX + "-associatedProgram", false));
|
||||
list.add(Option.newDomainFile(DOMAIN_FILE_OPTION_NAME)
|
||||
.commandLineArgument(createArg("-associatedProgram"))
|
||||
.build());
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -26,7 +26,7 @@ import ghidra.trace.model.Trace;
|
||||
// TODO: perhaps getApplicableExporters should use domainObject's class, not file's object class.
|
||||
// TODO: Where un-supported, be less abrasive, e.g., present empty managers.
|
||||
public class TraceViewXmlExporter extends XmlExporter {
|
||||
private final Map<String, Object> hideOpts = Map.of(
|
||||
private final Map<String, Boolean> hideOpts = Map.of(
|
||||
"Properties", false,
|
||||
"Relocation Table", false,
|
||||
"External Libraries", false);
|
||||
@@ -48,8 +48,8 @@ public class TraceViewXmlExporter extends XmlExporter {
|
||||
public void setOptions(List<Option> options) throws OptionException {
|
||||
List<Option> opts = new ArrayList<>(options);
|
||||
options.stream().filter(o -> !hideOpts.keySet().contains(o.getName())).forEach(opts::add);
|
||||
for (Map.Entry<String, Object> ent : hideOpts.entrySet()) {
|
||||
opts.add(new Option(ent.getKey(), ent.getValue()));
|
||||
for (Map.Entry<String, Boolean> ent : hideOpts.entrySet()) {
|
||||
opts.add(Option.newBoolean(ent.getKey()).value(ent.getValue()).build());
|
||||
}
|
||||
super.setOptions(opts);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user