[BLUEJ-629] Make code completion for generic types insert <,,>
When you auto-complete a generic type like ArrayList, the name is inserted as if it is the complete type, and focus moved on. As Fabio pointed out, this isn't really right; we should insert ArrayList<> with the cursor in the angle brackets (similarly, Map<,> with comma and cursor before comma). Inserting the angle brackets is straightforward, but we also need to upgrade AssistContent to record and expose knowledge about generic type's type parameters.
Our decision was that as soon as the type slot contains a recognised generic type, we will automatically add the <,,> afterwards, a bit like we already adjust the commas in the method call parameters when we recognise a method name. (Difference being we will add the brackets this time, rather than them already being there.)
Issue metadata
- Issue type: Task
- Priority: Medium