equal
deleted
inserted
replaced
7 |
7 |
8 package isabelle |
8 package isabelle |
9 |
9 |
10 |
10 |
11 import java.lang.Class |
11 import java.lang.Class |
|
12 import java.util.{List => JList} |
12 |
13 |
13 import scala.collection.mutable |
14 import scala.collection.mutable |
14 import scala.annotation.tailrec |
15 import scala.annotation.tailrec |
15 import scala.collection.immutable.SortedMap |
16 import scala.collection.immutable.SortedMap |
16 |
17 |
221 |
222 |
222 private def suggestions(word: String): Option[List[String]] = |
223 private def suggestions(word: String): Option[List[String]] = |
223 { |
224 { |
224 val res = |
225 val res = |
225 Untyped.method(dict.getClass.getSuperclass, "searchSuggestions", classOf[String]). |
226 Untyped.method(dict.getClass.getSuperclass, "searchSuggestions", classOf[String]). |
226 invoke(dict, word).asInstanceOf[java.util.List[AnyRef]].toArray.toList.map(_.toString) |
227 invoke(dict, word).asInstanceOf[JList[AnyRef]].toArray.toList.map(_.toString) |
227 if (res.isEmpty) None else Some(res) |
228 if (res.isEmpty) None else Some(res) |
228 } |
229 } |
229 |
230 |
230 def complete(word: String): List[String] = |
231 def complete(word: String): List[String] = |
231 if (check(word)) Nil |
232 if (check(word)) Nil |