Package ghidra.app.services
Interface DataTypeManagerService
- 
- All Superinterfaces:
- DataTypeQueryService
 
 public interface DataTypeManagerService extends DataTypeQueryService Service to provide list of cycle groups and data types identified as "favorites." Favorites will show up on the popup menu for creating data and defining function return types and parameters.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddDataTypeManagerChangeListener(DataTypeManagerChangeListener listener)Adds a listener to be notified when changes occur to any open datatype manager.voidcloseArchive(DataTypeManager dtm)Closes the archive for the givenDataTypeManager.voidedit(DataType dt)Pop up an editor dialog for the given data type.DataTypeManagergetBuiltInDataTypesManager()Get the data type manager that has all of the built in types.DataTypegetDataType(javax.swing.tree.TreePath selectedPath)Shows the user a dialog that allows them to choose a data type from a tree of all available data types.HelpLocationgetEditorHelpLocation(DataType dataType)Gets the location of the help for editing the specified data type.java.util.List<DataType>getFavorites()Get the data types marked as favorites that will show up on a popup menu.java.util.Set<java.lang.String>getPossibleEquateNames(long value)Examines all enum dataTypes for items that match the given value.DataTypegetRecentlyUsed()Get the data type that was most recently used to apply data to a Program.booleanisEditable(DataType dt)Determine if the indicated data type can be edited (i.e.ghidra.app.plugin.core.datamgr.archive.ArchiveopenArchive(DataTypeArchive dataTypeArchive)A method to open an Archive for the given, pre-existing DataTypeArchive (like one that was opened during the import process.ghidra.app.plugin.core.datamgr.archive.ArchiveopenArchive(java.io.File file, boolean acquireWriteLock)A method to open an Archive for the given, pre-existing archive file (*.gdt)DataTypeManageropenDataTypeArchive(java.lang.String archiveName)Opens the specified data type archive contained within the Ghidra installation.voidremoveDataTypeManagerChangeListener(DataTypeManagerChangeListener listener)Removes the given listener from receiving dataTypeManger change notifications.voidsetDataTypeSelected(DataType dataType)Selects the given data type in the display of data types.voidsetRecentlyUsed(DataType dt)Set the given data type as the most recently used to apply a data type to a Program.- 
Methods inherited from interface ghidra.app.services.DataTypeQueryServicegetDataType, getDataTypeManagers, getSortedDataTypeList
 
- 
 
- 
- 
- 
Method Detail- 
getBuiltInDataTypesManagerDataTypeManager getBuiltInDataTypesManager() Get the data type manager that has all of the built in types.- Returns:
- data type manager for built in data types
 
 - 
getFavoritesjava.util.List<DataType> getFavorites() Get the data types marked as favorites that will show up on a popup menu.- Returns:
- list of favorite datatypess
 
 - 
addDataTypeManagerChangeListenervoid addDataTypeManagerChangeListener(DataTypeManagerChangeListener listener) Adds a listener to be notified when changes occur to any open datatype manager.- Parameters:
- listener- the listener to be added.
 
 - 
removeDataTypeManagerChangeListenervoid removeDataTypeManagerChangeListener(DataTypeManagerChangeListener listener) Removes the given listener from receiving dataTypeManger change notifications.- Parameters:
- listener- the listener to be removed.
 
 - 
setRecentlyUsedvoid setRecentlyUsed(DataType dt) Set the given data type as the most recently used to apply a data type to a Program.- Parameters:
- dt- data type that was most recently used
 
 - 
getRecentlyUsedDataType getRecentlyUsed() Get the data type that was most recently used to apply data to a Program.- Returns:
- data type that was most recently used
 
 - 
getEditorHelpLocationHelpLocation getEditorHelpLocation(DataType dataType) Gets the location of the help for editing the specified data type.- Parameters:
- dataType- the data type to be edited.
- Returns:
- the help location for editing the data type.
 
 - 
isEditableboolean isEditable(DataType dt) Determine if the indicated data type can be edited (i.e. it has an editor that this service knows how to invoke).- Parameters:
- dt- data type to be edited
- Returns:
- true if this service can invoke an editor for changing the data type.
 
 - 
editvoid edit(DataType dt) Pop up an editor dialog for the given data type.- Parameters:
- dt- data type that either a Structure or a Union; built in types cannot be edited
- Throws:
- java.lang.IllegalArgumentException- if the given has not been resolved by a DataTypeManager; in other words, if- DataType.getDataTypeManager()returns null.
 
 - 
closeArchivevoid closeArchive(DataTypeManager dtm) Closes the archive for the givenDataTypeManager. This will ignore request to close the open Program's manager and the built-in manager.- Parameters:
- dtm- the data type manager of the archive to close
 
 - 
openDataTypeArchiveDataTypeManager openDataTypeArchive(java.lang.String archiveName) throws java.io.IOException, ghidra.app.plugin.core.datamgr.archive.DuplicateIdException Opens the specified data type archive contained within the Ghidra installation. NOTE: This is predicated upon all archive files having a unique name within the installation. Any path prefix specified may prevent the file from opening (or reopening) correctly.- Parameters:
- archiveName- archive file name (i.e., "generic_C_lib")
- Returns:
- the data type archive or null if an archive with the specified name can not be found.
- Throws:
- java.io.IOException- if an i/o error occurs opening the data type archive
- ghidra.app.plugin.core.datamgr.archive.DuplicateIdException- if another archive with the same ID is already open
 
 - 
openArchiveghidra.app.plugin.core.datamgr.archive.Archive openArchive(DataTypeArchive dataTypeArchive) A method to open an Archive for the given, pre-existing DataTypeArchive (like one that was opened during the import process.- Parameters:
- dataTypeArchive- the archive from which to create an Archive
- Returns:
- an Archive based upon the given DataTypeArchive
 
 - 
openArchiveghidra.app.plugin.core.datamgr.archive.Archive openArchive(java.io.File file, boolean acquireWriteLock) throws java.io.IOException, ghidra.app.plugin.core.datamgr.archive.DuplicateIdExceptionA method to open an Archive for the given, pre-existing archive file (*.gdt)- Parameters:
- file- data type archive file
- acquireWriteLock- true if write lock should be acquired (i.e., open for update)
- Returns:
- an Archive based upon the given archive files
- Throws:
- java.io.IOException- if an i/o error occurs opening the data type archive
- ghidra.app.plugin.core.datamgr.archive.DuplicateIdException- if another archive with the same ID is already open
 
 - 
setDataTypeSelectedvoid setDataTypeSelected(DataType dataType) Selects the given data type in the display of data types. A null dataType value will clear the current selection.- Parameters:
- dataType- The data type to select.
 
 - 
getDataTypeDataType getDataType(javax.swing.tree.TreePath selectedPath) Shows the user a dialog that allows them to choose a data type from a tree of all available data types.- Parameters:
- selectedPath- An optional tree path to select in the tree
- Returns:
- A data type chosen by the user
 
 - 
getPossibleEquateNamesjava.util.Set<java.lang.String> getPossibleEquateNames(long value) Examines all enum dataTypes for items that match the given value. Returns a list of Strings that might make sense for the given value.- Parameters:
- value- the value to search for.
- Returns:
- the list of enum item names that match the given value
 
 
- 
 
-