Package org.fife.ui.rsyntaxtextarea

## Class RSyntaxTextAreaEditorKit.DumbCompleteWordAction

- java.lang.Object
- - javax.swing.AbstractAction
  - - javax.swing.text.TextAction
    - - org.fife.ui.rtextarea.RecordableTextAction
      - - org.fife.ui.rtextarea.RTextAreaEditorKit.DumbCompleteWordAction
        - - org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaEditorKit.DumbCompleteWordAction

- All Implemented Interfaces:
    `ActionListener`, `Serializable`, `Cloneable`, `EventListener`, `Action`
  Enclosing class:
    RSyntaxTextAreaEditorKit

      public static class RSyntaxTextAreaEditorKit.DumbCompleteWordAction
      extends RTextAreaEditorKit.DumbCompleteWordAction

  Overridden to use the programming language RSTA is displaying when computing words to complete.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class javax.swing.AbstractAction

      `changeSupport, enabled`

    - ### Fields inherited from interface javax.swing.Action

      `ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DumbCompleteWordAction()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected int` | `getPreviousWord​(RTextArea textArea, int offs)` |
    `protected int` | `getWordEnd​(RTextArea textArea, int offs)` |
    `protected int` | `getWordStart​(RTextArea textArea, int offs)` |
    `protected boolean` | `isAcceptablePrefix​(String prefix)` | Overridden to not suggest word completions if the text right before the caret contains non-word characters, such as '/' or '%'.

    - ### Methods inherited from class org.fife.ui.rtextarea.RTextAreaEditorKit.DumbCompleteWordAction

      `actionPerformedImpl, getMacroID`

    - ### Methods inherited from class org.fife.ui.rtextarea.RecordableTextAction

      `actionPerformed, getAccelerator, getDescription, getIcon, getMnemonic, getName, isRecordable, setAccelerator, setMnemonic, setMnemonic, setName, setProperties, setRecordable, setShortDescription`

    - ### Methods inherited from class javax.swing.text.TextAction

      `augmentList, getFocusedComponent, getTextComponent`

    - ### Methods inherited from class javax.swing.AbstractAction

      `addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled`

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

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

    - ### Methods inherited from interface javax.swing.Action

      `accept`

- - ### Constructor Detail

    - #### DumbCompleteWordAction

          public DumbCompleteWordAction()

  - ### Method Detail

    - #### getPreviousWord

          protected int getPreviousWord​(RTextArea textArea,
                                        int offs)
                                 throws BadLocationException

      Overrides:
        `getPreviousWord` in class `RTextAreaEditorKit.DumbCompleteWordAction`
      Throws:
        `BadLocationException`

    - #### getWordEnd

          protected int getWordEnd​(RTextArea textArea,
                                   int offs)
                            throws BadLocationException

      Overrides:
        `getWordEnd` in class `RTextAreaEditorKit.DumbCompleteWordAction`
      Throws:
        `BadLocationException`

    - #### getWordStart

          protected int getWordStart​(RTextArea textArea,
                                     int offs)
                              throws BadLocationException

      Overrides:
        `getWordStart` in class `RTextAreaEditorKit.DumbCompleteWordAction`
      Throws:
        `BadLocationException`

    - #### isAcceptablePrefix

          protected boolean isAcceptablePrefix​(String prefix)

      Overridden to not suggest word completions if the text right before the caret contains non-word characters, such as '/' or '%'.
      Overrides:
        `isAcceptablePrefix` in class `RTextAreaEditorKit.DumbCompleteWordAction`
      Parameters:
        `prefix` - The prefix characters before the caret.
      Returns:
        Whether the prefix could be part of a "word" in the context of the text area's current content.