Search code examples
javaeclipseideeclipse-rcpcode-completion

Eclipse shortcut to accept type proposal with appended same-name lowercase starting variable


Is there a way, to create a attribute/method parameter/local variable by type, with same name as type starting with lowercase letter?

Example:

  1. Redi [ctrl+space], and "RedirectAttributes" type is proposed

  2. [magic shortcut]

  3. IDE inserts: RedirectAttributes redirectAttributes

If not, where should I start to implement such code completion plugin?


Solution

  • Press Ctrl+space after the type is added.

    PrintWriter -> Ctrl+space proposes printWriter
    

    If a different shortcut is needed, then you would have to implement it. This link explains how to provide a custom keyboard shortcut.