Eclipse : transform static method invocation to a static import
Put the cursor on the method name (asList
) and press Ctrl-Shift-M
.
This is the default keyboard shortcut for the 'Add Import' command. You can also find the command on the 'Source' menu.