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:

  1. go settings/preferences > ide settings > live templates > surround.
  2. add new template.
  3. fill in form
    1. the abbreviation used select surround with context menu.
    2. the description appear in surround with context menu.
    3. the $selection$ variable predefined as, guessed it, selected text.
    4. you can add own variables, such $coll$ make template more generic.
    5. set applicable in... of java (or can more exact if want).

how fill out live template dialog

to use it:

  1. select text.
  2. press ctrl+alt+t on windows or ⌥⌘t on mac
    • the surround with context menu appear new template.
  3. press c (since that's first letter of template's abbreviation) select template.

surround context menu



Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -