[MGNLGROOVY-128] Add basic autocompletion feature in console Created: 19/Oct/14  Updated: 24/Oct/14  Resolved: 23/Oct/14

Status: Closed
Project: Magnolia Groovy Module
Component/s: console
Affects Version/s: None
Fix Version/s: 2.3.1

Type: New Feature Priority: Neutral
Reporter: Federico Grilli Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Release notes required:
Yes

 Description   

Adding such a feature should be fairly easy as the terminal plugin supports tab completion http://terminal.jcubic.pl/api_reference.php
Here are all the possible options

  • Hitting tab once will try to complete the current command by looking at the available variables int the current Groovy script context
  • Hitting tab twice will show all the available options, if any
  • To enable basic method name completion, if available, type . (dot) and hit tab


 Comments   
Comment by Federico Grilli [ 19/Oct/14 ]

For the release notes/docu:
Use cases:

  • discover available variables in script context. By default ctx=MgnlGroovyConsoleContext (a special instance of Magnolia's Context) is always available
    • hit tab twice
  • autocomplete available variables in script context
    • start writing a variable name and hit tab
  • discover/autocomplete available method names, if any, on a context variable
    • type . (dot) after the variable and hit tab once (autocomplete) or twice (discover).
Generated at Mon Feb 12 05:55:51 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.