Package ghidra.features.base.memsearch.gui

# Class MemorySearchProvider

java.lang.Object
docking.ComponentProvider
ghidra.framework.plugintool.ComponentProviderAdapter
ghidra.features.base.memsearch.gui.MemorySearchProvider

All Implemented Interfaces:
  `ActionContextProvider`, `DockingContextListener`, `NavigatableRemovalListener`, `DomainObjectClosedListener`, `HelpDescriptor`

public class MemorySearchProvider extends ComponentProviderAdapter implements DockingContextListener, NavigatableRemovalListener, DomainObjectClosedListener
ComponentProvider used to search memory and display search results.

- ## Field Summary

  ### Fields inherited from class ghidra.framework.plugintool.ComponentProviderAdapter

  `tool`

  ### Fields inherited from class docking.ComponentProvider

  `DEFAULT_WINDOW_GROUP, dockingTool`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MemorySearchProvider(MemorySearchPlugin plugin, Navigatable navigatable, SearchSettings settings, MemorySearchOptions options, SearchHistory history)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `closeComponent()`
  This is the callback that will happen when the user presses the 'X' button of a provider.
  `void`
  `componentActivated()`
  Notifies the component provider that it is now the active provider
  `void`
  `contextChanged(ActionContext context)`
  Called when the context changes
  `protected ActionContext`
  `createContext(Component focusedComponent, Object contextObject)`
  A default method for creating an action context for this provider, using the given `context object` and component
  `void`
  `domainObjectClosed(DomainObject dobj)`
  Callback indicating that the specified `DomainObject` has been closed.
  `String`
  `getByteString()`
  `JComponent`
  `getComponent()`
  Returns the component to be displayed
  `MemorySearchResultsPanel`
  `getResultsPanel()`
  `String`
  `getSearchInput()`
  `List<MemoryMatch>`
  `getSearchResults()`
  `boolean`
  `isBusy()`
  `boolean`
  `isSearchSelection()`
  `void`
  `navigatableRemoved(Navigatable nav)`
  `void`
  `removeFromTool()`
  Removes this provider from the tool.
  `void`
  `scan(Scanner scanner)`
  Performs a scan on the current results, keeping only the results that match the type of scan.
  `void`
  `search()`
  `void`
  `setSearchCombiner(Combiner combiner)`
  `void`
  `setSearchInput(String input)`
  `void`
  `setSearchSelectionOnly(boolean b)`
  `void`
  `setSettings(SearchSettings settings)`
  `void`
  `showOptions(boolean b)`
  `void`
  `showScanPanel(boolean b)`
  `void`
  `showSearchPanel(boolean b)`

  ### Methods inherited from class ghidra.framework.plugintool.ComponentProviderAdapter

  `getTool`

  ### Methods inherited from class docking.ComponentProvider

  `addLocalAction, addToTool, addToToolbar, adjustFontSize, canBeParent, componentDeactived, componentHidden, componentMadeDisplayable, componentShown, contextChanged, createContext, createContext, getActionContext, getBaseIcon, getContextType, getDefaultWindowPosition, getHelpInfo, getHelpLocation, getHelpObject, getIcon, getInstanceID, getIntraGroupPosition, getLocalActions, getMappedName, getMappedOwner, getName, getOwner, getSubTitle, getTabText, getTitle, getWindowGroup, getWindowSubMenuName, initializeInstanceID, isActive, isFocusedProvider, isInTool, isShowing, isSnapshot, isTransient, isVisible, registerAdjustableFontId, registerProviderNameOwnerChange, removeAllLocalActions, removeLocalAction, requestFocus, resetFontSize, setCustomSubTitle, setCustomTabText, setCustomTitle, setDefaultFocusComponent, setDefaultWindowPosition, setHelpLocation, setIcon, setIntraGroupPosition, setKeyBinding, setSubTitle, setTabText, setTitle, setTransient, setVisible, setWindowGroup, setWindowMenuGroup, toFront, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### MemorySearchProvider

    public MemorySearchProvider(MemorySearchPlugin plugin, Navigatable navigatable, SearchSettings settings, MemorySearchOptions options, SearchHistory history)

- ## Method Details

  - ### setSearchInput

    public void setSearchInput(String input)

  - ### getSearchInput

    public String getSearchInput()

  - ### setSearchSelectionOnly

    public void setSearchSelectionOnly(boolean b)

  - ### getComponent

    public JComponent getComponent()
    Description copied from class: `ComponentProvider`
    Returns the component to be displayed
    Specified by:
      `getComponent` in class `ComponentProvider`
    Returns:
      the component to be displayed

  - ### search

    public void search()

  - ### scan

    public void scan(Scanner scanner)
    Performs a scan on the current results, keeping only the results that match the type of scan. Note: this method is public to facilitate testing.
    Parameters:
      `scanner` - the scanner to use to reduce the results.

  - ### componentActivated

    public void componentActivated()
    Description copied from class: `ComponentProvider`
    Notifies the component provider that it is now the active provider
    Overrides:
      `componentActivated` in class `ComponentProvider`

  - ### closeComponent

    public void closeComponent()
    Description copied from class: `ComponentProvider`
    This is the callback that will happen when the user presses the 'X' button of a provider. Transient providers will be removed from the tool completely. Non-transient providers will merely be hidden.

    Subclasses may override this method to prevent a provider from being closed; for example, if an editor has unsaved changes, then this method could prevent the close from happening.

    Overrides:
      `closeComponent` in class `ComponentProvider`

  - ### removeFromTool

    public void removeFromTool()
    Description copied from class: `ComponentProvider`
    Removes this provider from the tool.
    Overrides:
      `removeFromTool` in class `ComponentProvider`

  - ### contextChanged

    public void contextChanged(ActionContext context)
    Description copied from interface: `DockingContextListener`
    Called when the context changes
    Specified by:
      `contextChanged` in interface `DockingContextListener`
    Parameters:
      `context` - the context

  - ### navigatableRemoved

    public void navigatableRemoved(Navigatable nav)
    Specified by:
      `navigatableRemoved` in interface `NavigatableRemovalListener`

  - ### domainObjectClosed

    public void domainObjectClosed(DomainObject dobj)
    Description copied from interface: `DomainObjectClosedListener`
    Callback indicating that the specified `DomainObject` has been closed.
    Specified by:
      `domainObjectClosed` in interface `DomainObjectClosedListener`
    Parameters:
      `dobj` - domain object

  - ### showOptions

    public void showOptions(boolean b)

  - ### showScanPanel

    public void showScanPanel(boolean b)

  - ### showSearchPanel

    public void showSearchPanel(boolean b)

  - ### isBusy

    public boolean isBusy()

  - ### getSearchResults

    public List<MemoryMatch> getSearchResults()

  - ### getResultsPanel

    public MemorySearchResultsPanel getResultsPanel()

  - ### setSettings

    public void setSettings(SearchSettings settings)

  - ### setSearchCombiner

    public void setSearchCombiner(Combiner combiner)

  - ### isSearchSelection

    public boolean isSearchSelection()

  - ### getByteString

    public String getByteString()

  - ### createContext

    protected ActionContext createContext(Component focusedComponent, Object contextObject)
    Description copied from class: `ComponentProvider`
    A default method for creating an action context for this provider, using the given `context object` and component
    Overrides:
      `createContext` in class `ComponentProvider`
    Parameters:
      `focusedComponent` - the component that is the target of the context being created
      `contextObject` - the provider-specific context object
    Returns:
      the new context