Reputation: 3270
I just downloaded the Scala eclipse IDE but am getting some errors after importing my project
method getTableConfig is defined twice conflicting symbols both originated in file '....'
Here is the sample code, any reason why this error pops up - code compiled successfully though
package com.mavencode.app.config
import java.io.{BufferedReader, File, InputStream, InputStreamReader}
import ...
object ConfigUtil
{
def getTableConfig(configKey:String) (implicit config: Config) : ConnectionConfig = {
val report: Config = config.getConfig(s"tables.$configKey")
val db: Config = config.getConfig(s"db.${report.getString("db")}")
ConnectionConfig(
db.getString("host"),
db.getInt("port"),
db.getString("database"),
similarity.getString("table"),
db.getString("user"),
db.getString("password"),
report.getInt("lowerBound"),
report.getInt("upperBound"),
report.getInt("numPartitions")
)
}
Upvotes: 2
Views: 1046
Reputation: 3270
I think it's a bug in the latest version of Scala IDE I downloaded, I opened my project on an older scala IDE and it worked fine
Bug with this version
Scala IDE build of Eclipse SDK
Build id: 4.5.0-vfinal-2016-12-13T10:59:29Z-Typesafe
Worked on older version
Scala IDE build of Eclipse SDK
Build id: 4.4.1-vfinal-2016-05-04T11:16:00Z-Typesafe
Upvotes: 2
Reputation: 1032
There is a Scala project creating wizard coming with the Scala-ide. This does not work so well with SBT. If you are using SBT you are better off creating the Scala project yourself. You can use Giter8 for that. Here are the Giter8 templates:
https://github.com/foundweekends/giter8/wiki/giter8-templates
Then generate the Eclipse project using the Sbt Eclipse plugin:
https://github.com/typesafehub/sbteclipse
Run
sbt eclipse
Import the existing project into Eclipse
Here is a more detailed description of the process:
Upvotes: 0