summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2020-12-09 23:40:08 -0500
committerBrian Potchik <brian@vector35.com>2020-12-09 23:40:08 -0500
commitfadc9bee32581b7890ab1b896ecd6392d22c48a6 (patch)
tree4a7b4ae226b219d14e2192d4dcf8e982391f3a8b
parentf184af8b393b789f29fd7974c7c8766874daa5f4 (diff)
Update settings documentation.
-rw-r--r--docs/getting-started.md13
-rw-r--r--docs/img/settings.pngbin203853 -> 883808 bytes
-rw-r--r--python/settings.py16
3 files changed, 15 insertions, 14 deletions
diff --git a/docs/getting-started.md b/docs/getting-started.md
index e809577d..62303bb9 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -334,15 +334,16 @@ Binary Ninja supports loading PDB files through a built in PDB loader. When sele
## Settings
-Settings are available via the `[CMD/CTRL] ,` hotkey and allow a wide variety of customization.
+Binary Ninja provides various settings which are available via the `[CMD/CTRL] ,` hotkey. These settings allow a wide variety of customization of the user interface and functional aspects of the analysis environment.
-All settings are saved in the [_user_ directory](#user-folder) in the file `settings.json`. Each top level object in this file is represents a different plugin or logical group.
+There are several scopes available for settings:
+* **User Settings** - Settings that apply globally and override the defaults. These settings are stored in `settings.json` within the [User Folder](#user-folder).
+* **Project Settings** - Settings which only apply if a project is opened. These settings are stored in `.binaryninja/settings.json` within a Project Folder. Project Folders can exist anywhere except within the User Folder. These settings apply to all files contained in the Project Folder and override the default and user settings.
+* **Resource Settings** - Settings which only apply to a specific BinaryView object within a file. These settings persist in a Binary Ninja Database (.bndb) database or ephemerally in a BinaryView object if a database does not yet exist for a file.
-Enabling the `identifiers` check box will show the raw identifiers used to set settings in the json file which may be useful for [programmatically](https://api.binary.ninja/binaryninja.settings-module.html) interacting with settings.
+All settings are uniquely identified with an identifier string. Identifiers are available in the UI via the context menu and are useful for [programmatically](https://api.binary.ninja/binaryninja.settings-module.html) interacting with settings.
-Note
-!!! Tip "Note"
- Changing a setting to a non-default value and then changing it back to a default value will result in explicitly specifying that default value which will not change if the default ever does. This can be avoided by right-clicking and choosing `Clear Setting` which will remove the user-setting.
+**Note**: In order to facilitate reproducible analysis results, when opening a file for the first time, all of the analysis settings are automatically serialized into the _Resource Setting_ scope. This prevents subsequent _User_ and _Project_ setting modifications from unintentionally changing existing analysis results.
### All Settings
diff --git a/docs/img/settings.png b/docs/img/settings.png
index 3e354dab..0668ecd8 100644
--- a/docs/img/settings.png
+++ b/docs/img/settings.png
Binary files differ
diff --git a/python/settings.py b/python/settings.py
index 8bb87f80..e7f41ef5 100644
--- a/python/settings.py
+++ b/python/settings.py
@@ -49,14 +49,14 @@ class Settings(object):
backing store. The backing store can be different for each level. When querying setting values, the values returned or modified \
are in order of preference (i.e. ``SettingsAutoScope``). It is possible to override the scope by specifying the desired ``SettingsScope``.
- ================= ========================== ============== ================================ ===============================
- Setting Level Settings Scope Preference Backing Store ('default') Backing Store (Other)
- ================= ========================== ============== ================================ ===============================
- Default SettingsDefaultScope Lowest Settings Schema Settings Schema
- User SettingsUserScope - <User Directory>/settings.json <TBD>
- Project SettingsProjectScope - <TBD> <TBD>
- Resource SettingsResourceScope Highest BinaryView (Storage in BNDB) SettingsResource (Customizable)
- ================= ========================== ============== ================================ ===============================
+ ================= ========================== ============== ==============================================
+ Setting Level Settings Scope Preference Storage
+ ================= ========================== ============== ==============================================
+ Default SettingsDefaultScope Lowest Settings Schema
+ User SettingsUserScope - <User Directory>/settings.json
+ Project SettingsProjectScope - <Project Directory>/.binaryninja/settings.json
+ Resource SettingsResourceScope Highest BinaryView (Storage in BNDB)
+ ================= ========================== ============== ==============================================
Individual settings are identified by a key, which is a string in the form of **'<group>.<name>'**. Groups provide a simple way \
to categorize settings. Additionally, sub-categories can be expressed directly in the name part of the key with a similar dot notation.