Skip to content
Browse files

I broke refactoring imports. Fixing it

  • Loading branch information...
1 parent 9fedafd commit 2b0e882b5c23fc30d616198d567d5d67e4e123f0 @MarcWeber committed Nov 26, 2010
View
2 src/main/scala/org/ensime/protocol/SwankJsonProtocol.scala
@@ -248,7 +248,6 @@ trait SwankJsonProtocol extends Protocol[JValue] {
def toWF(value :RPCResult):JValue = {
value match {
case RPCResultNull => JInt(0) // Vim can't parse null
- case RPCResultAny(any:Any) => throw new Exception("TODO")
case RPCResultNoteList(nl:NoteList) => toWF(nl)
case RPCResultNote(note:Note) => throw new Exception("not used")
case RPCResultNamedTypeMemberInfo(namedTypeMember:NamedTypeMemberInfoLight) => toWF(namedTypeMember)
@@ -262,6 +261,7 @@ trait SwankJsonProtocol extends Protocol[JValue] {
case RPCResultImportSuggestions(l: ImportSuggestions) => toWF(l)
case RPCResultBool(b: Boolean) => toWF(b)
case RPCResultTypeInspectInfo(t: TypeInspectInfo) => toWF(t)
+ case RPCResultRefactorEffect(b: RefactorEffect) => toWF(b)
case RPCResultRefactorFailure(b: RefactorFailure) => toWF(b)
case RPCResultRefactorResult(b: RefactorResult) => toWF(b)
case RPCResultProjectConfig(c: ProjectConfig) => toWF(c)
View
2 src/main/scala/org/ensime/protocol/SwankProtocol.scala
@@ -388,7 +388,6 @@ trait SwankProtocol extends Protocol[SExp] {
def toWF(value :RPCResult):SExp = {
value match {
case RPCResultNull => toWF(null)
- case RPCResultAny(any:Any) => throw new Exception("TODO")
case RPCResultNoteList(nl:NoteList) => toWF(nl)
case RPCResultNote(note:Note) => throw new Exception("not used")
case RPCResultNamedTypeMemberInfo(namedTypeMember:NamedTypeMemberInfoLight) => toWF(namedTypeMember)
@@ -402,6 +401,7 @@ trait SwankProtocol extends Protocol[SExp] {
case RPCResultImportSuggestions(l: ImportSuggestions) => toWF(l)
case RPCResultBool(b: Boolean) => toWF(b)
case RPCResultTypeInspectInfo(t: TypeInspectInfo) => toWF(t)
+ case RPCResultRefactorEffect(effect:RefactorEffect) => toWF(effect)
case RPCResultRefactorFailure(b: RefactorFailure) => toWF(b)
case RPCResultRefactorResult(b: RefactorResult) => toWF(b)
case RPCResultProjectConfig(c: ProjectConfig) => toWF(c)
View
2 src/main/scala/org/ensime/server/Project.scala
@@ -18,7 +18,7 @@ import scala.collection.mutable.{ LinkedHashMap }
// client. See Protocol implementations to find out how they are encoded
abstract sealed class RPCResult
case object RPCResultNull extends RPCResult
-case class RPCResultAny(any:Any) extends RPCResult
+case class RPCResultRefactorEffect(any:RefactorEffect) extends RPCResult
case class RPCResultNoteList(nl:NoteList) extends RPCResult
case class RPCResultNote(note:Note) extends RPCResult
case class RPCResultNamedTypeMemberInfo(namedTypeMember:NamedTypeMemberInfoLight) extends RPCResult
View
4 src/main/scala/org/ensime/server/Refactoring.scala
@@ -63,9 +63,9 @@ trait RefactoringController { self: Analyzer =>
result match {
case Right(effect) => {
effects(procedureId) = effect
- project ! RPCResultEvent(RPCResultAny(effect), callId)
+ project ! RPCResultEvent(RPCResultRefactorEffect(effect), callId)
}
- case Left(f) => project ! RPCResultEvent(RPCResultAny(f), callId)
+ case Left(f) => project ! RPCResultEvent(RPCResultRefactorFailure(f), callId)
}
}

0 comments on commit 2b0e882

Please sign in to comment.
Something went wrong with that request. Please try again.