MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / register

Method register

plugins/svd/src/settings.rs:21–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19 pub const AUTO_LOAD_FILE_SETTING: &'static str = "analysis.svd.autoLoadFile";
20
21 pub fn register() {
22 let bn_settings = Settings::new();
23
24 let add_bitfields_props = json!({
25 "title" : "Add Bitfields",
26 "type" : "boolean",
27 "default" : Self::ADD_BITFIELDS_DEFAULT,
28 "description" : "Whether to add bitfields. Bitfields are not supported by Binary Ninja, so this is a workaround using unions.",
29 });
30 bn_settings
31 .register_setting_json(Self::ADD_BITFIELDS_SETTING, add_bitfields_props.to_string());
32
33 let add_comments_props = json!({
34 "title" : "Add Comments",
35 "type" : "boolean",
36 "default" : Self::ADD_COMMENTS_DEFAULT,
37 "description" : "Whether to add comments. If you see comment placement is off, try disabling this.",
38 });
39 bn_settings
40 .register_setting_json(Self::ADD_COMMENTS_SETTING, add_comments_props.to_string());
41
42 let file_props = json!({
43 "title" : "SVD File",
44 "type" : "string",
45 "default" : Self::AUTO_LOAD_FILE_DEFAULT,
46 "description" : "The SVD File to automatically load when opening the view.",
47 "uiSelectionAction" : "file"
48 });
49 bn_settings.register_setting_json(Self::AUTO_LOAD_FILE_SETTING, file_props.to_string());
50 }
51
52 pub fn from_view_settings(view: &BinaryView) -> Self {
53 let mut load_settings = LoadSettings::default();

Callers 1

plugin_initFunction · 0.45

Calls 1

register_setting_jsonMethod · 0.80

Tested by

no test coverage detected