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,ProjectIndexService.ProjectIndexListener,HelpDescriptor
public class FSBComponentProvider
extends ComponentProviderAdapter
implements FileSystemEventListener, PopupActionProvider, ProjectIndexService.ProjectIndexListener
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
toolFields inherited from class docking.ComponentProvider
DEFAULT_WINDOW_GROUP, dockingTool -
Constructor Summary
ConstructorsConstructorDescriptionFSBComponentProvider(FileSystemBrowserPlugin plugin, FileSystemRef fsRef) Creates a newFSBComponentProviderinstance, taking ownership of the passed-infsRef. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidNotifies the provider that the component is being hidden.booleanensureFileAccessable(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 initialWindowPositionof 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.voidvoidCalled by GFilesystem'sCloseable.close(), before any destructive changes are made to the filesystem instance.voidonFilesystemRefChange(GFileSystem fs, FileSystemRefManager refManager) Called byFileSystemRefManagerwhen a newFileSystemRefis created or released.booleanopenFileSystem(FSBNode node, boolean nested) voidrunTask(MonitoredRunnable runnableTask) voidsetProject(Project project) Methods inherited from class ghidra.framework.plugintool.ComponentProviderAdapter
getToolMethods inherited from class docking.ComponentProvider
addLocalAction, addToTool, addToToolbar, adjustFontSize, canBeParent, closeComponent, componentActivated, componentDeactived, componentMadeDisplayable, 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, isShowing, 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 newFSBComponentProviderinstance, taking ownership of the passed-infsRef.- Parameters:
plugin- parent pluginfsRef-FileSystemRefto aGFileSystem.
-
-
Method Details
-
getPlugin
-
getGTree
- Returns:
- this provider's GTree.
-
getProjectIndex
-
componentHidden
public void componentHidden()Description copied from class:ComponentProviderNotifies the provider that the component is being hidden. This happens when the provider is being closed.- Overrides:
componentHiddenin classComponentProvider
-
getPopupActions
Description copied from interface:PopupActionProviderProvides 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:
getPopupActionsin 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
-
indexUpdated
public void indexUpdated()- Specified by:
indexUpdatedin interfaceProjectIndexService.ProjectIndexListener
-
onFilesystemClose
Description copied from interface:FileSystemEventListenerCalled by GFilesystem'sCloseable.close(), before any destructive changes are made to the filesystem instance.- Specified by:
onFilesystemClosein interfaceFileSystemEventListener- Parameters:
fs-GFileSystemthat is about to be closed.
-
onFilesystemRefChange
Description copied from interface:FileSystemEventListenerCalled byFileSystemRefManagerwhen a newFileSystemRefis created or released.- Specified by:
onFilesystemRefChangein interfaceFileSystemEventListener- Parameters:
fs-GFileSystemthat is being updated.refManager-FileSystemRefManagerthat is tracking the modified GFileSystem.
-
runTask
-
getActionContext
Description copied from class:ComponentProviderReturns 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:
getActionContextin interfaceActionContextProvider- Overrides:
getActionContextin 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:ComponentProviderReturns the component to be displayed- Specified by:
getComponentin classComponentProvider- Returns:
- the component to be displayed
-
getName
Description copied from class:ComponentProviderReturns the name of this provider- Overrides:
getNamein classComponentProvider- Returns:
- the name of this provider
-
getDefaultWindowPosition
Description copied from class:ComponentProviderThe initialWindowPositionof this provider. If awindow groupis provided, then this position is relative to that provider. Otherwise, this position is relative to the tool window.- Overrides:
getDefaultWindowPositionin classComponentProvider- Returns:
- The initial
WindowPositionof this provider.
-
ensureFileAccessable
-
openFileSystem
-