sbt / sbt-boilerplate

sbt plugin for generating scala.Tuple/Function related boilerplate code
BSD 2-Clause "Simplified" License
109 stars 19 forks source link

Add a .scala extension to generates files #18

Closed nrinaudo closed 8 years ago

nrinaudo commented 8 years ago

Generated files currently don't have an extension, which seems to confuse IntelliJ when it tries to locate sources. Is there a particular reason for the lack of extension, other than it's not strictly required by SBT?

jrudolph commented 8 years ago

The idea is to name the templates like this: "abc.scala.template". For example, see https://github.com/akka/akka/tree/master/akka-stream/src/main/boilerplate/akka/stream/scaladsl.

On the other hand, you will most likely generate only scala files, so I agree it makes sense to append ".scala" if the file-name without ".template" doesn't have an extension.

nrinaudo commented 8 years ago

Oh yes, that makes a lot of sense, I didn't even think about doing it that way. I feel a bit silly now.

I'm fine with closing this as it is, but if you'd like, I can submit a PR for "append .scala if no extension is found".

jrudolph commented 8 years ago

Yes, I'd take that PR :)

nrinaudo commented 8 years ago

On it. I'll try to get something ready soon, it shouldn't be too complicated.

jrudolph commented 8 years ago

I've already fixed it an hour ago but didn't push the commit yet :)

nrinaudo commented 8 years ago

Oh. And I see you're tackling the autoplugin thing as well. I take it we're due for a release soon? :)

jrudolph commented 8 years ago

Yep, I hope so :)