Java Code Examples for ghidra.framework.options.Options#setOptionsHelpLocation()

The following examples show how to use ghidra.framework.options.Options#setOptionsHelpLocation() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AutoAnalysisPlugin.java    From ghidra with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a new instance of the plugin giving it the tool that it will work
 * in.
 */
public AutoAnalysisPlugin(PluginTool tool) {
	super(tool);

	findAnalyzers();
	createActions();

	// get the option so that an owner is associated with it, otherwise
	// it will not show up in the Options dialog for the tool.
	Options options = tool.getOptions(GhidraOptions.CATEGORY_AUTO_ANALYSIS);
	String description = "This option forces the analysis options" +
		" dialog to appear whenever auto-analysis action is invoked.";

	helpLocation = new HelpLocation("AutoAnalysisPlugin", "AnalysisOptions");
	options.setOptionsHelpLocation(helpLocation);
	options.registerOption(SHOW_ANALYSIS_OPTIONS, true, helpLocation, description);
}
 
Example 2
Source File: MarkerManagerPlugin.java    From ghidra with Apache License 2.0 5 votes vote down vote up
/**
 * @param tool
 */
public MarkerManagerPlugin(PluginTool tool) {
	super(tool);
	markerManager = new MarkerManager(this);

	Options options = tool.getOptions(GhidraOptions.CATEGORY_BROWSER_NAVIGATION_MARKERS);
	options.setOptionsHelpLocation(new HelpLocation(HelpTopics.CODE_BROWSER,
		GhidraOptions.CATEGORY_BROWSER_NAVIGATION_MARKERS));

	registerServiceProvided(MarkerService.class, markerManager);
}
 
Example 3
Source File: AutoAnalysisPlugin.java    From ghidra with Apache License 2.0 5 votes vote down vote up
protected void programOpened(final Program program) {
	final AutoAnalysisManager analysisMgr = AutoAnalysisManager.getAnalysisManager(program);
	analysisMgr.addTool(tool);
	analysisMgr.addListener(this);

	Options options = program.getOptions(Program.ANALYSIS_PROPERTIES);
	options.registerOptionsEditor(new AnalysisOptionsEditor(program));
	options.setOptionsHelpLocation(
		new HelpLocation("AutoAnalysisPlugin", "Auto_Analysis_Option"));
}
 
Example 4
Source File: VTPlugin.java    From ghidra with Apache License 2.0 5 votes vote down vote up
private void initializeOptions() {
	Options options = tool.getOptions(GhidraOptions.CATEGORY_BROWSER_DISPLAY);
	options.registerOptionsEditor(new ListingDisplayOptionsEditor(options));
	options.setOptionsHelpLocation(new HelpLocation(CodeBrowserPlugin.class.getSimpleName(),
		GhidraOptions.CATEGORY_BROWSER_DISPLAY));

}
 
Example 5
Source File: FunctionGraphOptions.java    From ghidra with Apache License 2.0 4 votes vote down vote up
public void registerOptions(Options options) {

		HelpLocation help = new HelpLocation(OWNER, "Options");
		options.setOptionsHelpLocation(help);

		options.registerOption(RELAYOUT_OPTIONS_KEY, relayoutOption, help,
			RELAYOUT_OPTIONS_DESCRIPTION);

		options.registerOption(NAVIGATION_HISTORY_KEY, navigationHistoryChoice, help,
			NAVIGATION_HISTORY_DESCRIPTION);

		options.registerOption(SHOW_ANIMATION_OPTIONS_KEY, useAnimation(), help,
			SHOW_ANIMATION_DESCRIPTION);

		options.registerOption(USE_MOUSE_RELATIVE_ZOOM_KEY, useMouseRelativeZoom(), help,
			USE_MOUSE_RELATIVE_ZOOM_DESCRIPTION);

		options.registerOption(USE_CONDENSED_LAYOUT_KEY, useCondensedLayout(),
			new HelpLocation(OWNER, "Layout_Compressing"), USE_CONDENSED_LAYOUT_DESCRIPTION);

		options.registerOption(VIEW_RESTORE_OPTIONS_KEY, ViewRestoreOption.START_FULLY_ZOOMED_OUT,
			help, VIEW_RESTORE_OPTIONS_DESCRIPTION);

		options.registerOption(SCROLL_WHEEL_PANS_KEY, getScrollWheelPans(), help,
			SCROLL_WHEEL_PANS_DESCRIPTION);

		options.registerOption(DEFAULT_GROUP_BACKGROUND_COLOR_KEY, DEFAULT_GROUP_BACKGROUND_COLOR,
			help, DEFAULT_GROUP_BACKGROUND_COLOR_DESCRPTION);

		options.registerOption(UPDATE_GROUP_AND_UNGROUP_COLORS, updateGroupColorsAutomatically,
			help, UPDATE_GROUP_AND_UNGROUP_COLORS_DESCRIPTION);

		options.registerOption(USE_FULL_SIZE_TOOLTIP_KEY, useFullSizeTooltip, help,
			USE_FULL_SIZE_TOOLTIP_DESCRIPTION);

		options.registerOption(EDGE_COLOR_CONDITIONAL_JUMP_KEY, conditionalJumpEdgeColor, help,
			"Conditional jump edge color");

		options.registerOption(EDGE_UNCONDITIONAL_JUMP_COLOR_KEY, unconditionalJumpEdgeColor, help,
			"Unconditional jump edge color");

		options.registerOption(EDGE_FALLTHROUGH_COLOR_KEY, fallthroughEdgeColor, help,
			"Fallthrough edge color");

		options.registerOption(EDGE_CONDITIONAL_JUMP_HIGHLIGHT_COLOR_KEY,
			conditionalJumpEdgeHighlightColor, help,
			"Conditional jump edge color when highlighting the reachablity of a vertex");

		options.registerOption(EDGE_UNCONDITIONAL_JUMP_HIGHLIGHT_COLOR_KEY,
			unconditionalJumpEdgeHighlightColor, help,
			"Unconditional jump edge color when highlighting the reachablity of a vertex");

		options.registerOption(EDGE_FALLTHROUGH_HIGHLIGHT_COLOR_KEY, fallthroughEdgeHighlightColor,
			help, "Fallthrough edge color when highlighting the reachablity of a vertex");

	}
 
Example 6
Source File: DiffApplySettingsOptionManager.java    From ghidra with Apache License 2.0 4 votes vote down vote up
/**
 * Initializes class variables for this option manager and gets the default options.
 */
private void init() {

	help = new HelpLocation(HELP_TOPIC, "DiffApplySettingsToolOptions");
	Options options = plugin.getTool().getOptions(DIFF_OPTIONS);
	options.setOptionsHelpLocation(help);

	// Set the help strings
	options.registerOption(
		OPTION_PROGRAM_CONTEXT,
		REPLACE_CHOICE.REPLACE,
		help,
		getReplaceDescription("program context register value",
			"program context register values"));
	options.registerOption(OPTION_BYTES, REPLACE_CHOICE.REPLACE, help,
		getReplaceDescription("byte", "bytes"));

	options.registerOption(OPTION_CODE_UNITS, REPLACE_CHOICE.REPLACE, help,
		getReplaceDescription("code unit", "code units"));

	options.registerOption(OPTION_REFERENCES, REPLACE_CHOICE.REPLACE, help,
		getReplaceDescription("reference", "references"));
	options.registerOption(OPTION_PLATE_COMMENTS, MERGE_CHOICE.MERGE, help,
		getMergeDescription("plate comment", "plate comments"));
	options.registerOption(OPTION_PRE_COMMENTS, MERGE_CHOICE.MERGE, help,
		getMergeDescription("pre-comment", "pre-comments"));
	options.registerOption(OPTION_EOL_COMMENTS, MERGE_CHOICE.MERGE, help,
		getMergeDescription("end of line comment", "end of line comments"));
	options.registerOption(OPTION_REPEATABLE_COMMENTS, MERGE_CHOICE.MERGE, help,
		getMergeDescription("repeatable comment", "repeatable comments"));
	options.registerOption(OPTION_POST_COMMENTS, MERGE_CHOICE.MERGE, help,
		getMergeDescription("post comment", "post comments"));
	options.registerOption(OPTION_SYMBOLS, SYMBOL_MERGE_CHOICE.MERGE_AND_SET_PRIMARY, help,
		getSymbolDescription());
	options.registerOption(OPTION_BOOKMARKS, REPLACE_CHOICE.REPLACE, help,
		getReplaceDescription("bookmark", "bookmarks"));
	options.registerOption(OPTION_PROPERTIES, REPLACE_CHOICE.REPLACE, help,
		getReplaceDescription("property", "properties"));
	options.registerOption(OPTION_FUNCTIONS, REPLACE_CHOICE.REPLACE, help,
		getReplaceDescription("function", "functions"));
	options.registerOption(OPTION_FUNCTION_TAGS, MERGE_CHOICE.MERGE, help,
		getReplaceDescription("function tag", "function tags"));

	getDefaultApplyFilter();
}