Question about scala-ide-play2, play sbt-plugin and sbteclipse integration

77 views
Skip to first unread message

Alden Torres

unread,
Mar 8, 2013, 4:45:40 PM3/8/13
to scala-...@googlegroups.com
I'm referring specifically to a recent pull request https://github.com/scala-ide/scala-ide-play2/pull/43 that it's in fact very helpful.

I was looking at the source code of sbteclipse and play sbt-plugin and I can see that sbteclipse is configurable by the means of "transformers" that only apply to the files .classpath and .project and this is enough for sbt-plugin.

The problem is that the *.prefs files are left behind and ideally the preferences of scala-ide-play2 (org.scala-ide.play2.prefs) should be created with the command "eclipse" inside the play prompt.

I think the best way is to modify sbteclipse to be able to extend/attach it a "prefs writer" inside play sbt-plugin.

This modification involve three different related projects and I don't know if the team of sbteclipse will be willing to incorporate a change based on this "idea".

How to proceed?

Luc Bourlier

unread,
Mar 9, 2013, 12:32:31 AM3/9/13
to scala-...@googlegroups.com
Hey Alden,

you are right. I would make sense for sbteclipse to generate the (new) additional file too. And I don't think the sbteclipse "team" would mind to integrate such a change. It is a new feature, and the output should have no impact on the existing configuration files.
And it looks like they already added some support to configure the Scala compiler inside Scala IDE [1]. The required changes should be fairly similar.

The simplest way to start would be to create a ticket on the project and/or send a message to the mailing list stating what you plan to do, then start implementing. You may want to announce your effort on the play mailing list too, if you think you could use some help.
If you open a pull request on sbteclipse, I'll be happy to help review it (add @skyluc in the pull request message).


Luc

Alden Torres

unread,
Mar 10, 2013, 12:04:13 AM3/10/13
to scala-...@googlegroups.com
Hi Luc, thanks for your response.

I can see that there is some kind of support for additional tasks[1], but I didn't have luck adding another.  Do you think this could be another option? A lot of questions about creating a task, btw.

Not sure about adding a generic way to add additional properties. I'm fine with the particular management for .classpath and .project, but adding prefs seems to me like too much of particular cases. I'm just thinking for now

Alden Torres

unread,
Mar 10, 2013, 1:52:00 PM3/10/13
to scala-...@googlegroups.com
Hi Luc, I finally managed to solve the problem with a pre-task: https://github.com/aldenml/Play20/commit/6473718850d3b63a0a44fa8772cb5ea3d0c1faeb

With this solution there is no need to touch sbteclipse, the change is only in sbt-plugin inside play2.

Now I have in sync the templatesImport from Build.scala with the prefs of scala-ide-play2 using the eclipse command in the play prompt.

One thing I notice is that scala-ide-play2 does not pick the prefs file modification in the fly, that's for later :)

Are you in touch with the play team? I'm waiting the dev group approval and reading the CONTRIBUTING.md I foresee a long time to get this accepted.


On Saturday, March 9, 2013 12:32:31 AM UTC-5, Luc Bourlier wrote:

aldenml

unread,
Apr 5, 2013, 8:49:42 AM4/5/13
to scala-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages