Package ghidra.features.base.values
Class ProjectFolderValue
Value class for project folders (
DomainFile). The editor component consists of the
JTextField and a browse button for bringing up a DataTreeDialog for picking
project folders from the current project.
This class and other subclasses of AbstractValue are part of a subsystem for easily
defining a set of values that can be displayed in an input dialog (ValuesMapDialog).
Typically, these values are created indirectly using a GValuesMap which is then
given to the constructor of the dialog. However, an alternate approach is to create the
dialog without a ValuesMap and then use its ValuesMapDialog.addValue(AbstractValue)
method directly.
-
Constructor Summary
ConstructorsConstructorDescriptionProjectFolderValue(String name) Constructor for ProjectFolderValues with the given name.ProjectFolderValue(String name, Project project, String defaultValuePath) Constructor for creating ProjectFolderValues for projects other than the active project.ProjectFolderValue(String name, String defaultValuePath) Constructor for creating a new ProjectFolderValue with the given name and a path for a default folder value. -
Method Summary
Modifier and TypeMethodDescriptionprotected DomainFolderfromString(String valueString) Parses the given string into a value of type TReturns a JComponent for entering or editing a value of this type.protected Stringprotected voidUpdates the JComponent returned fromAbstractValue.getComponent()to represent the current value of this object.protected voidCauses the stored value for this object to be updated based on the state of the JComponent returned fromAbstractValue.getComponent()
-
Constructor Details
-
ProjectFolderValue
Constructor for ProjectFolderValues with the given name.- Parameters:
name- the name of the value
-
ProjectFolderValue
Constructor for creating a new ProjectFolderValue with the given name and a path for a default folder value.- Parameters:
name- the name of the valuedefaultValuePath- the path for a default folder value
-
ProjectFolderValue
Constructor for creating ProjectFolderValues for projects other than the active project.- Parameters:
name- the name of the valueproject- the project to find a folder fromdefaultValuePath- the path of a default folder value
-
-
Method Details
-
getComponent
Description copied from class:AbstractValueReturns a JComponent for entering or editing a value of this type.- Specified by:
getComponentin classAbstractValue<DomainFolder>- Returns:
- a JComponent for entering or editing a value of this type.
-
updateValueFromComponent
Description copied from class:AbstractValueCauses the stored value for this object to be updated based on the state of the JComponent returned fromAbstractValue.getComponent()- Specified by:
updateValueFromComponentin classAbstractValue<DomainFolder>- Throws:
ValuesMapParseException- if an error occurs trying update the value from a component. This usually is a result of trying to parse a string value.
-
updateComponentFromValue
protected void updateComponentFromValue()Description copied from class:AbstractValueUpdates the JComponent returned fromAbstractValue.getComponent()to represent the current value of this object.- Specified by:
updateComponentFromValuein classAbstractValue<DomainFolder>
-
fromString
Description copied from class:AbstractValueParses the given string into a value of type T- Specified by:
fromStringin classAbstractValue<DomainFolder>- Parameters:
valueString- the string to parse- Returns:
- a value of type T
-
toString
- Overrides:
toStringin classAbstractValue<DomainFolder>
-