Class CustomFindReplaceAction

  • All Implemented Interfaces:
    org.eclipse.jface.action.IAction, org.eclipse.ui.texteditor.IUpdate

    public class CustomFindReplaceAction
    extends org.eclipse.ui.texteditor.FindReplaceAction
    Custom extension of FindReplaceAction that provides word under cursor (if present) in the ISourceViewer to Find/Replace dialog's combo the same way as selected text
    • Field Summary

      • Fields inherited from interface org.eclipse.jface.action.IAction

        AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()
      Makes custom text selection on the underlying control to insert it into Find/Replace dialog and runs super method implementation
      • Methods inherited from class org.eclipse.ui.texteditor.FindReplaceAction

        update
      • Methods inherited from class org.eclipse.ui.texteditor.ResourceAction

        getString, initialize, setHelpContextId
      • Methods inherited from class org.eclipse.jface.action.Action

        convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
      • Methods inherited from class org.eclipse.jface.action.AbstractAction

        addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
      • Methods inherited from class org.eclipse.core.commands.common.EventManager

        addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
    • Constructor Detail

      • CustomFindReplaceAction

        public CustomFindReplaceAction​(org.eclipse.jface.text.source.ISourceViewer viewer,
                                       ResourceBundle bundle,
                                       org.eclipse.jface.text.IFindReplaceTarget target)
        Constructor for CustomFindReplaceAction.
        Parameters:
        viewer - the ISourceViewer underlying control, can't be null
        bundle - the ResourceBundle instance, containing dialog's messages, can't be null
        target - the IFindReplaceTarget instance, created by the underlying control, can't be null
      • CustomFindReplaceAction

        public CustomFindReplaceAction​(org.eclipse.jface.text.source.ISourceViewer viewer,
                                       org.eclipse.ui.IWorkbenchPart parent,
                                       ResourceBundle bundle)
        Constructor for CustomFindReplaceAction.
        Parameters:
        viewer - the ISourceViewer underlying control, can't be null
        parent - the IWorkbenchPart parent workbench control, can't be null
        bundle - the ResourceBundle instance, containing dialog's messages, can't be null
    • Method Detail

      • run

        public void run()
        Makes custom text selection on the underlying control to insert it into Find/Replace dialog and runs super method implementation
        Specified by:
        run in interface org.eclipse.jface.action.IAction
        Overrides:
        run in class org.eclipse.ui.texteditor.FindReplaceAction