IntelliJ IDEA

39 views
Skip to first unread message

Ian Clarke

unread,
Aug 19, 2013, 9:53:11 AM8/19/13
to swarm-...@googlegroups.com
I've been reacquainting myself with Scala, and acquainting myself with SBT and other tools.

One issue is that since I last hacked on Swarm I've switched from Eclipse to IntelliJ IDEA (which has a nice Scala plugin).

Problem is I'm having trouble persuading it to work with the current source tree.  Are any of you guys using IDEA with the current source tree?

Any tips on getting IDEA to play nice?  I've installed the Scala and SBT plugins.

Ian.

--
Ian Clarke

Paul Schoenfelder

unread,
Aug 20, 2013, 11:06:26 AM8/20/13
to swarm-...@googlegroups.com
I have been, but there is two steps you need to perform before it will work with IDEA:
 
1.) Add the sbt-idea plugin to your ~/.sbt/plugins/build.sbt file. Instructions are at https://github.com/mpeltonen/sbt-idea
 
2.) From the project root directory, issue the "sbt gen-idea" command. This will generate the IDEA project files. Any time you update the Build.scala file, you'll want to re-run this.
 
ALTERNATIVELY
 
You can install the Scala and SBT nightly plugins for IDEA (I'd do this anyway), and Import Project, select the SBT project type, check Auto-Update, and it will do the same thing as the sbt-idea plugin, but automatically update when Build.scala changes.

Ian

unread,
Aug 20, 2013, 11:35:30 AM8/20/13
to swarm-...@googlegroups.com
Ah, nice - I went with the nightly build, thanks!

One more question, it only seemed to import the swarm-core project, not the demos etc.  Any ideas on how to import them also?

Thanks again!

Ian.

Paul Schoenfelder

unread,
Aug 20, 2013, 11:38:23 AM8/20/13
to swarm-...@googlegroups.com
Ah you know what, that's exactly why I have both installed. With multi-project SBT projects (what a mouthful), you have to use the sbt-idea plugin to properly generate the IDEA project files. Last I heard this was on their TODO list, but for now, that's what we have to do with Swarm.


--
You received this message because you are subscribed to a topic in the Google Groups "Swarm Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swarm-discuss/Vc4UMEd-xn0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swarm-discus...@googlegroups.com.
To post to this group, send email to swarm-...@googlegroups.com.
Visit this group at http://groups.google.com/group/swarm-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Ian

unread,
Aug 20, 2013, 1:21:55 PM8/20/13
to swarm-...@googlegroups.com
Gotchya, seems to work now - thanks!
Reply all
Reply to author
Forward
0 new messages