NotImplementedError for Annotated
I get the following exception when I call organize imports for ScalaSourceViewerConfiguration:
Old error:
java.lang.RuntimeException: Not implemented! Annotated
at scala.sys.package$.error(package.scala:27)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.default(TreePrintingTraversals.scala:87)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.default(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.Annotated(TreePrintingTraversals.scala:125)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.Annotated(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:61)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.common.SilentTracing$class.context(tracing.scala:99)
at scala.tools.refactoring.MultiStageRefactoring.context(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.dispatchToPrinter(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.dispatchToPrinter(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.print(SourceGenerator.scala:160)
at scala.tools.refactoring.MultiStageRefactoring.print(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.CommonPrintUtils$class.typeToString(CommonPrintUtils.scala:32)
at scala.tools.refactoring.MultiStageRefactoring.typeToString(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.PrettyPrinter$TypePrinters$class.TypeTree(PrettyPrinter.scala:294)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.TypeTree(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.TypeTree(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:60)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.common.SilentTracing$class.context(tracing.scala:99)
at scala.tools.refactoring.MultiStageRefactoring.context(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.dispatchToPrinter(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.dispatchToPrinter(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.print(SourceGenerator.scala:160)
at scala.tools.refactoring.MultiStageRefactoring.print(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.printSingleTree(TreePrintingTraversals.scala:192)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.printSingleTree(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.p(TreePrintingTraversals.scala:159)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.p(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.PrettyPrinter$TypePrinters$class.Typed(PrettyPrinter.scala:298)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.Typed(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:51)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.common.SilentTracing$class.context(tracing.scala:99)
at scala.tools.refactoring.MultiStageRefactoring.context(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.dispatchToPrinter(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.dispatchToPrinter(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.print(SourceGenerator.scala:160)
at scala.tools.refactoring.MultiStageRefactoring.print(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.printSingleTree(TreePrintingTraversals.scala:192)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.printSingleTree(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.p(TreePrintingTraversals.scala:159)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.p(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.PrettyPrinter$PatternMatchingPrinters$class.Match(PrettyPrinter.scala:187)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.Match(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:46)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.common.SilentTracing$class.context(tracing.scala:99)
at scala.tools.refactoring.MultiStageRefactoring.context(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.dispatchToPrinter(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.dispatchToPrinter(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.print(SourceGenerator.scala:160)
at scala.tools.refactoring.MultiStageRefactoring.print(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.printSingleTree(TreePrintingTraversals.scala:192)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.printSingleTree(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.p(TreePrintingTraversals.scala:159)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.p(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.PrettyPrinter$FunctionPrinters$class.Function(PrettyPrinter.scala:368)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.Function(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:42)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.common.SilentTracing$class.context(tracing.scala:99)
at scala.tools.refactoring.MultiStageRefactoring.context(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.dispatchToPrinter(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.dispatchToPrinter(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.print(SourceGenerator.scala:160)
at scala.tools.refactoring.MultiStageRefactoring.print(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.printSingleTree(TreePrintingTraversals.scala:192)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.printSingleTree(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$2.apply(TreePrintingTraversals.scala:280)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$2.apply(TreePrintingTraversals.scala:278)
at scala.collection.immutable.List$$anonfun$foldRight$1.apply(List.scala:397)
at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
at scala.collection.immutable.List.foldLeft(List.scala:84)
at scala.collection.immutable.List.foldRight(List.scala:397)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.printManyTrees(TreePrintingTraversals.scala:278)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.printManyTrees(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.pp(TreePrintingTraversals.scala:172)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.pp(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.PrettyPrinter$MethodCallPrinters$class.Apply(PrettyPrinter.scala:236)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.Apply(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:53)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.common.SilentTracing$class.context(tracing.scala:99)
at scala.tools.refactoring.MultiStageRefactoring.context(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.dispatchToPrinter(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.dispatchToPrinter(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.print(SourceGenerator.scala:160)
at scala.tools.refactoring.MultiStageRefactoring.print(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.printSingleTree(TreePrintingTraversals.scala:192)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.printSingleTree(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.p(TreePrintingTraversals.scala:159)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.p(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.PrettyPrinter$MethodCallPrinters$class.Select(PrettyPrinter.scala:211)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.Select(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:57)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.common.SilentTracing$class.context(tracing.scala:99)
at scala.tools.refactoring.MultiStageRefactoring.context(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.dispatchToPrinter(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.dispatchToPrinter(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.print(SourceGenerator.scala:160)
at scala.tools.refactoring.MultiStageRefactoring.print(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.generate(SourceGenerator.scala:89)
at scala.tools.refactoring.MultiStageRefactoring.generate(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.createText(SourceGenerator.scala:78)
at scala.tools.refactoring.MultiStageRefactoring.createText(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$RemoveUnused.scala$tools$refactoring$implementations$OrganizeImports$InnerImports$RemoveUnused$$asText(OrganizeImports.scala:476)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$RemoveUnused$$anonfun$allSelects$1.apply(OrganizeImports.scala:497)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$RemoveUnused$$anonfun$allSelects$1.apply(OrganizeImports.scala:497)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
at scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:45)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)
at scala.collection.AbstractTraversable.map(Traversable.scala:104)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$RemoveUnused.allSelects(OrganizeImports.scala:497)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$RemoveUnused.<init>(OrganizeImports.scala:500)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$$anon$3.transform(OrganizeImports.scala:553)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$$anon$3.transform(OrganizeImports.scala:548)
at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1363)
at scala.reflect.internal.Trees$$anonfun$itransform$2.apply(Trees.scala:1361)
at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
at scala.reflect.internal.Trees$class.itransform(Trees.scala:1360)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$$anon$3.transform(OrganizeImports.scala:560)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$$anon$3.transform(OrganizeImports.scala:548)
at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
at scala.collection.immutable.List.loop$1(List.scala:173)
at scala.collection.immutable.List.mapConserve(List.scala:189)
at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
at scala.reflect.internal.Trees$class.itransform(Trees.scala:1404)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$$anon$3.transform(OrganizeImports.scala:560)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$$anon$3.transform(OrganizeImports.scala:548)
at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2563)
at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1408)
at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:1407)
at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
at scala.reflect.internal.Trees$class.itransform(Trees.scala:1406)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$$anon$3.transform(OrganizeImports.scala:560)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$$anon$3.transform(OrganizeImports.scala:548)
at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2589)
at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:2587)
at scala.collection.immutable.List.loop$1(List.scala:173)
at scala.collection.immutable.List.mapConserve(List.scala:189)
at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2587)
at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:1426)
at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2600)
at scala.reflect.internal.Trees$class.itransform(Trees.scala:1425)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$$anon$3.transform(OrganizeImports.scala:560)
at scala.tools.refactoring.implementations.OrganizeImports$InnerImports$.organizeImportsInMethodBlocks(OrganizeImports.scala:562)
at scala.tools.refactoring.implementations.OrganizeImports$$anonfun$20$$anonfun$apply$4.applyOrElse(OrganizeImports.scala:468)
at scala.tools.refactoring.implementations.OrganizeImports$$anonfun$20$$anonfun$apply$4.applyOrElse(OrganizeImports.scala:466)
at scala.PartialFunction$Lifted.apply(PartialFunction.scala:223)
at scala.PartialFunction$Lifted.apply(PartialFunction.scala:219)
at scala.tools.refactoring.transformation.Transformations$$anon$1.apply(Transformations.scala:67)
at scala.tools.refactoring.transformation.Transformations$$anon$1.apply(Transformations.scala:66)
at scala.Option.flatMap(Option.scala:171)
at scala.tools.refactoring.transformation.Transformations$Transformation$$anon$7.apply(Transformations.scala:42)
at scala.tools.refactoring.transformation.Transformations$Transformation$$anon$5.apply(Transformations.scala:49)
at scala.tools.refactoring.Refactoring$class.transformFile(Refactoring.scala:41)
at scala.tools.refactoring.MultiStageRefactoring.transformFile(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.implementations.OrganizeImports.perform(OrganizeImports.scala:471)
at scala.tools.refactoring.implementations.OrganizeImports.perform(OrganizeImports.scala:79)
at org.scalaide.refactoring.internal.ScalaIdeRefactoring$$anonfun$6$$anonfun$7.apply(ScalaIdeRefactoring.scala:177)
at org.scalaide.refactoring.internal.ScalaIdeRefactoring$$anonfun$6$$anonfun$7.apply(ScalaIdeRefactoring.scala:177)
at scala.tools.nsc.util.InterruptReq.execute(InterruptReq.scala:26)
at scala.tools.nsc.interactive.Global$$anonfun$pollForWork$1.apply$mcV$sp(Global.scala:457)
at scala.util.control.Breaks.breakable(Breaks.scala:38)
at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:431)
at scala.tools.nsc.interactive.PresentationCompilerThread.run(PresentationCompilerThread.scala:22)
Old error:
2015-05-28 20:54:49,844 ERROR [main] - org.scala-ide.sdt.core - org.scala-ide.sdt.core - org.scala-ide.sdt.core - 0 - Throwable during asyncExec
java.lang.RuntimeException: Not implemented! ImportSelectorTree
at scala.sys.package$.error(package.scala:27)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.default(TreePrintingTraversals.scala:87)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.default(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.ImportSelectorTree(TreePrintingTraversals.scala:137)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.ImportSelectorTree(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:73)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.common.SilentTracing$class.context(tracing.scala:69)
at scala.tools.refactoring.MultiStageRefactoring.context(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.dispatchToPrinter(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.sourcegen.PrettyPrinter$prettyPrinter$.dispatchToPrinter(PrettyPrinter.scala:20)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.print(SourceGenerator.scala:159)
at scala.tools.refactoring.MultiStageRefactoring.print(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.printSingleTree(TreePrintingTraversals.scala:192)
at scala.tools.refactoring.sourcegen.ReusingPrinter$reusingPrinter$.printSingleTree(ReusingPrinter.scala:18)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$printManyTrees$1.apply(TreePrintingTraversals.scala:268)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$printManyTrees$1.apply(TreePrintingTraversals.scala:267)
at scala.collection.immutable.List.map(List.scala:273)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.printManyTrees(TreePrintingTraversals.scala:267)
at scala.tools.refactoring.sourcegen.ReusingPrinter$reusingPrinter$.printManyTrees(ReusingPrinter.scala:18)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.pp(TreePrintingTraversals.scala:172)
at scala.tools.refactoring.sourcegen.ReusingPrinter$reusingPrinter$.pp(ReusingPrinter.scala:18)
at scala.tools.refactoring.sourcegen.ReusingPrinter$ImportPrinters$class.Import(ReusingPrinter.scala:689)
at scala.tools.refactoring.sourcegen.ReusingPrinter$reusingPrinter$.Import(ReusingPrinter.scala:18)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:32)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.common.SilentTracing$class.context(tracing.scala:69)
at scala.tools.refactoring.MultiStageRefactoring.context(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.dispatchToPrinter(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.sourcegen.ReusingPrinter$reusingPrinter$.dispatchToPrinter(ReusingPrinter.scala:44)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.print(SourceGenerator.scala:157)
at scala.tools.refactoring.MultiStageRefactoring.print(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.printSingleTree(TreePrintingTraversals.scala:192)
at scala.tools.refactoring.sourcegen.ReusingPrinter$reusingPrinter$.printSingleTree(ReusingPrinter.scala:18)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$printManyTrees$1.apply(TreePrintingTraversals.scala:268)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$printManyTrees$1.apply(TreePrintingTraversals.scala:267)
at scala.collection.immutable.List.map(List.scala:277)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.printManyTrees(TreePrintingTraversals.scala:267)
at scala.tools.refactoring.sourcegen.ReusingPrinter$reusingPrinter$.printManyTrees(ReusingPrinter.scala:18)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.pp(TreePrintingTraversals.scala:172)
at scala.tools.refactoring.sourcegen.ReusingPrinter$reusingPrinter$.pp(ReusingPrinter.scala:18)
at scala.tools.refactoring.sourcegen.ReusingPrinter$PackagePrinters$class.PackageDef(ReusingPrinter.scala:744)
at scala.tools.refactoring.sourcegen.ReusingPrinter$reusingPrinter$.PackageDef(ReusingPrinter.scala:18)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:25)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$$anonfun$dispatchToPrinter$1.apply(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.common.SilentTracing$class.context(tracing.scala:69)
at scala.tools.refactoring.MultiStageRefactoring.context(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.TreePrintingTraversals$TreePrinting$class.dispatchToPrinter(TreePrintingTraversals.scala:18)
at scala.tools.refactoring.sourcegen.ReusingPrinter$reusingPrinter$.dispatchToPrinter(ReusingPrinter.scala:44)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.print(SourceGenerator.scala:157)
at scala.tools.refactoring.MultiStageRefactoring.print(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.generate(SourceGenerator.scala:89)
at scala.tools.refactoring.MultiStageRefactoring.generate(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.SourceGenerator$$anonfun$generateFragmentsFromTrees$4.apply(SourceGenerator.scala:118)
at scala.tools.refactoring.sourcegen.SourceGenerator$$anonfun$generateFragmentsFromTrees$4.apply(SourceGenerator.scala:115)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)
at scala.collection.immutable.List.map(List.scala:285)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.generateFragmentsFromTrees(SourceGenerator.scala:115)
at scala.tools.refactoring.MultiStageRefactoring.generateFragmentsFromTrees(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.SourceGenerator$$anonfun$createChanges$1.apply(SourceGenerator.scala:33)
at scala.tools.refactoring.sourcegen.SourceGenerator$$anonfun$createChanges$1.apply(SourceGenerator.scala:33)
at scala.tools.refactoring.common.SilentTracing$class.context(tracing.scala:69)
at scala.tools.refactoring.MultiStageRefactoring.context(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.sourcegen.SourceGenerator$class.createChanges(SourceGenerator.scala:32)
at scala.tools.refactoring.MultiStageRefactoring.createChanges(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.Refactoring$$anonfun$refactor$1.apply(Refactoring.scala:32)
at scala.tools.refactoring.Refactoring$$anonfun$refactor$1.apply(Refactoring.scala:31)
at scala.tools.refactoring.common.SilentTracing$class.context(tracing.scala:69)
at scala.tools.refactoring.MultiStageRefactoring.context(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.Refactoring$class.refactor(Refactoring.scala:31)
at scala.tools.refactoring.MultiStageRefactoring.refactor(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.Refactoring$class.transformFile(Refactoring.scala:41)
at scala.tools.refactoring.MultiStageRefactoring.transformFile(MultiStageRefactoring.scala:14)
at scala.tools.refactoring.implementations.OrganizeImports.perform(OrganizeImports.scala:425)
at scala.tools.refactoring.implementations.OrganizeImports.perform(OrganizeImports.scala:20)
at org.scalaide.refactoring.internal.ScalaIdeRefactoring$$anonfun$6$$anonfun$7.apply(ScalaIdeRefactoring.scala:179)
at org.scalaide.refactoring.internal.ScalaIdeRefactoring$$anonfun$6$$anonfun$7.apply(ScalaIdeRefactoring.scala:179)
at scala.tools.nsc.util.InterruptReq.execute(InterruptReq.scala:26)
at scala.tools.nsc.interactive.Global$$anonfun$pollForWork$1.apply$mcV$sp(Global.scala:455)
at scala.util.control.Breaks.breakable(Breaks.scala:38)
at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:429)
at scala.tools.nsc.interactive.PresentationCompilerThread.run(PresentationCompilerThread.scala:22)
Leave a comment
on 2015-10-07 20:36 *
By Simon Schäfer
No, when the problem occurred I did not manage to reproduce it by a self hosting example. And now I have forgotten for which files the problem happened.
I found a file where the problem can be reproduced. It is org.scalaide.refactoring.internal.rename.Rename. It is important to select the "preserve existing groups" option in the "Scala > Editor > Organize Imports" preference page.
Hmm, unfortunately I can't reproduce this, although I selected "preserve existing groups". I tried with vanilla 4.2.0 and a local build based on scala-ide-40d8fb7d60a9f2f484a11b4e5705a015c016e819 and scala-refactoring-2f7c6478f41031a4c9a7c5bf31630b2d53b5521c. Can you reproduce this with vanilla 4.2.0?
on 2015-10-13 10:29 *
By Simon Schäfer
Man, this is a weird error. Just tested it again and in the latest nightly it doesn't break, whereas in a slightly older version the error still happens.
on 2015-12-12 17:39 *
By Simon Schäfer
I found another file where the error occurs ScalaSourceViewerConfiguration: https://github.com/scala-ide/scala-ide/blob/1c3bb3e8b8880b2bbc37122293bd689b6a38c340/org.scala-ide.sdt.core/src/org/scalaide/ui/internal/editor/ScalaSourceViewerConfiguration.scala The organize imports option "preserve only wildcards; one import statement per importee otherwise" is enabled
@sschaef, can you eventually retry organizing imports on
ScalaSourceViewerConfiguration
with https://github.com/scala-ide/scala-refactoring/pull/121? It just worked fine for me...
on 2016-01-10 01:26 *
By Simon Schäfer
Sorry to disappoint you, it is still broken...
on 2016-01-25 14:51 *
By wpopielarski769697
well, it works for me, but I have latest changes from scala-refactoring (including organize imports). investigating...
on 2016-01-29 15:17 *
By wpopielarski769697
I tried is on clean installation and I didn't reproduce this error, hard to say then
on 2016-02-21 18:38 *
By Simon Schäfer
Tags added auto-import
Summary changed from NotImplementedError for ImportSelectorTree to NotImplementedError for Annotated
Description changed from <pre><code>
2015-05-28 20:5... to I get the following excepti...
Nowadays I get a different exception. It now says that Annotated is not implemented.
on 2016-02-21 19:35 *
By Simon Schäfer
I could produce a minimal test case. Dancing around
Avoid tree printing in organize imports logic
Tree printing is buggy and in this case it led to an exception because
some synthetic tree of a for comprehension was printed. In order to
avoid the exception we no longer call the tree printing logic at all.
Instead we compare symbols and their names, which leads along the way
to even better performance.
Fix #1002476
Branch: master
Commit: scala-ide:47fdd3d377
Tree printing is buggy and in this case it led to an exception because
some synthetic tree of a for comprehension was printed. In order to
avoid the exception we no longer call the tree printing logic at all.
Instead we compare symbols and their names, which leads along the way
to even better performance.
Fix #1002476
Branch: master
Commit: scala-ide:47fdd3d377
on 2016-04-08 17:33 *
By wpopielarski769697
Avoid tree printing in organize imports logic
Tree printing is buggy and in this case it led to an exception because
some synthetic tree of a for comprehension was printed. In order to
avoid the exception we no longer call the tree printing logic at all.
Instead we compare symbols and their names, which leads along the way
to even better performance.
Fix #1002476
Organize imports in ClassDef Tree Node
this commit is to make available organize imports in ClassDef
Implements 'organize imports' in methods body.
Additionally keeps imports for stable identifiers.
Drops to isLocal (2.10), guards position against NoPosition
Adds '\r' to stripFromCode, needed for Win
small optimization of logical statement
Organizes imports in blocks only, just like Intellij
Draws back \r improvement for Win in source generator
Enhancements suggested by @sschaef
Moves method participants into separate class
Extracts IsNotInImports to separate class
Enables tests after merge of #136
Adds possibility to shadow imports. Simple scenario
Branch: master
Commit: scala-ide:9249cac550
Tree printing is buggy and in this case it led to an exception because
some synthetic tree of a for comprehension was printed. In order to
avoid the exception we no longer call the tree printing logic at all.
Instead we compare symbols and their names, which leads along the way
to even better performance.
Fix #1002476
Organize imports in ClassDef Tree Node
this commit is to make available organize imports in ClassDef
Implements 'organize imports' in methods body.
Additionally keeps imports for stable identifiers.
Drops to isLocal (2.10), guards position against NoPosition
Adds '\r' to stripFromCode, needed for Win
small optimization of logical statement
Organizes imports in blocks only, just like Intellij
Draws back \r improvement for Win in source generator
Enhancements suggested by @sschaef
Moves method participants into separate class
Extracts IsNotInImports to separate class
Enables tests after merge of #136
Adds possibility to shadow imports. Simple scenario
Branch: master
Commit: scala-ide:9249cac550