How to build an eclipse plugin with sbt and sbt-osgi? - eclipse

Is it possible to build an eclipse plugin with a sbt build ?
Once built, do I just drop de jar in the plugin directory of eclipse ?
Update:
sbt-tycho look promising but for sbt 0.7

There is a giter8 template from the scala-ide group to build a scala eclipse plugin using maven
g8 scala-ide/scala-plugin.g8
Update:
Best way to create a plugin is via the plugin developpement environement (PDE). From there you can add the scala nature.

Related

Can not download jars when building scala project with sbteclipse?

As shown in the picture, when I build scala project with sbteclipse and import to eclipse, when changing build.sbt , jars are downloaded to my computer but not to scalaProject. I do not know why. Can someone help me?
scala version: 2.11.8
sbt version: 0.13.15
stbeclipse:5.1.0
I assume that you're using the Scala IDE plugin for Eclipse, correct?
The sbteclipse SBT plugin merely provides a command to generate an Eclipse Scala project from the SBT build. Before using Eclipse, you're supposed to issue the following command (from the command line) to SBT:
sbt eclipse
This should generate the project files for your Eclipse project. After executing this command, you can open your project using Eclipse (with the Scala IDE plugin).
Note that, at present, the Scala IDE Eclipse plugin does not support SBT build files. That is, if you change your SBT build file, then Eclipse will be none the wiser, until you re-run the above command.
You might want to consider switching to IntelliJ IDEA (instead of Eclipse) which has a full-featured Scala plugin that fully supports SBT builds, including downloading any dependencies. For my money (both IDEs are free) IntelliJ is light-years ahead of Eclipse for Scala development.

How to use sbt eclipse plugin to put all dependencies in eclipse Library Folder ClasspathContainer?

After I run activator eclipse command and import project into eclipse, we can see all dependencies be separated. I want to put all dependencies(jar) into a Library Folder ClasspathContainer when i run activator eclipse. So how to do it?
Just upgrade eclipse for the latest version.

Is there a ScalaTest Plugin for Eclipse Luna and Scala IDE Lithium?

Trying to find the ScalaTest plugin for use with Eclipse Luna and Scala IDE for Eclipse 4.0.0 (aka Lithium). Currently using Milestone 2 of the Scala IDE for Eclipse Lithium plugin.
The ScalaTest plugin used to be part of the Scala IDE for Eclipse plugin (appeared on the list and you could check the box it to install--Scala IDE for Eclipse is supposed to be an ecosystem of plugins, ScalaTest being one of them). It doesn't appear to be there any more.
It's not on the list,
When I check "Installation Details" it doesn't appear either, and
Test configurations don't appear under "Run As..."
But there is mention of Luna in the ScalaTest plugin Github site for the scalatest plugin (https://github.com/scalatest/scalatest-eclipse-plugin), which is supposed to be part of the Scala IDE for Eclipse ecosystem.
The tests run fine from the SBT command line. So I know the ScalaTest jar file is in the classpath and is of a compatible version for my project. The ScalaTest jar file appears as an external jar file in my project in Eclipse, and the tests compile in Eclipse. Other Scala IDE for Eclipse functions seem to work correctly.
System Configuration:
Eclipse Version: Luna (4.4.0),
Scala IDE for Eclipse Version: Lithium 4.0.0 Milestone 2, for Luna and Scala 2.11.1 (download site http://download.scala-ide.org/sdk/lithium/e44/scala211/dev/site)
Java Version: Java 1.8_05,
Scala Version: 2.11.1,
Build Tool: SBT 0.13.5, running under Java 1.8_05,
ScalaTest Version: scalatest_2.11-2.2.0.jar (copied into the lib directory of my project)
My Eclipse project file is generated by SBT using the eclipse SBT command, and loaded into Eclipse using the standard "Import->Existing Projects Into Workspace..." method. The build.sbt file is a single line reading scalaVersion := "2.11.1".
Is there a ScalaTest plugin for Eclipse Luna and Scala IDE for Eclipse 4.0 (Lithium)? If so, where do I go about finding it?
This is a version of the Scala IDE that works with Eclipse Luna (version 4.4).
http://download.scala-ide.org/sdk/lithium/e44/scala211/dev/site

How to Point Intellij at SBT Libraries for Scala Project

I'm trying to use this example: https://github.com/spray/spray-template for a Spray project, however I can't figure out how to point Intellij at the dependencies downloaded via SBT.
Any suggestions?
If you're using IntelliJ version 13, you need only the Scala plug-in (which has built-in SBT support); just open the project by selecting the build.sbt file.
Use this SBT plugin to generate Intellij IDEA project files: https://github.com/mpeltonen/sbt-idea
Add SBT plugin for creating IntelliJ IDEA projects in your ~/.sbt/0.xx/plugins/build.sbt or PROJECT_DIR/project/plugins.sbt. Use gen-idea command to create an IntelliJ project and open the project in IntelliJ. That should be it.

how to load activator in intellij with sbt plugin

I'm a novice on sbt.
I looked at activator project
Now I see it uses sbt and there are sbt and scala files under the project directory.
But i was sure there would also be a main sbt (like main pom) in main directory where I can open it in intellij with sbt plugin and it would open all projects in the IDE.
Can anyone please let me know how to open this project in intellij with all its dependencies? Most probably with intellij sbt plugin because it uses sbt (i mean like in maven would bring all sub dependencies)
I never used intellij sbt plugin.
But you could try to add the sbt idea plugin to the plugins.sbt file.
Then you can generate the intellij idea project files with the gen-idea task.