Method will be shown automatically with the try catch block in android studio

In Eclipse there is the option to set a method will be created along with try catch block or not.

What will i do get the same thing in android studio.

How i did the thing in eclipse will explained below,

help me to do the above thing in android studio.

Thanks in advance.

Answers


  • Highlight the code
  • Press "Code-> Surround With"
  • In the list, type "try"

There's also a keyboard shortcut, You can get it from your menu.


Need Your Help

CRM 2013: Javascript to cancel a Task does not work when the record is opened from Advanced Find

javascript crm dynamics-crm-2013

We are on CRM 2013. The requirement is to get rid of the 'Close' button completely from the Task form, and then create a new button 'Cancel' to cancel the Task. So when clicking on this button, the...