Package ghidra.plugins.fsbrowser
Class FSBComponentProvider
java.lang.Object
docking.ComponentProvider
ghidra.framework.plugintool.ComponentProviderAdapter
ghidra.plugins.fsbrowser.FSBComponentProvider
- All Implemented Interfaces:
ActionContextProvider
,PopupActionProvider
,FileSystemEventListener
,HelpDescriptor
public class FSBComponentProvider
extends ComponentProviderAdapter
implements FileSystemEventListener, PopupActionProvider
Plugin component provider for the
FileSystemBrowserPlugin
.
An instance of this class is created for each file system browser window (w/tree).
See the FSBFileHandler
interface for how to add actions to this component.
-
Field Summary
Fields inherited from class ghidra.framework.plugintool.ComponentProviderAdapter
tool
Fields inherited from class docking.ComponentProvider
DEFAULT_WINDOW_GROUP, dockingTool
-
Constructor Summary
ConstructorDescriptionFSBComponentProvider
(FileSystemBrowserPlugin plugin, FileSystemRef fsRef) Creates a newFSBComponentProvider
instance, taking ownership of the passed-infsRef
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Notifies the provider that the component is being hidden.boolean
ensureFileAccessable
(FSRL fsrl, FSBNode node, TaskMonitor monitor) getActionContext
(MouseEvent event) Returns the context object which corresponds to the area of focus within this provider's component.Returns the component to be displayedThe initialWindowPosition
of this provider.getGTree()
getName()
Returns the name of this providergetPopupActions
(Tool tool, ActionContext context) Provides notification that the popup menu is about to be displayed and allows a set of temporary actions to be included in the popup menu.void
Called by GFilesystem'sCloseable.close()
, before any destructive changes are made to the filesystem instance.void
onFilesystemRefChange
(GFileSystem fs, FileSystemRefManager refManager) Called byFileSystemRefManager
when a newFileSystemRef
is created or released.boolean
openFileSystem
(FSBNode node, boolean nested) void
runTask
(MonitoredRunnable runnableTask) void
setProject
(Project project) Methods inherited from class ghidra.framework.plugintool.ComponentProviderAdapter
getTool
Methods inherited from class docking.ComponentProvider
addLocalAction, addToTool, addToToolbar, adjustFontSize, canBeParent, closeComponent, componentActivated, componentDeactived, componentShown, contextChanged, createContext, createContext, createContext, getBaseIcon, getContextType, getHelpInfo, getHelpLocation, getHelpObject, getIcon, getInstanceID, getIntraGroupPosition, getLocalActions, getMappedName, getMappedOwner, getOwner, getSubTitle, getTabText, getTitle, getWindowGroup, getWindowSubMenuName, initializeInstanceID, isActive, isFocusedProvider, isInTool, isSnapshot, isTransient, isVisible, registerAdjustableFontId, registerProviderNameOwnerChange, removeAllLocalActions, removeFromTool, removeLocalAction, requestFocus, resetFontSize, setCustomSubTitle, setCustomTabText, setCustomTitle, setDefaultFocusComponent, setDefaultWindowPosition, setHelpLocation, setIcon, setIntraGroupPosition, setKeyBinding, setSubTitle, setTabText, setTitle, setTransient, setVisible, setWindowGroup, setWindowMenuGroup, toFront, toString
-
Constructor Details
-
FSBComponentProvider
Creates a newFSBComponentProvider
instance, taking ownership of the passed-infsRef
.- Parameters:
plugin
- parent pluginfsRef
-FileSystemRef
to aGFileSystem
.
-
-
Method Details
-
getPlugin
-
getGTree
- Returns:
- this provider's GTree.
-
getProjectIndex
-
componentHidden
public void componentHidden()Description copied from class:ComponentProvider
Notifies the provider that the component is being hidden. This happens when the provider is being closed.- Overrides:
componentHidden
in classComponentProvider
-
getPopupActions
Description copied from interface:PopupActionProvider
Provides notification that the popup menu is about to be displayed and allows a set of temporary actions to be included in the popup menu. Actions returned will be included in the menu if they have a valid popup menu path and respond true to theDockingActionIf.isValidContext(ActionContext)
call.- Specified by:
getPopupActions
in interfacePopupActionProvider
- Parameters:
tool
- the tool requesting the actionscontext
- the ActionContext- Returns:
- list of temporary popup actions; return null if there are no popup actions
-
afterAddedToTool
public void afterAddedToTool() -
setProject
-
onFilesystemClose
Description copied from interface:FileSystemEventListener
Called by GFilesystem'sCloseable.close()
, before any destructive changes are made to the filesystem instance.- Specified by:
onFilesystemClose
in interfaceFileSystemEventListener
- Parameters:
fs
-GFileSystem
that is about to be closed.
-
onFilesystemRefChange
Description copied from interface:FileSystemEventListener
Called byFileSystemRefManager
when a newFileSystemRef
is created or released.- Specified by:
onFilesystemRefChange
in interfaceFileSystemEventListener
- Parameters:
fs
-GFileSystem
that is being updated.refManager
-FileSystemRefManager
that is tracking the modified GFileSystem.
-
runTask
-
getActionContext
Description copied from class:ComponentProvider
Returns the context object which corresponds to the area of focus within this provider's component. Null is returned when there is no context.- Specified by:
getActionContext
in interfaceActionContextProvider
- Overrides:
getActionContext
in classComponentProvider
- Parameters:
event
- popup event which corresponds to this request. May be null for key-stroke or other non-mouse event.
-
getComponent
Description copied from class:ComponentProvider
Returns the component to be displayed- Specified by:
getComponent
in classComponentProvider
- Returns:
- the component to be displayed
-
getName
Description copied from class:ComponentProvider
Returns the name of this provider- Overrides:
getName
in classComponentProvider
- Returns:
- the name of this provider
-
getDefaultWindowPosition
Description copied from class:ComponentProvider
The initialWindowPosition
of this provider. If awindow group
is provided, then this position is relative to that provider. Otherwise, this position is relative to the tool window.- Overrides:
getDefaultWindowPosition
in classComponentProvider
- Returns:
- The initial
WindowPosition
of this provider.
-
ensureFileAccessable
-
openFileSystem
-