java - IntelliJ shortcut refactor object to list of objects -
lets have method signature:
public string get(){};
is there shortcut in intellij highlight string , surround list<> can following:
public list<string> get(){};
you can make own surround live template:
- go
settings/preferences > ide settings > live templates > surround
. - add new template.
- fill in form
- the abbreviation used select
surround with
context menu. - the description appear in
surround with
context menu. - the
$selection$
variable predefined as, guessed it, selected text. - you can add own variables, such
$coll$
make template more generic. - set
applicable in...
of java (or can more exact if want).
- the abbreviation used select
to use it:
- select text.
- press ctrl+alt+t on windows or ⌥⌘t on mac
- the
surround with
context menu appear new template.
- the
- press c (since that's first letter of template's abbreviation) select template.
- intellij blog post feature: "surround with..."
Comments
Post a Comment