Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added Option(_) quickfix

  • Loading branch information...
commit ef389f1944b0aa97ccbff1e6b3c692f22b667cfa 1 parent 749925a
@kaptoxic kaptoxic authored
View
4 org.scala-ide.sdt.core/src/scala/tools/eclipse/quickfix/TypeMismatchQuickFixProcessor.scala
@@ -4,7 +4,7 @@ package scala.tools.eclipse.quickfix
import java.util.regex.Pattern
/**
- * @author ivcha
+ * @author Ivan Kuraj
* This object is used for applying code transformations based on the found and required type
* extract from the annotation message (such as quick fix message) and the expression in the source code.
* The object arguments are: found type string, required type string and annotation string, respective and
@@ -28,7 +28,7 @@ object TypeMismatchQuickFixProcessor extends
),
// "type mismatch: found T; required Option[T]" -> suggest to wrap the result in Some()
FoundToRequiredTypeCase(
- List("Some(%s)"),
+ List("Option(%s)", "Some(%s)"),
Pattern.compile("(.*)"), Pattern.compile("Option\\[(.*)\\]"), Pattern.compile("^(.*)$")
)
)
Please sign in to comment.
Something went wrong with that request. Please try again.