mpeltonen/sbt-idea — Issue #135: Totally breaks on mounted devices due to absolute paths
Author: gerdriesselmann
Created: 2012-02-25 03:19:54+00:00
State: open

What it does:

All the gen-idea commands generates is a project named "default-d8b7ce" which contains the managed libraries but nothing else.

Expected:

1.) The project is named similar to the sbt name

2.) In Idea I'm able to browse the .scala files and packages beneath /src/main/scala and /test/main/scala

Reason:

I figured out that the absolute path to the project was set as Idea ContentRoot. However, since I'm running Idea on another computer (the code actually is on a test server), and the directory is mounted there, the content root does not match. This was no problem with the 0.7 version.

When comparing the files generated by the plugin and the ones Idea itself writes, I noticed that Idea simply uses $MODULE_DIR$ and paths relative to it.

$MODULE_DIR$ identifies the location of the .iml file, which happen to be .idea. src/main/scala then is defined as $MODULE_DIR$/../src/main/scala.

The plugin on the other hand uses the absolute paths everywhere, which breaks.