mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-24 13:21:22 +08:00
GP-6483: Loader option tooltip follow-on work
This commit is contained in:
+1
@@ -67,6 +67,7 @@ public class DomainFileOption extends StringOption {
|
||||
JTextField textField = new ElidingFilePathTextField(lastFilePath);
|
||||
textField.setEditable(false);
|
||||
textField.setColumns(10);
|
||||
textField.setToolTipText(getDescription());
|
||||
JButton button = new BrowseButton();
|
||||
button.addActionListener(e -> {
|
||||
DataTreeDialog dataTreeDialog =
|
||||
|
||||
+1
@@ -65,6 +65,7 @@ public class DomainFolderOption extends StringOption {
|
||||
JTextField textField = new ElidingFilePathTextField(lastFolderPath);
|
||||
textField.setEditable(false);
|
||||
textField.setColumns(10);
|
||||
textField.setToolTipText(getDescription());
|
||||
JButton button = new BrowseButton();
|
||||
button.addActionListener(e -> {
|
||||
DataTreeDialog dataTreeDialog =
|
||||
|
||||
+10
-1
@@ -289,27 +289,35 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
|
||||
list.add(Option.newBoolean(LINK_EXISTING_OPTION_NAME)
|
||||
.value(LINK_EXISTING_OPTION_DEFAULT)
|
||||
.commandLineArgument(createArg("-linkExistingProjectLibraries"))
|
||||
.description("Search the project for existing library programs and create " +
|
||||
"external references to them.")
|
||||
.build());
|
||||
list.add(Option.newDomainFolder(LINK_SEARCH_FOLDER_OPTION_NAME)
|
||||
.commandLineArgument(createArg("-projectLibrarySearchFolder"))
|
||||
.description("The project folder to search for existing libaries to link.")
|
||||
.hidden(mirrorFsLayout)
|
||||
.build());
|
||||
list.add(Option.newBoolean(LOAD_LIBRARY_OPTION_NAME)
|
||||
.value(LOAD_LIBRARY_OPTION_DEFAULT)
|
||||
.commandLineArgument(createArg("-loadLibraries"))
|
||||
.description("Load libraries discovered in the specified search paths.")
|
||||
.build());
|
||||
list.add(new LibrarySearchPathDummyOption(LIBRARY_SEARCH_PATH_DUMMY_OPTION_NAME));
|
||||
list.add(Option.newInteger(DEPTH_OPTION_NAME)
|
||||
.value(DEPTH_OPTION_DEFAULT)
|
||||
.commandLineArgument(createArg("-libraryLoadDepth"))
|
||||
.description("How many levels deep the depth-first library dependency tree will " +
|
||||
"be traversed when loading libraries.")
|
||||
.build());
|
||||
list.add(Option.newDomainFolder(LIBRARY_DEST_FOLDER_OPTION_NAME)
|
||||
.commandLineArgument(createArg("-libraryDestinationFolder"))
|
||||
.description("The project folder to save newly loaded libraries to.")
|
||||
.hidden(mirrorFsLayout)
|
||||
.build());
|
||||
list.add(Option.newBoolean(MIRROR_LAYOUT_OPTION_NAME)
|
||||
.value(mirrorFsLayout)
|
||||
.commandLineArgument(createArg("-libraryMirrorLayout"))
|
||||
.description("Mirror filesystem layout when saving newly loaded libraries.")
|
||||
.hidden(mirrorFsLayout)
|
||||
.build());
|
||||
list.add(Option.newBoolean(LOAD_ONLY_LIBRARIES_OPTION_NAME)
|
||||
@@ -1200,12 +1208,13 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
|
||||
* @param name The name of the option
|
||||
*/
|
||||
public LibrarySearchPathDummyOption(String name) {
|
||||
super(name, null, null, null, null, null, false, null);
|
||||
super(name, null, null, null, null, null, false, "Edit the library search paths.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getCustomEditorComponent(AddressFactoryService addressFactoryService) {
|
||||
JButton button = new JButton("Edit Paths");
|
||||
button.setToolTipText(getDescription());
|
||||
button.addActionListener(e -> {
|
||||
DockingWindowManager.showDialog(null, new LibraryPathsDialog());
|
||||
});
|
||||
|
||||
@@ -165,10 +165,14 @@ public abstract class AbstractProgramLoader implements Loader {
|
||||
list.add(Option.newBoolean(APPLY_LABELS_OPTION_NAME)
|
||||
.value(shouldApplyProcessorLabelsByDefault())
|
||||
.commandLineArgument(createArg("-applyLabels"))
|
||||
.description("Create processor labels at specific addresses as defined by the " +
|
||||
"processor specification.")
|
||||
.build());
|
||||
list.add(Option.newBoolean(ANCHOR_LABELS_OPTION_NAME)
|
||||
.value(true)
|
||||
.commandLineArgument("-anchorLabels")
|
||||
.description(
|
||||
"Prevent processor labels from moving on imagebase or memory block change.")
|
||||
.build());
|
||||
|
||||
return list;
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ public class HexDecimalModeTextField extends JTextField {
|
||||
return "Press '" + key + "-M' to toggle Hex or Decimal Mode";
|
||||
}
|
||||
|
||||
return null;
|
||||
return super.getToolTipText();
|
||||
}
|
||||
|
||||
public void setHexMode(boolean hexMode) {
|
||||
|
||||
Reference in New Issue
Block a user