Package ghidra.program.model.data
Class DataTypeManagerChangeListenerHandler
- java.lang.Object
-
- ghidra.program.model.data.DataTypeManagerChangeListenerHandler
-
- All Implemented Interfaces:
DataTypeManagerChangeListener
public class DataTypeManagerChangeListenerHandler extends java.lang.Object implements DataTypeManagerChangeListener
Default implementation for a category change listener that sends out the events to its own list of category change listeners.
-
-
Constructor Summary
Constructors Constructor Description DataTypeManagerChangeListenerHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDataTypeManagerListener(DataTypeManagerChangeListener l)
Add the given category change listener.void
categoryAdded(DataTypeManager dtm, CategoryPath path)
Notification when category is added.void
categoryMoved(DataTypeManager dtm, CategoryPath oldPath, CategoryPath newPath)
Notification when a category is reparented to new category.void
categoryRemoved(DataTypeManager dtm, CategoryPath path)
Notification when a category is removed.void
categoryRenamed(DataTypeManager dtm, CategoryPath oldPath, CategoryPath newPath)
Notification when category is renamed.void
dataTypeAdded(DataTypeManager dtm, DataTypePath path)
Notification when a data type is added to a categoryvoid
dataTypeChanged(DataTypeManager dtm, DataTypePath path)
Notification when data type is changed.void
dataTypeMoved(DataTypeManager dtm, DataTypePath oldPath, DataTypePath newPath)
Notification when a data type is moved.void
dataTypeRemoved(DataTypeManager dtm, DataTypePath path)
Notification when data type is removed.void
dataTypeRenamed(DataTypeManager dtm, DataTypePath oldPath, DataTypePath newPath)
Notification when data type is renamed.void
dataTypeReplaced(DataTypeManager dtm, DataTypePath oldPath, DataTypePath newPath, DataType newDataType)
Notification when a data type has been replaced.void
favoritesChanged(DataTypeManager dtm, DataTypePath path, boolean isFavorite)
Notification the favorite status of a datatype has changedvoid
removeDataTypeManagerListener(DataTypeManagerChangeListener l)
Remove the category change listener.void
sourceArchiveAdded(DataTypeManager dataTypeManager, SourceArchive dataTypeSource)
Notification that the information for a source archive has been added.void
sourceArchiveChanged(DataTypeManager dataTypeManager, SourceArchive dataTypeSource)
Notification that the information for a particular source archive has changed.
-
-
-
Method Detail
-
addDataTypeManagerListener
public void addDataTypeManagerListener(DataTypeManagerChangeListener l)
Add the given category change listener.- Parameters:
l
- the listener to be added.
-
removeDataTypeManagerListener
public void removeDataTypeManagerListener(DataTypeManagerChangeListener l)
Remove the category change listener.- Parameters:
l
- the listener to be removed.
-
categoryAdded
public void categoryAdded(DataTypeManager dtm, CategoryPath path)
Description copied from interface:DataTypeManagerChangeListener
Notification when category is added.- Specified by:
categoryAdded
in interfaceDataTypeManagerChangeListener
- Parameters:
dtm
- the dataType managerpath
- the categoryPath of the newly added category.- See Also:
DataTypeManagerChangeListener.categoryAdded(ghidra.program.model.data.DataTypeManager, ghidra.program.model.data.CategoryPath)
-
categoryMoved
public void categoryMoved(DataTypeManager dtm, CategoryPath oldPath, CategoryPath newPath)
Description copied from interface:DataTypeManagerChangeListener
Notification when a category is reparented to new category.- Specified by:
categoryMoved
in interfaceDataTypeManagerChangeListener
- Parameters:
dtm
- data type manager associated with the categoryoldPath
- the path of the category before it was moved.newPath
- the path of the category after it was moved.- See Also:
DataTypeManagerChangeListener.categoryMoved(ghidra.program.model.data.DataTypeManager, ghidra.program.model.data.CategoryPath, ghidra.program.model.data.CategoryPath)
-
categoryRemoved
public void categoryRemoved(DataTypeManager dtm, CategoryPath path)
Description copied from interface:DataTypeManagerChangeListener
Notification when a category is removed.- Specified by:
categoryRemoved
in interfaceDataTypeManagerChangeListener
- Parameters:
dtm
- data type manager associated with the categorypath
- the categoryPath of the category that was removed.- See Also:
DataTypeManagerChangeListener.categoryRemoved(ghidra.program.model.data.DataTypeManager, ghidra.program.model.data.CategoryPath)
-
categoryRenamed
public void categoryRenamed(DataTypeManager dtm, CategoryPath oldPath, CategoryPath newPath)
Description copied from interface:DataTypeManagerChangeListener
Notification when category is renamed.- Specified by:
categoryRenamed
in interfaceDataTypeManagerChangeListener
- Parameters:
dtm
- data type manager associated with the categoryoldPath
- the path of the category before it was renamed.newPath
- the path of the category after it was renamed. This path will only differ in the last segment of the path.- See Also:
DataTypeManagerChangeListener.categoryRenamed(ghidra.program.model.data.DataTypeManager, ghidra.program.model.data.CategoryPath, ghidra.program.model.data.CategoryPath)
-
dataTypeAdded
public void dataTypeAdded(DataTypeManager dtm, DataTypePath path)
Description copied from interface:DataTypeManagerChangeListener
Notification when a data type is added to a category- Specified by:
dataTypeAdded
in interfaceDataTypeManagerChangeListener
- Parameters:
dtm
- data type manager for the given category paths.path
- the DataTypePath of the newly added datatype.- See Also:
ghidra.program.model.data.DataTypeManagerChangeListener#dataTypeAdded(ghidra.program.model.data.DataTypeManager, ghidra.program.model.data.CategoryPath)
-
dataTypeChanged
public void dataTypeChanged(DataTypeManager dtm, DataTypePath path)
Description copied from interface:DataTypeManagerChangeListener
Notification when data type is changed.- Specified by:
dataTypeChanged
in interfaceDataTypeManagerChangeListener
- Parameters:
dtm
- data type manager for the given category paths.path
- the path of the datatype that changed.- See Also:
ghidra.program.model.data.DataTypeManagerChangeListener#dataTypeChanged(ghidra.program.model.data.DataTypeManager, ghidra.program.model.data.CategoryPath)
-
dataTypeMoved
public void dataTypeMoved(DataTypeManager dtm, DataTypePath oldPath, DataTypePath newPath)
Description copied from interface:DataTypeManagerChangeListener
Notification when a data type is moved.- Specified by:
dataTypeMoved
in interfaceDataTypeManagerChangeListener
- Parameters:
dtm
- data type manager for the given category paths.oldPath
- the path of the datatype before it was moved.newPath
- the path of the datatype after it was moved.- See Also:
ghidra.program.model.data.DataTypeManagerChangeListener#dataTypeMoved(ghidra.program.model.data.DataTypeManager, ghidra.program.model.data.CategoryPath, ghidra.program.model.data.CategoryPath)
-
dataTypeRemoved
public void dataTypeRemoved(DataTypeManager dtm, DataTypePath path)
Description copied from interface:DataTypeManagerChangeListener
Notification when data type is removed.- Specified by:
dataTypeRemoved
in interfaceDataTypeManagerChangeListener
- Parameters:
dtm
- data type manager for the given category paths.path
- the DataTypePath of the removed datatype.- See Also:
ghidra.program.model.data.DataTypeManagerChangeListener#dataTypeRemoved(ghidra.program.model.data.DataTypeManager, ghidra.program.model.data.CategoryPath)
-
dataTypeRenamed
public void dataTypeRenamed(DataTypeManager dtm, DataTypePath oldPath, DataTypePath newPath)
Description copied from interface:DataTypeManagerChangeListener
Notification when data type is renamed.- Specified by:
dataTypeRenamed
in interfaceDataTypeManagerChangeListener
- Parameters:
dtm
- data type manager for the given category paths.oldPath
- the path of the datatype before it was renamed.newPath
- the path of the datatype after it was renamed.- See Also:
ghidra.program.model.data.DataTypeManagerChangeListener#dataTypeRenamed(ghidra.program.model.data.DataTypeManager, ghidra.program.model.data.CategoryPath, ghidra.program.model.data.CategoryPath)
-
dataTypeReplaced
public void dataTypeReplaced(DataTypeManager dtm, DataTypePath oldPath, DataTypePath newPath, DataType newDataType)
Description copied from interface:DataTypeManagerChangeListener
Notification when a data type has been replaced.- Specified by:
dataTypeReplaced
in interfaceDataTypeManagerChangeListener
- Parameters:
dtm
- data type manager for the given category paths.oldPath
- the path of the datatype that was replaced.newPath
- the path of the datatype that replaced the existing datatype.newDataType
- the new dataType that replaced the old dataType- See Also:
ghidra.program.model.data.DataTypeManagerChangeListener#dataTypeReplaced(ghidra.program.model.data.DataTypeManager, ghidra.program.model.data.CategoryPath)
-
favoritesChanged
public void favoritesChanged(DataTypeManager dtm, DataTypePath path, boolean isFavorite)
Description copied from interface:DataTypeManagerChangeListener
Notification the favorite status of a datatype has changed- Specified by:
favoritesChanged
in interfaceDataTypeManagerChangeListener
- Parameters:
dtm
- data type manager for the given category paths.path
- the DataTypePath of the datatype had its favorite status changed.isFavorite
- reflects the current favorite status of the datatype.- See Also:
ghidra.program.model.data.DataTypeManagerChangeListener#favoritesChanged(ghidra.program.model.data.DataTypeManager, ghidra.program.model.data.CategoryPath, boolean)
-
sourceArchiveChanged
public void sourceArchiveChanged(DataTypeManager dataTypeManager, SourceArchive dataTypeSource)
Description copied from interface:DataTypeManagerChangeListener
Notification that the information for a particular source archive has changed. Typically, this would be because it was renamed or moved.- Specified by:
sourceArchiveChanged
in interfaceDataTypeManagerChangeListener
- Parameters:
dataTypeManager
- data type manager referring to the given source information.
-
sourceArchiveAdded
public void sourceArchiveAdded(DataTypeManager dataTypeManager, SourceArchive dataTypeSource)
Description copied from interface:DataTypeManagerChangeListener
Notification that the information for a source archive has been added. This happens when a data type from the indicated source archive is added to this data type manager.- Specified by:
sourceArchiveAdded
in interfaceDataTypeManagerChangeListener
- Parameters:
dataTypeManager
- data type manager referring to the given source information.dataTypeSource
- the new data type source information
-
-