简体   繁体   中英

Is there a way New->Scala Class in intellij can default to creating a case class (vs a regular class)?

When I right-click and follow New->Scala Class, Intellij defaults to creating a new regular class. I'd like it to default to creating a case class.

A small thing... but annoying when creating a lot of new classes.

Is it configurable somewhere?

  1. Open File>Settings and go to Files and Code Templates .
  2. Click on + and add name Scala Case Class , set extension to scala and provide correct template. You might copy template from Scala Class and modify it accordingly. 在此输入图像描述
  3. Click on New > Scala Class . Dialog should have now option Scala Case Class .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM