Setting Up Template In IntelliJ

Take the template given in the above code example (just after "import org.apache.commons.lang.StringUtils" but just before "public class NavisSampleUpdateCommodityDescription").

  1. Go to File menu.

  2. Navigate to Settings menu item. Or you can click the  button in the Tool Bar as shown below.

  3. Navigate to ‘File and Code Templates’ on the left panel of ‘IDE Settings’ section.

  4. Choose ‘Java EE’ tab on the ‘File and Code Templates’(right side panel) panel.

  5. Under ‘Groovy’ node you can see two items as ‘GroovyClass.groovy’ and ‘GroovyScript.groovy’.

  6. Now copy and paste the template for the both. You can delete the package header if you don’t want.

  7. Apply and click ‘Ok’ to save your template.