Interface CodeViewerService

All Known Subinterfaces:
DebuggerListingService

public interface CodeViewerService
Service provided by a plugin that shows the Code Viewer listing for a Program. The service allows other plugins to add components and actions local to the Code Viewer.
  • Method Details

    • addOverviewProvider

      void addOverviewProvider(ListingOverviewProvider overviewProvider)
      Add a provider that shows an overview of the program.

      Note: the provider passed here will only appear in the primary code viewer, not in any of the snapshot windows. to have an overview provider appear in all windows, you must create a ListingOverviewProviderService implementation instead of using this method.

      Parameters:
      overviewProvider - provider to add
    • removeOverviewProvider

      void removeOverviewProvider(ListingOverviewProvider overviewProvider)
      Remove a provider that shows an overview of the program.
      Parameters:
      overviewProvider - provider to remove
      See Also:
    • addMarginProvider

      @Deprecated(since="12.1", forRemoval=true) void addMarginProvider(ListingMarginProvider marginProvider)
      Deprecated, for removal: This API element is subject to removal in a future version.
      clients that wish to be margin providers should now create a ListingMarginProviderService.
      Add a provider that shows markers in a program for the portion that is visible.
      Parameters:
      marginProvider - provider to add
    • removeMarginProvider

      @Deprecated(since="12.1", forRemoval=true) void removeMarginProvider(ListingMarginProvider marginProvider)
      Deprecated, for removal: This API element is subject to removal in a future version.
      clients that wish to be margin providers should now create a ListingMarginProviderService.
      Remove a provider that shows markers in a program for the portion that is visible.
      Parameters:
      marginProvider - provider to remove
    • addLocalAction

      void addLocalAction(DockingAction action)
      Add an action that is local to the Code Viewer.
      Parameters:
      action - local action to add
    • removeLocalAction

      void removeLocalAction(DockingAction action)
      Remove the local action from the Code Viewer.
      Parameters:
      action - local action to remove
    • addProgramDropProvider

      void addProgramDropProvider(ProgramDropProvider provider)
      Add a provider that will be notified for drag and drop actions.
      Parameters:
      provider - for drag and drop
    • addButtonPressedListener

      void addButtonPressedListener(ButtonPressedListener listener)
      Add a listener that is notified when a mouse button is pressed.
      Parameters:
      listener - the listener
    • removeButtonPressedListener

      void removeButtonPressedListener(ButtonPressedListener listener)
      Remove the button pressed listener.
      Parameters:
      listener - the listener
    • setHighlightProvider

      void setHighlightProvider(ListingHighlightProvider provider, Program program)
      Set the highlight provider. The existing provider is replaced with the given provider.
      Parameters:
      provider - The provider to set.
      program - The program with which to associate the given provider.
    • removeHighlightProvider

      void removeHighlightProvider(ListingHighlightProvider provider, Program program)
      Remove the highlight provider.
      Parameters:
      provider - the provider to remove.
      program - the program associated with the given provider.
    • setListingPanel

      void setListingPanel(ListingPanel listingPanel)
      Set a listing panel on the code viewer. The given listing panel is a secondary listing panel to be displayed along with the primary listing panel.
      Parameters:
      listingPanel - the panel to add.
    • setCoordinatedListingPanelListener

      void setCoordinatedListingPanelListener(CoordinatedListingPanelListener listener)
      Set the CoordinatedListingPanelListener for this listing.
      Parameters:
      listener - the listener to add.
    • removeListingPanel

      void removeListingPanel(ListingPanel listingPanel)
      Remove the given listing panel from the code viewer.
      Parameters:
      listingPanel - the listing panel
    • getView

      AddressSetView getView()
      Returns:
      the current set of addresses that the CodeViewer is showing.}
    • goTo

      boolean goTo(ProgramLocation loc, boolean centerOnScreen)
      Commands the code viewer to position the cursor at the given location.
      Parameters:
      loc - the location at which to position the cursor.
      centerOnScreen - if true, the location will be placed in the center of the display window
      Returns:
      true if the location exists.
    • getFieldPanel

      @Deprecated(since="12.1", forRemoval=true) FieldPanel getFieldPanel()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use getListingPanel() to get the field panel
      Returns the current field panel.
      Returns:
      the current field panel.
    • getAddressIndexMap

      AddressIndexMap getAddressIndexMap()
      Returns the current address index map..
      Returns:
      the current address index map.
    • getFormatManager

      FormatManager getFormatManager()
      Returns the format manager..
      Returns:
      the format manager.
    • setNorthComponent

      void setNorthComponent(JComponent comp)
      Place a component in the North area of the CodeViewer.
      Parameters:
      comp - component to place in the North area of the CodeViewer
    • updateDisplay

      void updateDisplay()
      tells the browser to rebuild the display.
    • getListingModel

      ListingModel getListingModel()
      Gets the current ListingLayoutModel;
      Returns:
      the current ListingLayoutModel;
    • getNavigatable

      Navigatable getNavigatable()
      Gets the navigatable for the code viewer service.
      Returns:
      the navigatable for the code viewer service.
    • getListingPanel

      ListingPanel getListingPanel()
      Get the main Listing panel for the code viewer service.
      Returns:
      the listing panel.
    • getCurrentFieldTextSelection

      String getCurrentFieldTextSelection()
      Returns a String representing the current character-based selection of the currently selected field. If there is no selection, or if there is a ProgramSelection (which spans multiple fields), then this method will return null.

      To know which field contains the selection,

      Returns:
      the currently selected text within a given field
    • getCurrentField

      Field getCurrentField()
      Returns the current field under the cursor.
      Returns:
      the current field under the cursor.
    • getCurrentLocation

      ProgramLocation getCurrentLocation()
      Returns the current cursor location.
      Returns:
      the current cursor location.
    • getCurrentSelection

      ProgramSelection getCurrentSelection()
      Returns the current program selection (which crosses multiple fields).
      Returns:
      the current program selection.
    • addListingDisplayListener

      void addListingDisplayListener(AddressSetDisplayListener listener)
      Adds a listener to be notified when the set of visible addresses change.
      Parameters:
      listener - the listener to be notified;
    • removeListingDisplayListener

      void removeListingDisplayListener(AddressSetDisplayListener listener)
      Removes listener from being notified when the set of visible addresses change.
      Parameters:
      listener - the listener to be notified;
    • requestFocus

      void requestFocus()
      Request that the main connected Listing view gets focus