Automatic organization of imports broken
This happens with build 2.1.0.nightly-2_09-201201160525-28d3790.
I have the preference (Scala : Organize Imports : collapse into single import statement) selected.
I also have the preference (Java : Editor : Save Actions : Organize imports) selected.
I create a Scala file with,
When I save the file I expect to see,
Instead, the imports statements are not changed.
Also, when I manually organize the imports, the import statements are not changed.
Assume I add another import from the same package, for example,
When I save the file, the import statements are not changed.
However, when I manually organize the import statements, the file becomes,
The imports are not automatically organized when the file is saved.
The imports are not correctly organized when manually organized.
I have the preference (Scala : Organize Imports : collapse into single import statement) selected.
I also have the preference (Java : Editor : Save Actions : Organize imports) selected.
I create a Scala file with,
import scala.util.DynamicVariable
import scala.util.Random
trait Bogus {
def a: Random
def b: DynamicVariable[_]
}
When I save the file I expect to see,
import scala.util.{ DynamicVariable, Random }
trait Bogus {
def a: Random
def b: DynamicVariable[_]
}
Instead, the imports statements are not changed.
Also, when I manually organize the imports, the import statements are not changed.
Assume I add another import from the same package, for example,
import scala.util.DynamicVariable
import scala.util.MurmurHash
import scala.util.Random
trait Bogus {
def a: Random
def b: DynamicVariable[_]
def c: MurmurHash[_]
}
When I save the file, the import statements are not changed.
However, when I manually organize the import statements, the file becomes,
import scala.util.{MurmurHash, DynamicVariable}
import scala.util.Random
trait Bogus {
def a: Random
def b: DynamicVariable[_]
def c: MurmurHash[_]
}
The imports are not automatically organized when the file is saved.
The imports are not correctly organized when manually organized.
Leave a comment
on 2012-01-18 11:12 *
By Mirko Stocker
I've fixed the problem with the incorrectly organized imports, but I'm waiting with the Save Action until 2.1, where the Scala IDE will get its own editor and separate preferences.
on 2012-05-07 02:25 *
By Mirco Dotta
Type set to Defect
Component changed from Eclipse to Refactoring
This ticket should splitted into two.
I've created a separate ticket for the save action.
on 2012-07-30 04:48 *
By Mirco Dotta
Fixed in version set to 2.1.0-m2
Version changed from 2.0.0-final-29 to 2.0.1-final-29
Eclipse version changed from Helios to All
Milestone set to Helium M2