typesafehub/sbteclipse — pull request #124 by JamesEarlDouglas (2012-07-21 23:57:25+00:00)
Title: add support for linked folders in Eclipse

Eclipse has support for including code from folders external to a project directory, by creating a "linked folder" and adding a classpath entry relative to that linked folder. For example, the following Eclipse configuration will allow usage of */path/to/alternate/location/sources/common/src/main/java* as an Eclipse source folder:

*.project:*
```xml

src-common
2
/path/to/alternate/location/sources/common

```

*.classpath:*
```xml

```

The current version of sbteclipse blows up when trying to handle external folders such as this, because they can't be relativized to the current project directory. This pull request adds support for defining linked folders, against which sbteclipse will attempt to map external source paths.

To use this feature, the new setting `linkedFolders` is used in conjunction with external unmanaged source paths:

```scala
EclipseKeys.linkedFolders := Seq( ("src-common", file("/") / "ext-path" / "java-common") ),
unmanagedSourceDirectories in Compile ++= Seq( file("/") / "ext-path" / "java-common" / "src" / "main" / "java" )
```