Package ghidra.docking.settings
Interface SettingsDefinition
- All Known Subinterfaces:
BooleanSettingsDefinition
,EnumSettingsDefinition
,NumberSettingsDefinition
,StringSettingsDefinition
,TypeDefSettingsDefinition
- All Known Implementing Classes:
AddressRangeEndpointSettingsDefinition
,AddressSpaceSettingsDefinition
,ByteCountSettingsDefinition
,CharsetSettingsDefinition
,CodeUnitCountSettingsDefinition
,CodeUnitOffsetSettingsDefinition
,ComponentOffsetSettingsDefinition
,DataTypeMnemonicSettingsDefinition
,EndianSettingsDefinition
,FloatingPointPrecisionSettingsDefinition
,FormatSettingsDefinition
,FunctionInlineSettingsDefinition
,FunctionNoReturnSettingsDefinition
,FunctionThunkSettingsDefinition
,IntegerSignednessFormattingModeSettingsDefinition
,JavaEnumSettingsDefinition
,MemoryOffsetSettingsDefinition
,MutabilitySettingsDefinition
,OffsetMaskSettingsDefinition
,OffsetShiftSettingsDefinition
,PaddingSettingsDefinition
,PointerTypeSettingsDefinition
,RenderUnicodeSettingsDefinition
,TerminatedSettingsDefinition
,TranslationSettingsDefinition
public interface SettingsDefinition
Generic interface for defining display options on data and dataTypes. Uses
Settings objects to store values which are interpreted by SettingsDefinition objects.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes any values in the given settings object assocated with this settings definitionstatic SettingsDefinition[]
concat
(SettingsDefinition[] settings, SettingsDefinition... additional) Create a new list ofSettingsDefinition
s by concat'ing a base list with a var-arg'ish additional list of setting defs.void
copySetting
(Settings srcSettings, Settings destSettings) Copies any setting value associated with this settings definition from the srcSettings settings to the destSettings.static SettingsDefinition[]
filterSettingsDefinitions
(SettingsDefinition[] definitions, Predicate<SettingsDefinition> filter) Get datatype settings definitions for the specified datatype exclusive of any default-use-only definitions.Returns a description of this settings definitiongetName()
Returns the display name of this SettingsDefinitionGet theSettings
key which is used when storing a key/value entry.getValueString
(Settings settings) Get the setting value as a string which corresponds to this definition.boolean
hasSameValue
(Settings settings1, Settings settings2) Check two settings for equality which correspond to this settings definition.boolean
Determine if a setting value has been stored
-
Method Details
-
concat
Create a new list ofSettingsDefinition
s by concat'ing a base list with a var-arg'ish additional list of setting defs. Any additional duplicates are discarded.- Parameters:
settings
- List of settings defs.additional
- More settings defs to add- Returns:
- new array with all the settings defs joined together.
-
filterSettingsDefinitions
static SettingsDefinition[] filterSettingsDefinitions(SettingsDefinition[] definitions, Predicate<SettingsDefinition> filter) Get datatype settings definitions for the specified datatype exclusive of any default-use-only definitions.- Parameters:
definitions
- settings definitions to be filteredfilter
- callback which determines if definition should be included in returned array- Returns:
- filtered settings definitions
-
hasValue
Determine if a setting value has been stored- Parameters:
setting
- stored settings- Returns:
- true if a value has been stored, else false
-
getValueString
Get the setting value as a string which corresponds to this definition. A default value string will be returned if a setting has not been stored.- Parameters:
settings
- settings- Returns:
- value string or null if not set and default has not specified by this definition
-
getName
String getName()Returns the display name of this SettingsDefinition- Returns:
- display name for setting
-
getStorageKey
String getStorageKey()Get theSettings
key which is used when storing a key/value entry.- Returns:
- settings storage key
-
getDescription
String getDescription()Returns a description of this settings definition- Returns:
- setting description
-
clear
Removes any values in the given settings object assocated with this settings definition- Parameters:
settings
- the settings object to be cleared.
-
copySetting
Copies any setting value associated with this settings definition from the srcSettings settings to the destSettings.- Parameters:
srcSettings
- the settings to be copieddestSettings
- the settings to be updated.
-
hasSameValue
Check two settings for equality which correspond to this settings definition.- Parameters:
settings1
- first settingssettings2
- second settings- Returns:
- true if the same else false
-