Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ScalaDocs tags in InitelliJ?

When I type out a method with parameters in IntelliJ then try to add doc tags to it, when I type

/**

I would expect that the @param and @return tags are filled out for me. How can I get that to automatically happen when I type the above

e.g.

   /**
      *
      * @param field1
      * @return String
      */      
    def testMethod(field1:String): String = "hi"

but instead when I do that it does this:

 /**
*/
    def testMethod(field1:String): String = "hi"
like image 410
James Avatar asked Dec 12 '25 20:12

James


1 Answers

It is working in IntelliJ idea v11.1.2 and scala pluggin v0.5.800

Just type /** and then press "return" on top of a function. It generates the following code:

/**
  *
  * @param field1
  * @return
  */      
def testMethod(field1:String): String = "hi"

You can also try to update your scala pluggin, this feature is young.

Edit: There is an open ticket in JetBrains for the doc, but "it seems to be fixed"

http://youtrack.jetbrains.com/issue/SCL-2433#tab=Comments

like image 61
Christopher Chiche Avatar answered Dec 14 '25 11:12

Christopher Chiche